ဝိက်ရှေန်နရဳ
mnwwiktionary
https://mnw.wiktionary.org/wiki/%E1%80%9D%E1%80%AD%E1%80%80%E1%80%BA%E1%80%9B%E1%80%BE%E1%80%B1%E1%80%94%E1%80%BA%E1%80%94%E1%80%9B%E1%80%B3:%E1%80%99%E1%80%AF%E1%80%80%E1%80%BA%E1%80%9C%E1%80%AD%E1%80%80%E1%80%BA%E1%80%90%E1%80%99%E1%80%BA
MediaWiki 1.46.0-wmf.22
case-sensitive
မဳဒဳယာ
တၟေင်
ဓရီုကျာ
ညးလွပ်
ညးလွပ် ဓရီုကျာ
ဝိက်ရှေန်နရဳ
ဝိက်ရှေန်နရဳ ဓရီုကျာ
ဝှာင်
ဝှာင် ဓရီုကျာ
မဳဒဳယာဝဳကဳ
မဳဒဳယာဝဳကဳ ဓရီုကျာ
ထာမ်ပလိက်
ထာမ်ပလိက် ဓရီုကျာ
ရီု
ရီု ဓရီုကျာ
ကဏ္ဍ
ကဏ္ဍ ဓရီုကျာ
အဆက်လက္ကရဴ
အဆက်လက္ကရဴ ဓရီုကျာ
ကာရန်
ကာရန် ဓရီုကျာ
အဘိဓာန်
အဘိဓာန် ဓရီုကျာ
ဗီုပြၚ်သိုၚ်တၟိ
ဗီုပြၚ်သိုၚ်တၟိ ဓရီုကျာ
TimedText
TimedText talk
မဝ်ဂျူ
မဝ်ဂျူ ဓရီုကျာ
Event
Event talk
မဝ်ဂျူ:documentation
828
639
385834
291414
2026-04-07T09:00:17Z
咽頭べさ
33
385834
Scribunto
text/plain
local export = {}
local array_module = "Module:array"
local debug_track_module = "Module:debug/track"
local frame_module = "Module:frame"
local fun_is_callable_module = "Module:fun/isCallable"
local languages_module = "Module:languages"
local links_module = "Module:links"
local load_module = "Module:load"
local module_categorization_module = "Module:module categorization"
local number_list_show_module = "Module:number list/show"
local pages_module = "Module:pages"
local parameters_module = "Module:parameters"
local scripts_module = "Module:scripts"
local string_endswith_module = "Module:string/endswith"
local string_gline_module = "Module:string/gline"
local string_insert_module = "Module:string/insert"
local string_startswith_module = "Module:string/startswith"
local string_utilities_module = "Module:string utilities"
local template_parser_module = "Module:template parser"
local title_exists_module = "Module:title/exists"
local title_new_title_module = "Module:title/newTitle"
local concat = table.concat
local error = error
local full_url = mw.uri.fullUrl
local get_current_title = mw.title.getCurrentTitle
local insert = table.insert
local ipairs = ipairs
local list_to_text = mw.text.listToText
local new_message = mw.message.new
local pcall = pcall
local require = require
local tonumber = tonumber
local tostring = tostring
local type = type
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local function Array(...)
Array = require(array_module)
return Array(...)
end
local function categorize_module(...)
categorize_module = require(module_categorization_module).categorize
return categorize_module(...)
end
local function debug_track(...)
debug_track = require(debug_track_module)
return debug_track(...)
end
local function endswith(...)
endswith = require(string_endswith_module)
return endswith(...)
end
local function expand_template(...)
expand_template = require(frame_module).expandTemplate
return expand_template(...)
end
local function find_templates(...)
find_templates = require(template_parser_module).find_templates
return find_templates(...)
end
local function full_link(...)
full_link = require(links_module).full_link
return full_link(...)
end
local function get_lang(...)
get_lang = require(languages_module).getByCode
return get_lang(...)
end
local function get_pagetype(...)
get_pagetype = require(pages_module).get_pagetype
return get_pagetype(...)
end
local function get_script(...)
get_script = require(scripts_module).getByCode
return get_script(...)
end
local function gline(...)
gline = require(string_gline_module)
return gline(...)
end
local function is_callable(...)
is_callable = require(fun_is_callable_module)
return is_callable(...)
end
local function is_documentation(...)
is_documentation = require(pages_module).is_documentation
return is_documentation(...)
end
local function is_sandbox(...)
is_sandbox = require(pages_module).is_sandbox
return is_sandbox(...)
end
local function new_title(...)
new_title = require(title_new_title_module)
return new_title(...)
end
local function number_list_show_table(...)
number_list_show_table = require(number_list_show_module).table
return number_list_show_table(...)
end
local function preprocess(...)
preprocess = require(frame_module).preprocess
return preprocess(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function safe_load_data(...)
safe_load_data = require(load_module).safe_load_data
return safe_load_data(...)
end
local function split(...)
split = require(string_utilities_module).split
return split(...)
end
local function startswith(...)
startswith = require(string_startswith_module)
return startswith(...)
end
local function string_insert(...)
string_insert = require(string_insert_module)
return string_insert(...)
end
local function title_exists(...)
title_exists = require(title_exists_module)
return title_exists(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local skins = {
["common" ] = "";
["vector" ] = "Vector";
["monobook" ] = "Monobook";
["cologneblue"] = "Cologne Blue";
["modern" ] = "Modern";
}
local function track(page)
debug_track("documentation/" .. page)
return true
end
local function compare_pages(page1, page2, text)
return "[" .. tostring(
full_url("Special:ComparePages", {page1 = page1, page2 = page2}))
.. " " .. text .. "]"
end
-- Avoid transcluding [[Module:languages/cache]] everywhere.
local lang_cache = setmetatable({}, { __index = function (self, k)
return require("မဝ်ဂျူ:languages/cache")[k]
end })
local function zh_link(word)
return full_link{
lang = lang_cache.zh,
term = word
}
end
local function make_languages_data_documentation(title, cats, division)
local doc_template, module_cat
if endswith(division, "/extra") then
division = division:sub(1, -7)
doc_template = "language extradata documentation"
module_cat = "စရၚ်မဝ်ဂျူအရေဝ်ဘာသာရပ်စပ်အပဵုဂမၠိုၚ်"
else
doc_template = "language data documentation"
module_cat = "မဝ်ဂျူစရၚ်အရေဝ်ဘာသာဂမၠိုၚ်"
end
local sort_key
if division == "exceptional" then
sort_key = "x"
else
sort_key = division:gsub("/", "")
end
cats:insert(module_cat .. "|" .. sort_key)
return {
title = doc_template
}
end
local function make_Unicode_data_documentation(title, cats)
local subpage, first_three_of_code_point
= title.fullText:match("^မဝ်ဂျူ:Unicode data/([^/]+)/(%x%x%x)$")
if subpage == "names" or subpage == "images" or subpage == "emoji images" then
local low, high =
tonumber(first_three_of_code_point .. "000", 16),
tonumber(first_three_of_code_point .. "FFF", 16)
local text, text_type
if subpage == "names" then
text_type = "titles of images"
elseif subpage == "images" then
text_type = "titles of images"
elseif subpage == "emoji images" then
text_type = "emoji-style images"
end
text = string.format(
"This data module contains the " .. text_type .. " of " ..
"[[Appendix:Unicode|Unicode]] code points within the range U+%04X to U+%04X.",
low, high)
if subpage == "images" and safe_load_data("Module:Unicode data/emoji images/" .. first_three_of_code_point) then
text = text .. " This list includes the text variants of emojis. For the list of emoji variants of those characters, see [[Module:Unicode data/emoji images/" .. first_three_of_code_point .. "]]."
elseif subpage == "emoji images" then
text = text .. " For text-style images, see [[Module:Unicode data/images/" .. first_three_of_code_point .. "]]."
end
return text
end
end
local function insert_lang_data_module_cats(cats, langcode, overall_data_module_cat)
local lang = lang_cache[langcode]
if lang then
local langname
if lang._fullCode then
langname = lang_cache[lang._fullCode]:getCanonicalName()
else
langname = lang:getCanonicalName()
end
cats:insert(overall_data_module_cat .. "|" .. langname)
cats:insert("မဝ်ဂျူ" .. langname .. "ဂမၠိုၚ်")
cats:insert("စရၚ်မဝ်ဂျူ" .. langname .. "ဂမၠိုၚ်")
return lang, langname
end
end
--[=[
This provides categories and documentation for various data modules, so that [[Category:Uncategorized modules]] isn't
unnecessarily cluttered. It is a list of tables, each of which have the following possible fields:
`regex` (required): A Lua pattern to match the module's title. If it matches, the data in this entry will be used.
Any captures in the pattern can by referenced in the `cat` field using %1 for the first capture, %2 for the
second, etc. (often used for creating the sortkey for the category). In addition, the captures are passed to the
`process` function as the third and subsequent parameters.
`process` (optional): This may be a function or a string. If it is a function, it is called as follows:
`process(TITLE, CATS, CAPTURE1, CAPTURE2, ...)`
where:
* TITLE is a title object describing the module's title; see
[https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects].
* CATS is an array object (see [[Module:array]]) of categories that the module will be added to.
* CAPTURE1, CAPTURE2, ... contain any captures in the `regex` field.
The return value of `process` should either be a string (which will be used as the module's documentation), or a
table specifying the name of a template to expand to get the documentation, along with the arguments to that
template. In the latter format, the template name (bare, without the "Template:" prefix) should be in the `title`
field, and any arguments should be in `args; in this case, the template name will be listed above the generated
documentation as the source of the documentation, along with an edit button to edit the template's contents.
If, however, the return value of the `process` function is a string, any template invocations will be expanded
using frame:preprocess(), and [[Module:documentation]] will be listed as the source of the documentation.
If `process` itself is a string rather than a function, it should name a submodule under
[[Module:documentation/functions/]] which returns a function, of the same type as described above. This submodule
will be specified as the source of the documentation (unless it returns a table naming a template to expand to get
the documentation, as described above).
If `process` is omitted entirely, the module will have no documentation.
`cat` (optional): A string naming the category into which the module should be placed, or a list of such strings.
Captures specified in `regex` may be referenced in this string using %1 for the first capture, %2 for the second,
etc. It is also possible to add categories in the `process` function by inserting them into the passed-in CATS
array (the second parameter).
]=]
local module_regex = {
{
regex = "^မဝ်ဂျူ:languages/data/(3/%l/extra)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(3/%l)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(2/extra)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(2)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(exceptional/extra)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(exceptional)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/.+$",
cat = "မဝ်ဂျူအရေဝ်ဘာသာကဵုအက္ခရ်ဂမၠိုၚ်",
},
{
regex = "^မဝ်ဂျူ:scripts/.+$",
cat = "မဝ်ဂျူအရေဝ်ဘာသာကဵုအက္ခရ်ဂမၠိုၚ်",
},
{
regex = "^မဝ်ဂျူ:data tables/data..?.?.?$",
cat = "နိဿဲပါ်ခြာမဝ်ဂျူစရၚ်အၚ်ဂမၠိုၚ်",
},
{
regex = "^မဝ်ဂျူ:zh/data/dial%-pron/.+$",
cat = "စရၚ်မဝ်ဂျူဆေၚ်စပ်ကဵုပ္တိတ်ရမျာၚ်အရေဝ်တၞဟ်ခြာဘာသာကြုက်ဂမၠိုၚ်",
process = "zh dial or syn",
},
{
regex = "^မဝ်ဂျူ:zh/data/dial%-syn/.+$",
cat = "စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်နကဵုဘာသာကြုက်ဂမၠိုၚ်",
process = "zh dial or syn",
},
{
regex = "^မဝ်ဂျူ:zh/data/glyph%-data/.+$",
cat = "စရၚ်မဝ်ဂျူဗျဉ်ကြုက်ဗီုပြၚ်မဆေၚ်စပ်ကဵုဝၚ်ဂမၠိုၚ်",
process = function(title, cats)
local character = title.fullText:match("^မဝ်ဂျူ:zh/data/glyph%-data/(.+)")
if character then
return ("မဝ်ဂျူတဏအ်မထိၚ်ဒဝ်လဝ်စရၚ်လ္တူမဆေၚ်စပ်ကဵုဝၚ်ဗီုပြၚ်ဗျဉ်ကြုက်နကဵုဝေါဟာ %s။")
:format(zh_link(character))
end
end,
},
{
regex = "^မဝ်ဂျူ:zh/data/ltc%-pron/(.+)$",
cat = "စရၚ်ပတိတ်ရမျာၚ်မဝ်ဂျူကြုက်လဒေါဝ်ဂမၠိုၚ်|%1",
process = "zh data",
},
{
regex = "^မဝ်ဂျူ:zh/data/och%-pron%-BS/(.+)$",
cat = "မဝ်ဂျူဒေတာဗွဟ်ရမ္သာၚ်(Baxter-Sagart)ကြုက်တြေံဂမၠိုၚ်|%1",
process = "zh data",
},
{
regex = "^မဝ်ဂျူ:zh/data/och%-pron%-ZS/(.+)$",
cat = "စရၚ်မဝ်ဂျူကြုက်တြေံဗီုပတိတ်ရမျာၚ် (Zhengzhang) ဂမၠိုၚ်|%1",
process = "zh data",
},
{
-- capture rest of zh/data submodules
regex = "^မဝ်ဂျူ:zh/data/(.+)$",
cat = "စရၚ်မဝ်ဂျူကြုက်ဂမၠိုၚ်|%1",
},
{
regex = "^မဝ်ဂျူ:mul/guoxue%-data/cjk%-?(.*)$",
process = "guoxue-data",
},
{
regex = "^မဝ်ဂျူ:Unicode data/(.+)$",
cat = "မဝ်ဂျူစရၚ်ယူနဳကုတ်ဂမၠိုၚ်|%1",
process = make_Unicode_data_documentation,
},
{
regex = "^မဝ်ဂျူ:number list/data/(.+)$",
process = function(title, cats, lang_code)
local lang = insert_lang_data_module_cats(cats, lang_code, "မဝ်ဂျူစရၚ်ဂၞန်ဂမၠိုၚ်")
if lang then
return ("This module contains data on various types of numbers in %s.\n%s")
:format(lang:makeCategoryLink(), number_list_show_table() or "")
end
end,
},
{
regex = "^မဝ်ဂျူ:accel/(.+)$",
process = function(title, cats)
local lang_code = title.subpageText
local lang = lang_cache[lang_code]
if lang then
cats:insert("မဝ်ဂျူ" .. lang:getCanonicalName() .. "ဂမၠိုၚ်|accel")
cats:insert(("မဝ်ဂျူဒကုတ်ဍောတ်အေက်သာယ်ဂမၠိုၚ်|%s"):format(lang:getCanonicalName()))
return ("This module contains new entry creation rules for %s; see [[WT:ACCEL]] for an overview, and [[Module:accel]] for information on creating new rules.")
:format(lang:makeCategoryLink())
end
end,
},
{
regex = "^မဝ်ဂျူ:inc%-ash/dial/data/(.+)$",
cat = "မဝ်ဂျူအခါန်ကာန် ပရာကရေတ်ဂမၠိုၚ်|%1",
process = function(title, cats)
local word = title.fullText:match("^မဝ်ဂျူ:inc%-ash/dial/data/(.+)$")
if word then
local lang = lang_cache["inc-ash"]
return ("This module contains data on the pronunciation of %s in dialects of %s.")
:format(full_link({ term = word, lang = lang }, "term"),
lang:makeCategoryLink())
end
end,
},
{
regex = "^.+%-translit$",
process = "translit",
},
{
regex = "^မဝ်ဂျူ:form of/lang%-data/(.+)$",
process = function(title, cats, lang_code)
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "စရၚ်မဝ်ဂျူကွက်ဒက်စုတ်သမ္တီအရေဝ်ဘာသာချိုတ်ချိုတ်ပၠိုတ်ပၠိုတ်ဂမၠိုၚ်")
if lang then
-- FIXME, display more info.
return "This module contains language-specific form-of data (tags, shortcuts, base lemma params. etc.) for " ..
langname .. "."
end
end
},
{
regex = "^မဝ်ဂျူ:labels/data/lang/(.+)$",
process = function(title, cats, lang_code)
local lang = insert_lang_data_module_cats(cats, lang_code, "စရၚ်မဝ်ဂျူကွက်ဒက်စုတ်သမ္တီအရေဝ်ဘာသာချိုတ်ချိုတ်ပၠိုတ်ပၠိုတ်ဂမၠိုၚ်")
if lang then
return {
title = "label language-specific data documentation",
args = { [1] = lang_code },
}
end
end
},
{
regex = "^မဝ်ဂျူ:category tree/lang/(.+)$",
process = function(title, cats, lang_code)
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "တၞံမဝ်ဂျူဂၠေံဂၠေံဂမၠိုၚ်/ကဏ္ဍဒကုတ်တံလိက်")
if lang then
return "This module handles generating the descriptions and categorization for " .. langname .. " category pages "
.. "of the format \"" .. langname .. " LABEL\" where LABEL can be any text. Examples are "
.. "[[:Category:Bulgarian conjugation 2.1 verbs]] and [[:Category:Russian velar-stem neuter-form nouns]]. "
.. "This module is part of the category tree system, which is a general framework for generating the "
.. "descriptions and categorization of category pages.\n\n"
.. "For more information, see [[Module:category tree/lang/documentation]].\n\n"
.. "'''NOTE:''' If you add a new language-specific module, you must add the language code to the "
.. "list at the top of [[Module:category tree/lang]] in order for the module to be recognized."
end
end
},
{
regex = "^မဝ်ဂျူ:category tree/topic/(.+)$",
process = function(title, cats, submodule)
cats:insert("ကဏ္ဍတၞံစရၚ်မဝ်ဂျူဂမၠိုၚ်/ပရောပရာသဳကၠဳ| ")
return {
title = "topic cat data submodule documentation"
}
end
},
{
regex = "^မဝ်ဂျူ:category tree/(.+)$",
process = function(title, cats, submodule)
cats:insert("တၞံမဝ်ဂျူဂၠေံဂၠေံဂမၠိုၚ်/ကဏ္ဍဒကုတ်တံလိက်| ")
return {
title = "category tree data submodule documentation"
}
end
},
{
regex = "^မဝ်ဂျူ:ja/data/(.+)$",
cat = "စရၚ်မဝ်ဂျူဂျပါန်ဂမၠိုၚ်|%1",
},
{
regex = "^မဝ်ဂျူ:fi%-dialects/data/feature/Kettunen1940 ([0-9]+)$",
cat = "စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာနကဵုဘာသာဖေန်လာန်ဂမၠိုၚ်|%1",
process = function(title, cats, shard)
return "This module contains shard " .. shard .. " of the online version of Lauri Kettunen's 1940 work " ..
"''Suomen murteet III A. Murrekartasto'' (\"Finnish dialects III A: Dialect atlas\"). " ..
"It was imported and converted from urn:nbn:fi:csc-kata20151130145346403821, published by the " ..
"''Kotimaisten kielten keskus'' under the CC BY 4.0 license."
end
},
{
regex = "^မဝ်ဂျူ:fi%-dialects/data/feature/(.+)",
cat = "စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာနကဵုဘာသာဖေန်လာန်ဂမၠိုၚ်|%1",
},
{
regex = "^မဝ်ဂျူ:fi%-dialects/data/word/(.+)",
cat = "စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာနကဵုဘာသာဖေန်လာန်ဂမၠိုၚ်|%1",
},
{
regex = "^မဝ်ဂျူ:Swadesh/data/([%l-]+)$",
process = function(title, cats, lang_code)
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "မဝ်ဂျူသွဳဒေါတ်ဂမၠိုၚ်")
if lang then
return "မဝ်ဂျူတဏအ်ဝွံ မဆက်ဆောံဆေၚ်စပ်ကဵုစရၚ်သွဳဒေါတ်နကဵုဝေါဟာတံမူလအပ္ဍဲဘာသာ" .. langname .. "ဂမၠိုၚ်။"
end
end
},
{
regex = "^မဝ်ဂျူ:Swadesh/data/([%l-]+)/([^/]*)$",
process = function(title, cats, lang_code, variety)
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "မဝ်ဂျူသွဳဒေါတ်ဂမၠိုၚ်")
if lang then
local prefix = "မဝ်ဂျူတဏအ်ဝွံ မဆက်ဆောံဆေၚ်စပ်ကဵုစရၚ်သွဳဒေါတ်နကဵုဝေါဟာတံမူလအပ္ဍဲ "
local etym_lang = get_lang(variety, nil, " ")
if etym_lang then
return ("%s %s သီုကဵုအရာနာနာသာ်နူ %sဂမၠိုၚ်။"):format(prefix, etym_lang:getCanonicalName(), langname)
end
local script = get_script(variety)
if script then
return ("သဵုကဵုအက္ခရ် %s %s %s ဂမၠိုၚ်။"):format(prefix, langname, script:getCanonicalName())
end
return ("%s %s သီုကဵုအရာနာနာသာ်နူ %sဂမၠိုၚ်။"):format(prefix, variety, langname)
end
end
},
{
regex = "^မဝ်ဂျူ:typing%-aids",
process = function(title, cats)
local data_suffix = title.fullText:match("^မဝ်ဂျူ:typing%-aids/data/(.+)$")
local sortkey
if data_suffix then
if data_suffix:find "^[%l-]+$" then
local lang = get_lang(data_suffix)
if lang then
sortkey = lang:getCanonicalName()
cats:insert("စရၚ်မဝ်ဂျူ" .. sortkey .. "ဂမၠိုၚ်")
end
elseif data_suffix:find "^%u%l%l%l$" then
local script = get_script(data_suffix)
if script then
sortkey = script:getCanonicalName()
cats:insert(script:getCategoryName())
end
end
cats:insert("စရၚ်မဝ်ဂျူမစုတ်ပၠောပ်ဗျဉ်ဂမၠိုၚ်|" .. (sortkey or data_suffix))
end
end,
},
{
regex = "^မဝ်ဂျူ:R:([%l-]+):(.+)$",
process = function(title, cats, lang_code, refname)
local lang = lang_cache[lang_code]
if lang then
cats:insert("မဝ်ဂျူ" .. lang:getCanonicalName() .. "ဂမၠိုၚ်|" .. refname)
cats:insert(("မဝ်ဂျူနိဿဲဂမၠိုၚ်|%s"):format(lang:getCanonicalName()))
return "မဝ်ဂျူတဏအ်ဝွံ မရပ်စပ်ဆေၚ်စပ်ကဵုထာမ်ပလိက်နိဿဲနကဵု {{temp|R:" .. lang_code .. ":" .. refname .. "}}ဂမၠိုၚ်။"
end
end,
},
{
regex = "^မဝ်ဂျူ:Quotations/([%l-]+)/?(.*)",
process = "Quotation",
},
{
regex = "^မဝ်ဂျူ:affix/lang%-data/([%l-]+)",
process = "affix lang-data",
},
{
regex = "^မဝ်ဂျူ:dialect synonyms/([%l-]+)$",
process = function(title, cats, lang_code)
local lang = lang_cache[lang_code]
if lang then
local langname = lang:getCanonicalName()
cats:insert("စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်ဂမၠိုၚ်|" .. langname)
cats:insert("စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်နကဵုဘာသာ" .. langname .. "ဂမၠိုၚ်| ")
return "မဝ်ဂျူတဏအ်ဝွံ မဆက်ဆောံစရၚ်လ္တူအရာနာနာသာ်ဗွဲတၟေၚ်ဆေၚ်စပ်ကဵုဘာသာ" .. langname .. "၊ သွက်မရပ်စပ်နူကဵု " ..
"ဝေါဟာဇာတိအဓိပ္ပါဲတုပ်ဂမၠိုၚ်။ ဆေၚ်စပ်ကဵုဝေါဟာမဆက်ဆောံအဓိပ္ပါဲတုပ်အဇေတ်အဍာံဂှ်မနွံဒၟံၚ်ပ္ဍဲမဝ်ဂျူတန်ဍောတ်ဂမၠိုၚ်။\n\n" ..
expand_template({ title = 'dial syn', args = { lang_code, ["demo mode"] = "y" } })
end
end,
},
{
regex = "^မဝ်ဂျူ:dialect synonyms/([%l-]+)/(.+)$",
process = function(title, cats, lang_code, term)
local lang = lang_cache[lang_code]
if lang then
local langname = lang:getCanonicalName()
cats:insert("စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်ဂမၠိုၚ်|" .. langname)
cats:insert("စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်နကဵုဘာသာ" .. langname .. "ဂမၠိုၚ်|" .. term)
return ("မဝ်ဂျူတဏအ်ဝွံ မဆက်ဆောံပွံၚ်အဓိပ္ပါဲ %s နကဵုဝေါဟာအဓိပ္ပါဲတုပ်သွက် {{m|%s|%s}} ဂမၠိုၚ်။\n\n%s"):format(langname, lang_code, term, expand_template({ title = 'dial syn', args = { lang_code, term } }))
end
end,
},
{
regex = "^မဝ်ဂျူ:bibliography/data/([%l-]+)$",
process = function(title, cats, lang_code)
if lang_code == "preload" then
return 'Used as a base model for other languages when the button "create new language submodule" is clicked.'
end
local page = require(title.fullText).bib_page
if not page then
page = lang_cache[lang_code]:getCanonicalName()
if page then
cats:insert("မဝ်ဂျူ"..page.."ဂမၠိုၚ်")
end
end
cats:insert("မဝ်ဂျူနိဿဲဂမၠိုၚ်")
return "This module holds bibliographical data for "..page..". For the formatted bibliography see '''[[Appendix:Bibliography/"..page.."]]'''."
end,
},
}
function export.show(frame)
local boolean_default_false = {type = "boolean", default = false}
local args = process_params(frame.args, {
["hr"] = true,
["for"] = true,
["from"] = true,
["allowondoc"] = boolean_default_false, -- Don't throw an error if used on a documentation subpage.
["notsubpage"] = boolean_default_false,
["nodoc"] = boolean_default_false,
["nolinks"] = boolean_default_false, -- suppress all "Useful links"
["nosandbox"] = boolean_default_false, -- supress sandbox
})
local output = Array('\n<div class="documentation" style="display:block; clear:both">\n')
local cats = Array()
local nodoc = args.nodoc
if (not args.hr) or (args.hr == "above") then
output:insert("----\n")
end
local title = args["for"] and new_title(args["for"]) or get_current_title()
local doc_title = args.from ~= "-" and new_title(args.from or title.fullText .. '/documentation') or nil
local contentModel = title.contentModel
local pagetype, is_script_or_stylesheet = get_pagetype(title)
local preload, fallback_docs, doc_content, old_doc_title, user_name, skin_name, needs_doc
local doc_content_source = "မဝ်ဂျူ:documentation"
local auto_generated_cat_source
local cats_auto_generated = false
if not args.allowondoc and is_documentation(title) then
-- TODO: merge with {{documentation subpage}}, and choose behaviour based on the page type.
error("This template should not be used on a documentation page. Please use [[Template:documentation subpage]].")
elseif is_sandbox(title) then
local sandbox_ns = title.nsText
preload = ("ထာမ်ပလိက်:documentation/preload%s%sSandbox"):format(
sandbox_ns == "မဝ်ဂျူ" and sandbox_ns or "ထာမ်ပလိက်",
title.rootText:match("^[Uu]ser:(.+)") and "ညးလွပ်" or ""
)
elseif pagetype:match("%f[%w]gadget%f[%W]") then
preload = "ထာမ်ပလိက်:documentation/preloadGadget"
elseif pagetype:match("%f[%w]script%f[%W]") then -- .js
if title.nsText == "မဳဒဳယာဝဳကဳ" then
preload = "ထာမ်ပလိက်:documentation/preloadMediaWikiJavaScript"
else
preload = "ထာမ်ပလိက်:documentation/preloadTemplate" -- XXX
if title.nsText == "ညးလွပ်" then
user_name = title.rootText
end
end
is_script_or_stylesheet = true
elseif pagetype:match("%f[%w]stylesheet%f[%W]") then -- .css
preload = "ထာမ်ပလိက်:documentation/preloadTemplate" -- XXX
if title.nsText == "ညးလွပ်" then
user_name = title.rootText
end
is_script_or_stylesheet = true
elseif contentModel == "Scribunto" then -- Exclude pages in Module: which aren't Scribunto.
preload = "ထာမ်ပလိက်:documentation/preloadModule"
elseif pagetype:match("%f[%w]template%f[%W]") or pagetype:match("%f[%w]project%f[%W]") then
preload = "ထာမ်ပလိက်:documentation/preloadTemplate"
end
if doc_title and doc_title.isRedirect then
old_doc_title = doc_title
doc_title = doc_title.redirectTarget
end
output:insert("<dl class=\"plainlinks\" style=\"font-size: smaller;\">")
local function get_module_doc_and_cats(categories_only)
cats_auto_generated = true
local automatic_cats = nil
if user_name then
fallback_docs = "documentation/fallback/user module"
automatic_cats = {"မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်"}
else
for _, data in ipairs(module_regex) do
local captures = {umatch(title.fullText, data.regex)}
if #captures > 0 then
local cat, process_function
if is_callable(data.process) then
process_function = data.process
elseif type(data.process) == "string" then
doc_content_source = "မဝ်ဂျူ:documentation/functions/" .. data.process
process_function = require(doc_content_source)
end
if process_function then
doc_content = process_function(title, cats, unpack(captures))
end
if type(doc_content) == "table" then
doc_content_source = doc_content.title and "ထာမ်ပလိက်:" .. doc_content.title or doc_content_source
doc_content = expand_template(doc_content)
elseif doc_content ~= nil then
doc_content = preprocess(doc_content)
end
cat = data.cat
if cat then
if type(cat) == "string" then
cat = {cat}
end
for _, c in ipairs(cat) do
insert(cats, (ugsub(title.fullText, data.regex, c)))
end
end
break
end
end
end
if title.subpageText == "ထာမ်ပလိက်" then
cats:insert("မဝ်ဂျူထာမ်ပလိက်အိန်တာဖှေတ်ဂမၠိုၚ်")
end
if automatic_cats then
for _, c in ipairs(automatic_cats) do
cats:insert(c)
end
end
if #cats == 0 then
local auto_cats = categorize_module(frame, "return raw", "noerror")
if #auto_cats > 0 then
auto_generated_cat_source = "မဝ်ဂျူ:module categorization"
end
for _, category in ipairs(auto_cats) do
cats:insert(category)
end
end
-- meaning module is not in user’s sandbox or one of many datamodule boring series
needs_doc = not categories_only and not (automatic_cats or doc_content or fallback_docs)
end
-- Override automatic documentation, if present.
if doc_title and doc_title.exists then
local cats_auto_generated_text = ""
if contentModel == "Scribunto" then
local doc_page_content = doc_title.content
-- Track then do nothing if there are uses of includeonly. The
-- pattern is slightly too permissive, but any false-positives are
-- obvious typos that should be corrected.
if doc_page_content:lower():match("</?includeonly%f[%s/>][^>]*>") then
track("module-includeonly")
else
-- Check for uses of {{module cat}}. find_templates treats the
-- input as transcluded by default (i.e. it parses the wikitext
-- which will be transcluded through to the module page).
local module_cat
for template in find_templates(doc_page_content) do
if template:get_name() == "module cat" then
module_cat = true
break
end
end
if not module_cat then
get_module_doc_and_cats("categories only")
auto_generated_cat_source = auto_generated_cat_source or doc_content_source
cats_auto_generated_text = " Categories were auto-generated by [[" .. auto_generated_cat_source .. "]]. <sup>[[" ..
new_title(auto_generated_cat_source):fullUrl{action = "ပလေဝ်ဒါန်"} .. " ပလေဝ်ဒါန်]]</sup>"
end
end
end
output:insert(
"<dd><i style=\"font-size: larger;\">ပွမဗက် " ..
"[[Help:စရၚ်ထာမ်ပလိက်ကဵုမဝ်ဂျူဂမၠိုၚ်|လိက်စၟတ်သမ္တီ]]မချူလဝ်နကဵုခၞံဗဒှ်အပ္ဍဲ [[" ..
doc_title.fullText .. "]]အတေံ။ " .. "<sup>[[" .. doc_title:fullUrl{action = "ပလေဝ်ဒါန်"} .. " ပလေဝ်ဒါန်]]</sup>" ..
cats_auto_generated_text .. "</i></dd>")
else
if contentModel == "Scribunto" then
get_module_doc_and_cats(false)
elseif title.nsText == "ထာမ်ပလိက်" then
--cats:insert("Uncategorized templates")
needs_doc = not (fallback_docs or nodoc)
elseif user_name and is_script_or_stylesheet then
skin_name = skins[title.text:sub(#title.rootText + 1):match("^/(%l+)%.[jc]ss?$")]
if skin_name then
fallback_docs = "documentation/fallback/user " .. contentModel
end
end
if doc_content then
output:insert(
"<dd><i style=\"font-size: larger;\">မဆေၚ်စပ်ကဵုပွမဗက်က္ကရဴ " ..
"[[Help:စရၚ်ထာမ်ပလိက်ကဵုမဝ်ဂျူဂမၠိုၚ်|လိက်စၟတ်သမ္တီမချူလဝ်]]ဂှ် " ..
"ကၠောန်ပ္တိတ်လဝ်နူကဵု [[" .. doc_content_source .. "]]။ <sup>[[" ..
new_title(doc_content_source):fullUrl{action = "ပလေဝ်ဒါန်"} ..
" ပလေဝ်ဒါန်]]</sup> </i></dd>")
elseif not nodoc then
if doc_title then
output:insert(
"<dd><i style=\"font-size: larger;\">" .. pagetype ..
" တဏအ်ဝွံဟွံမွဲကဵု[[Help:စရၚ်ထာမ်ပလိက်ကဵုမဝ်ဂျူဂမၠိုၚ်|လိက်စၟတ်သမ္တီမချူလဝ်နကဵုမုက်လိက်ဂၠေံဂၠေံ]]။ " ..
(fallback_docs and "ဇကုမသ္ပမာန်နကဵု" or "သ္ပဂုန်တုဲ") ..
"[" .. doc_title:fullUrl{action = "ပလေဝ်ဒါန်", preload = preload}
.. " ဍဵုခၞံဗဒှ်ဏံညိ]။</i></dd>\n")
else
output:insert(
"<dd><i style=\"font-size: larger; color: #FF0000;\">Unable to auto-generate " ..
"documentation for this " .. pagetype ..".</i></dd>\n")
end
end
end
if startswith(title.fullText, "မဳဒဳယာဝဳကဳ:Gadget-") then
local is_gadget = false
for line in gline(new_title("မဳဒဳယာဝဳကဳ:Gadgets-definition").content) do
local gadget, items = line:match("^%*%s*(%a[%w_-]*)%[.-%]|(.+)$")
if not gadget then
gadget, items = line:match("^%*%s*(%a[%w_-]*)|(.+)$")
end
if gadget then
items = Array(split(items, "|"))
for i, item in ipairs(items) do
if title.fullText == ("မဳဒဳယာဝဳကဳ:Gadget-" .. item) then
is_gadget = true
output:insert("<dd> ''အက္ခရ်တဏအ်ဝွံဟွံသေၚ်ကဵုဒကုတ်ဆေၚ်စပ်ကဵု <code> လဵုဒှ်ဒှ်ရအဴ")
output:insert(gadget)
output:insert("</code> gadget ([")
output:insert(tostring(full_url("မဳဒဳယာဝဳကဳ:Gadgets-definition", {action = "ပလေဝ်ဒါန်"})))
output:insert(" edit definitions])'' <dl>")
output:insert("<dd> ''Description ([")
output:insert(tostring(full_url("မဳဒဳယာဝဳကဳ:Gadget-" .. gadget, {action = "ပလေဝ်ဒါန်"})))
output:insert(" ပလေဝ်ဒါန်])'': ")
output:insert(preprocess(new_message('Gadget-' .. gadget):plain()))
output:insert(" </dd>")
items:remove(i)
if #items > 0 then
for j, item in ipairs(items) do
items[j] = '[[မဳဒဳယာဝဳကဳ:Gadget-' .. item .. '|' .. item .. ']]'
end
output:insert("<dd> ''Other parts'': ")
output:insert(list_to_text(items))
output:insert("</dd>")
end
output:insert("</dl></dd>")
break
end
end
end
end
if not is_gadget then
output:insert("<dd> ''အက္ခရ်တဏအ်ဝွံဟွံသေၚ်ကဵုဒကုတ်ဆေၚ်စပ်ကဵု [")
output:insert(tostring(full_url("တၟေၚ်:ကိရိယာဂမၠိုၚ်", {uselang = "mnw"})))
output:insert(' gadget] ([')
output:insert(tostring(full_url("မဳဒဳယာဝဳကဳ:Gadgets-definition", {action = "ပလေဝ်ဒါန်"})))
output:insert(' ပလေဝ်ဒါန်ဝေါဟာအဓိပ္ပါဲဂမၠိုၚ်])လဵုဒှ်ဒှ်ရအဴ။</dd>')
-- else
-- cats:insert("ဂေက်ဂျေက်ဝိတ်ရှေန်နရဳဂမၠိုၚ်")
end
end
if old_doc_title then
output:insert("<dd> ''Redirected from'' [")
output:insert(old_doc_title:fullUrl{redirect = "ဟွံ"})
output:insert(" ")
output:insert(old_doc_title.fullText)
output:insert("] ([")
output:insert(old_doc_title:fullUrl{action = "ပလေဝ်ဒါန်"})
output:insert(" ပလေဝ်ဒါန်])။</dd>\n")
end
if not args.nolinks then
local links = Array()
if title.isSubpage and not args.notsubpage then
links:insert("[[:" .. title.nsText .. ":" .. title.rootText .. "|မုက်လိက်တံရိုဟ်]]")
links:insert("[[Special:PrefixIndex/" .. title.nsText .. ":" .. title.rootText .. "/|တံရိုဟ်မုက်လိက်ဂၠေံဂၠေံ]]")
else
links:insert("[[Special:PrefixIndex/" .. title.fullText .. "/|စရၚ်မုက်လိက်ဂၠေံဂၠေံ]]")
end
links:insert(
"[" .. tostring(full_url("တၟေၚ်:လေန်စၠောအ်နူလဵုရော/" .. title.fullText, {hidetrans = true, hideredirs = true})) .. " လေန်ဂမၠိုၚ်]")
if contentModel ~= "Scribunto" then
links:insert(
"[" .. tostring(full_url("တၟေၚ်:လေန်စၠောအ်နူလဵုရော/" .. title.fullText, {hidelinks = true, hidetrans = true})) .. " မပြံၚ်လှာဲဂၠံၚ်ဍာဲဂမၠိုၚ်]")
end
if is_script_or_stylesheet then
if user_name then
links:insert("[[Special:MyPage" .. title.text:sub(#title.rootText + 1) .. "|ဒြပ်ဇကု]]")
end
else
links:insert(
"[" .. tostring(full_url("တၟေၚ်:လေန်စၠောအ်နူလဵုရော/" .. title.fullText, {hidelinks = true, hideredirs = true})) .. " ပရေၚ်မပံၚ်စပ်ဂမၠိုၚ်]")
end
if contentModel == "Scribunto" then
local is_testcases = title.isSubpage and title.subpageText == "testcases"
local without_subpage = title.nsText .. ":" .. title.baseText
if is_testcases then
links:insert("[[:" .. without_subpage .. "|tested module]]")
else
links:insert("[[" .. title.fullText .. "/testcases|testcases]]")
end
if user_name then
links:insert("[[ညးလွပ်:" .. user_name .. "|မုက်လိက်ညးလွပ်]]")
links:insert("[[ညးလွပ် ဓရီုကျာ:" .. user_name .. "|မုက်လိက်ဓရီုကျာညးလွပ်]]")
links:insert("[[Special:PrefixIndex/ညးလွပ်:" .. user_name .. "/|လ္ဂာံညးလွပ်ဂမၠိုၚ်]]")
-- If sandbox module, add a link to the module that this is a sandbox of.
-- Exclude user sandbox modules like [[User:Dine2016/sandbox]].
elseif title.text:find("/sandbox%d*%f[/%z]") then
cats:insert("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
-- Sandbox modules don’t really need documentation.
needs_doc = false
-- Don't track user sandbox modules.
local text_title = new_title(title.text)
if not (text_title and text_title.namespace == 2) then
track("sandbox to be moved")
local sandbox_of, diff = title.baseText
if title_exists(sandbox_of) then
diff = " (" .. compare_pages(title.fullText, sandbox_of, "diff") .. ")"
else
track("no sandbox of")
end
links:insert("[[:" .. sandbox_of .. "|ကဠာသံၚ်ဗ္တဳမဆေၚ်စပ်ကဵု]]" .. (diff or ""))
end
-- If not a sandbox module, add link to sandbox module.
-- Sometimes there are multiple sandboxes for a single module:
-- [[Module:sa-pronunc/sandbox]], [[Module:sa-pronunc/sandbox2]].
-- Occasionally sandbox modules have their own subpages that are also
-- sandboxes: [[Module:grc-decl/sandbox/decl]].
else
local sandbox_title
if title.rootText == "grc-decl" then
sandbox_title = string_insert(title.fullText, 16, "/sandbox")
elseif is_testcases then
sandbox_title = title.fullText:gsub("/testcases", "/sandbox/testcases")
else
sandbox_title = title.fullText .. "/sandbox"
end
local sandbox_link = "[[:" .. sandbox_title .. "|ကဠာသံၚ်ဗ္တဳ]]"
local diff
if title_exists(sandbox_title) then
diff = " (" .. compare_pages(title.fullText, sandbox_title, "diff") .. ")"
end
links:insert(sandbox_link .. (diff or ""))
end
end
if title.nsText == "ထာမ်ပလိက်" then
-- Error search: all(any namespace), hastemplate (show pages using the template), insource (show source code), incategory (any/specific error) -- [[mw:Help:CirrusSearch]], [[w:Help:Searching/Regex]]
-- apparently same with/without: &profile=advanced&fulltext=1
local errorq = 'searchengineselect=mediawiki&search=all: hastemplate:\"'..title.rootText..'\" insource:\"'..title.rootText..'\" incategory:'
local eincategory = "Pages_with_module_errors|ParserFunction_errors|DisplayTitle_errors|Pages_with_ISBN_errors|Pages_with_ISSN_errors|Pages_with_reference_errors|Pages_with_syntax_highlighting_errors|Pages_with_TemplateStyles_errors"
links:insert(
'[' .. tostring(full_url('Special:Search', errorq..eincategory )) .. ' မဗၠေတ်ဗၠေၚ်ဂမၠိုၚ်]'
.. ' (' ..
'[' .. tostring(full_url('Special:Search', errorq..'ParserFunction_errors' )) .. ' မပါ်ပ္တိတ်တၞဟ်ခြာပိုဒ်]'
.. '/' ..
'[' .. tostring(full_url('Special:Search', errorq..'Pages_with_module_errors' )) .. ' မဝ်ဂျူ]'
.. ')'
)
if title.isSubpage and title.text:find("/sandbox%d*%f[/%z]") then -- This is a sandbox template.
-- At the moment there are no user sandbox templates with subpage
-- “/sandbox”.
cats:insert("ထာမ်ပလိက်ကဠာဗ္တဳဂမၠိုၚ်")
-- Sandbox templates don’t really need documentation.
needs_doc = false
-- Will behave badly if “/sandbox” occurs twice in title!
local sandbox_of = title.fullText:gsub("/sandbox%d*%f[/%z]", "")
local diff
if title_exists(sandbox_of) then
diff = " (" .. compare_pages(title.fullText, sandbox_of, "diff") .. ")"
else
track("no sandbox of")
end
links:insert("[[:" .. sandbox_of .. "|sandbox of]]" .. (diff or ""))
-- This is a template that can have a sandbox.
elseif not args.nosandbox then -- unless we tell it not to
local sandbox_title = title.fullText .. "/sandbox"
local diff
if title_exists(sandbox_title) then
diff = " (" .. compare_pages(title.fullText, sandbox_title, "diff") .. ")"
end
links:insert("[[:" .. sandbox_title .. "|ကဠာသံၚ်ဗ္တဳ]]" .. (diff or ""))
end
end
if #links > 0 then
output:insert("<dd> ''လေန်မရပ်စပ်သုၚ်စောဲ'': " .. links:concat(" • ") .. "</dd>")
end
end
output:insert("</dl>\n")
-- Show error from [[Module:category tree/topic cat/data]] on its submodules'
-- documentation to, for instance, warn about duplicate labels.
if startswith(title.fullText, "မဝ်ဂျူ:category tree/topic/") then
local ok, err = pcall(require, "မဝ်ဂျူ:category tree/topic/data")
if not ok then
output:insert('<span class="error">' .. err .. '</span>\n\n')
end
end
if doc_title and doc_title.exists then
-- Override automatic documentation, if present.
doc_content = expand_template{ title = doc_title.fullText }
elseif not doc_content and fallback_docs then
doc_content = expand_template{
title = fallback_docs,
args = {
['user'] = user_name,
['page'] = title.fullText,
['skin name'] = skin_name,
},
}
end
if doc_content then
output:insert(doc_content)
end
output:insert(('\n<%s style="clear: both;" />'):format(args.hr == "below" and "hr" or "br"))
if cats_auto_generated and not cats[1] and (not doc_content or not doc_content:find("%[%[ကဏ္ဍ:")) then
if contentModel == "Scribunto" then
cats:insert("Uncategorized modules")
-- elseif title.nsText == "ထာမ်ပလိက်" then
-- cats:insert("Uncategorized templates")
end
end
if needs_doc then
cats:insert("ထာမ်ပလိက်ကဵုမဝ်ဂျူမနွံပၟိက်လိက်စၟတ်မချူသမ္တီပတိုန်လဝ်ဂမၠိုၚ်")
end
for _, cat in ipairs(cats) do
output:insert("[[ကဏ္ဍ:" .. cat .. "]]")
end
output:insert("</div>\n")
return output:concat()
end
function export.module_auto_doc_table()
local parts = {}
local function ins(text)
insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Regex !! Category !! Handling modules")
for _, spec in ipairs(module_regex) do
local cat_text
local cats = spec.cat
if cats then
local cat_parts = {}
if type(cats) == "string" then
cats = {cats}
end
for _, cat in ipairs(cats) do
insert(cat_parts, ("<code>%s</code>"):format((cat:gsub("|", "|"))))
end
cat_text = concat(cat_parts, ", ")
else
cat_text = "''(unspecified)''"
end
ins("|-")
ins(("| <code>%s</code> || %s || %s"):format(spec.regex, cat_text,
is_callable(spec.process) and "''(handled internally)''" or
type(spec.process) == "string" and ("[[မဝ်ဂျူ:documentation/functions/%s]]"):format(spec.process) or
"''(no documentation generator)''"))
end
ins("|}")
return concat(parts, "\n")
end
-- Used by {{translit module documentation}}.
function export.translitModuleLangList(frame)
local pagename, subpage
if frame.args[1] then
pagename = frame.args[1]
else
local title = get_current_title()
subpage = title.subpageText
pagename = title.text
if subpage ~= pagename then
pagename = title.rootText
end
end
local translitModule = pagename
local languageObjects = require("မဝ်ဂျူ:languages/byTranslitModule")(translitModule)
local codeInPagename = pagename:match("^([%l-]+)%-.*translit$")
local categories = Array()
local codeInPagenameInList = false
if codeInPagename then
if languageObjects[1] and subpage ~= "documentation" or "doc" then
local agreement = languageObjects[2] and "ဂမၠိုၚ်" or ""
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူကၠာဲမအခဝ်မရပ်စပ်နူကဵု " ..
#languageObjects .. "အရေဝ်ဘာသာ" .. agreement .. "]]")
end
languageObjects = Array(languageObjects)
:filter(
function (lang)
local result = lang:getCode() ~= codeInPagename
codeInPagenameInList = codeInPagenameInList or result
return result
end)
end
if subpage ~= "documentation" or "doc" then
for script_code in pagename:gmatch("%f[^-%z]%u%l%l%l%f[-]") do
local script = get_script(script_code)
if script then
categories:insert("[[ကဏ္ဍ:" .. script:getCategoryName() .. "]]")
end
end
end
if subpage ~= "documentation" or "doc" and not title_exists("မဝ်ဂျူ:" .. pagename .. "/testcases") then
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူကၠာဲမအခဝ်လ္ပာ်မ္ၚးကိစ္စစမ်ၜတ်မုက်ဂၠေံဂၠေံဂမၠိုၚ်]]")
end
if not languageObjects[1] then
return categories:concat()
end
local langs = Array(languageObjects)
:sort(
function(lang1, lang2)
return lang1:getCode() < lang2:getCode()
end)
-- This will not error because languageObjects is not empty.
:map(languageObjects[1].makeCategoryLink)
:serialCommaJoin()
return "It is " .. ( codeInPagenameInList and "also" or "" ) ..
" used to transliterate " .. langs .. "." .. categories:concat()
end
-- Used by {{entry name module documentation}}.
function export.entryNameModuleLangList(frame)
local pagename, subpage
if frame.args[1] then
pagename = frame.args[1]
else
local title = get_current_title()
subpage = title.subpageText
pagename = title.text
if subpage ~= pagename then
pagename = title.rootText
end
end
local entryNameModule = pagename
local languageObjects = require("မဝ်ဂျူ:languages/byEntryNameModule")(entryNameModule)
local codeInPagename = pagename:match("^([%l-]+)%-.*entryname$")
local categories = Array()
local codeInPagenameInList = false
if codeInPagename then
if languageObjects[1] and subpage ~= "documentation" or "doc" then
local agreement = languageObjects[2] and "ဂမၠိုၚ်" or ""
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်မရပ်စပ်နူကဵု " ..
#languageObjects .. " အရေဝ်ဘာသာ" .. agreement .. "]]")
end
languageObjects = Array(languageObjects)
:filter(
function (lang)
local result = lang:getCode() ~= codeInPagename
codeInPagenameInList = codeInPagenameInList or result
return result
end)
end
if subpage ~= "documentation" or "doc" then
for script_code in pagename:gmatch("%f[^-%z]%u%l%l%l%f[-]") do
local script = get_script(script_code)
if script then
categories:insert("[[ကဏ္ဍ:" .. script:getCategoryName() .. "]]")
end
end
end
if subpage ~= "documentation" or "doc" and not title_exists("မဝ်ဂျူ:" .. pagename .. "/testcases") then
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူပွမကၠောန်ပ္တိတ်စုတ်ပၠောပ်ယၟုမနွံကဵုကိစ္စစမ်ၜတ်ရံၚ်မုက်လိက်ဂၠေံဂၠေံဂမၠိုၚ်]]")
end
if not languageObjects[1] then
return categories:concat()
end
local langs = Array(languageObjects)
:sort(
function(lang1, lang2)
return lang1:getCode() < lang2:getCode()
end)
-- This will not error because languageObjects is not empty.
:map(languageObjects[1].makeCategoryLink)
:serialCommaJoin()
return "It is " .. ( codeInPagenameInList and "also" or "" ) ..
" used to generate entry names for " .. langs .. "." .. categories:concat()
end
-- Used by {{sortkey module documentation}}.
function export.sortkeyModuleLangList(frame)
local pagename, subpage
if frame.args[1] then
pagename = frame.args[1]
else
local title = get_current_title()
subpage = title.subpageText
pagename = title.text
if subpage ~= pagename then
pagename = title.rootText
end
end
local sortkeyModule = pagename
local languageObjects = require("Module:languages/bySortkeyModule")(sortkeyModule)
local codeInPagename = pagename:match("^([%l-]+)%-.*sortkey$")
local categories = Array()
local codeInPagenameInList = false
if codeInPagename then
if languageObjects[1] and subpage ~= "documentation" or "doc" then
local agreement = languageObjects[2] and " " or ""
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူပွမကၠောန်ပ္တိတ်ပါ်အဇာကဳမရပ်နူကဵု " ..
#languageObjects .. agreement .. "ဘာသာဂမၠိုၚ်]]")
end
languageObjects = Array(languageObjects)
:filter(
function (lang)
local result = lang:getCode() ~= codeInPagename
codeInPagenameInList = codeInPagenameInList or result
return result
end)
end
if subpage ~= "documentation" or "doc" then
for script_code in pagename:gmatch("%f[^-%z]%u%l%l%l%f[-]") do
local script = get_script(script_code)
if script then
categories:insert("[[ကဏ္ဍ:" .. script:getCategoryName() .. "]]")
end
end
end
if subpage ~= "documentation" or "doc" and not title_exists("မဝ်ဂျူ:" .. pagename .. "/testcases") then
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူပွမကၠောန်ပ္တိတ်ပါ်အဇာကဳမနွံကဵုကိစ္စစမ်ၜတ်ရံၚ်မုက်လိက်ဂၠေံဂၠေံဂမၠိုၚ်]]")
end
if not languageObjects[1] then
return categories:concat()
end
local langs = Array(languageObjects)
:sort(
function(lang1, lang2)
return lang1:getCode() < lang2:getCode()
end)
-- This will not error because languageObjects is not empty.
:map(languageObjects[1].makeCategoryLink)
:serialCommaJoin()
return "It is " .. ( codeInPagenameInList and "also" or "" ) ..
" used to sort " .. langs .. "." .. categories:concat()
end
return export
189lj3cm6j9nxspns1h7ko63navzcoh
385838
385834
2026-04-07T09:21:33Z
咽頭べさ
33
385838
Scribunto
text/plain
local export = {}
local array_module = "Module:array"
local debug_track_module = "Module:debug/track"
local frame_module = "Module:frame"
local fun_is_callable_module = "Module:fun/isCallable"
local languages_module = "Module:languages"
local links_module = "Module:links"
local load_module = "Module:load"
local module_categorization_module = "Module:module categorization"
local number_list_show_module = "Module:number list/show"
local pages_module = "Module:pages"
local parameters_module = "Module:parameters"
local scripts_module = "Module:scripts"
local string_endswith_module = "Module:string/endswith"
local string_gline_module = "Module:string/gline"
local string_insert_module = "Module:string/insert"
local string_startswith_module = "Module:string/startswith"
local string_utilities_module = "Module:string utilities"
local template_parser_module = "Module:template parser"
local title_exists_module = "Module:title/exists"
local title_new_title_module = "Module:title/newTitle"
local concat = table.concat
local error = error
local full_url = mw.uri.fullUrl
local get_current_title = mw.title.getCurrentTitle
local insert = table.insert
local ipairs = ipairs
local list_to_text = mw.text.listToText
local new_message = mw.message.new
local pcall = pcall
local require = require
local tonumber = tonumber
local tostring = tostring
local type = type
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local function Array(...)
Array = require(array_module)
return Array(...)
end
local function categorize_module(...)
categorize_module = require(module_categorization_module).categorize
return categorize_module(...)
end
local function debug_track(...)
debug_track = require(debug_track_module)
return debug_track(...)
end
local function endswith(...)
endswith = require(string_endswith_module)
return endswith(...)
end
local function expand_template(...)
expand_template = require(frame_module).expandTemplate
return expand_template(...)
end
local function find_templates(...)
find_templates = require(template_parser_module).find_templates
return find_templates(...)
end
local function full_link(...)
full_link = require(links_module).full_link
return full_link(...)
end
local function get_lang(...)
get_lang = require(languages_module).getByCode
return get_lang(...)
end
local function get_pagetype(...)
get_pagetype = require(pages_module).get_pagetype
return get_pagetype(...)
end
local function get_script(...)
get_script = require(scripts_module).getByCode
return get_script(...)
end
local function gline(...)
gline = require(string_gline_module)
return gline(...)
end
local function is_callable(...)
is_callable = require(fun_is_callable_module)
return is_callable(...)
end
local function is_documentation(...)
is_documentation = require(pages_module).is_documentation
return is_documentation(...)
end
local function is_sandbox(...)
is_sandbox = require(pages_module).is_sandbox
return is_sandbox(...)
end
local function new_title(...)
new_title = require(title_new_title_module)
return new_title(...)
end
local function number_list_show_table(...)
number_list_show_table = require(number_list_show_module).table
return number_list_show_table(...)
end
local function preprocess(...)
preprocess = require(frame_module).preprocess
return preprocess(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function safe_load_data(...)
safe_load_data = require(load_module).safe_load_data
return safe_load_data(...)
end
local function split(...)
split = require(string_utilities_module).split
return split(...)
end
local function startswith(...)
startswith = require(string_startswith_module)
return startswith(...)
end
local function string_insert(...)
string_insert = require(string_insert_module)
return string_insert(...)
end
local function title_exists(...)
title_exists = require(title_exists_module)
return title_exists(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local skins = {
["common" ] = "";
["vector" ] = "Vector";
["monobook" ] = "Monobook";
["cologneblue"] = "Cologne Blue";
["modern" ] = "Modern";
}
local function track(page)
debug_track("documentation/" .. page)
return true
end
local function compare_pages(page1, page2, text)
return "[" .. tostring(
full_url("Special:ComparePages", {page1 = page1, page2 = page2}))
.. " " .. text .. "]"
end
-- Avoid transcluding [[Module:languages/cache]] everywhere.
local lang_cache = setmetatable({}, { __index = function (self, k)
return require("မဝ်ဂျူ:languages/cache")[k]
end })
local function zh_link(word)
return full_link{
lang = lang_cache.zh,
term = word
}
end
local function make_languages_data_documentation(title, cats, division)
local doc_template, module_cat
if endswith(division, "/extra") then
division = division:sub(1, -7)
doc_template = "language extradata documentation"
module_cat = "စရၚ်မဝ်ဂျူအရေဝ်ဘာသာရပ်စပ်အပဵုဂမၠိုၚ်"
else
doc_template = "language data documentation"
module_cat = "မဝ်ဂျူစရၚ်အရေဝ်ဘာသာဂမၠိုၚ်"
end
local sort_key
if division == "exceptional" then
sort_key = "x"
else
sort_key = division:gsub("/", "")
end
cats:insert(module_cat .. "|" .. sort_key)
return {
title = doc_template
}
end
local function make_Unicode_data_documentation(title, cats)
local subpage, first_three_of_code_point
= title.fullText:match("^မဝ်ဂျူ:Unicode data/([^/]+)/(%x%x%x)$")
if subpage == "names" or subpage == "images" or subpage == "emoji images" then
local low, high =
tonumber(first_three_of_code_point .. "000", 16),
tonumber(first_three_of_code_point .. "FFF", 16)
local text, text_type
if subpage == "names" then
text_type = "titles of images"
elseif subpage == "images" then
text_type = "titles of images"
elseif subpage == "emoji images" then
text_type = "emoji-style images"
end
text = string.format(
"This data module contains the " .. text_type .. " of " ..
"[[Appendix:Unicode|Unicode]] code points within the range U+%04X to U+%04X.",
low, high)
if subpage == "images" and safe_load_data("Module:Unicode data/emoji images/" .. first_three_of_code_point) then
text = text .. " This list includes the text variants of emojis. For the list of emoji variants of those characters, see [[Module:Unicode data/emoji images/" .. first_three_of_code_point .. "]]."
elseif subpage == "emoji images" then
text = text .. " For text-style images, see [[Module:Unicode data/images/" .. first_three_of_code_point .. "]]."
end
return text
end
end
local function insert_lang_data_module_cats(cats, langcode, overall_data_module_cat)
local lang = lang_cache[langcode]
if lang then
local langname
if lang._fullCode then
langname = lang_cache[lang._fullCode]:getCanonicalName()
else
langname = lang:getCanonicalName()
end
cats:insert(overall_data_module_cat .. "|" .. langname)
cats:insert("မဝ်ဂျူ" .. langname .. "ဂမၠိုၚ်")
cats:insert("စရၚ်မဝ်ဂျူ" .. langname .. "ဂမၠိုၚ်")
return lang, langname
end
end
--[=[
This provides categories and documentation for various data modules, so that [[Category:Uncategorized modules]] isn't
unnecessarily cluttered. It is a list of tables, each of which have the following possible fields:
`regex` (required): A Lua pattern to match the module's title. If it matches, the data in this entry will be used.
Any captures in the pattern can by referenced in the `cat` field using %1 for the first capture, %2 for the
second, etc. (often used for creating the sortkey for the category). In addition, the captures are passed to the
`process` function as the third and subsequent parameters.
`process` (optional): This may be a function or a string. If it is a function, it is called as follows:
`process(TITLE, CATS, CAPTURE1, CAPTURE2, ...)`
where:
* TITLE is a title object describing the module's title; see
[https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects].
* CATS is an array object (see [[Module:array]]) of categories that the module will be added to.
* CAPTURE1, CAPTURE2, ... contain any captures in the `regex` field.
The return value of `process` should either be a string (which will be used as the module's documentation), or a
table specifying the name of a template to expand to get the documentation, along with the arguments to that
template. In the latter format, the template name (bare, without the "Template:" prefix) should be in the `title`
field, and any arguments should be in `args; in this case, the template name will be listed above the generated
documentation as the source of the documentation, along with an edit button to edit the template's contents.
If, however, the return value of the `process` function is a string, any template invocations will be expanded
using frame:preprocess(), and [[Module:documentation]] will be listed as the source of the documentation.
If `process` itself is a string rather than a function, it should name a submodule under
[[Module:documentation/functions/]] which returns a function, of the same type as described above. This submodule
will be specified as the source of the documentation (unless it returns a table naming a template to expand to get
the documentation, as described above).
If `process` is omitted entirely, the module will have no documentation.
`cat` (optional): A string naming the category into which the module should be placed, or a list of such strings.
Captures specified in `regex` may be referenced in this string using %1 for the first capture, %2 for the second,
etc. It is also possible to add categories in the `process` function by inserting them into the passed-in CATS
array (the second parameter).
]=]
local module_regex = {
{
regex = "^မဝ်ဂျူ:languages/data/(3/%l/extra)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(3/%l)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(2/extra)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(2)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(exceptional/extra)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/data/(exceptional)$",
process = make_languages_data_documentation,
},
{
regex = "^မဝ်ဂျူ:languages/.+$",
cat = "မဝ်ဂျူအရေဝ်ဘာသာကဵုအက္ခရ်ဂမၠိုၚ်",
},
{
regex = "^မဝ်ဂျူ:scripts/.+$",
cat = "မဝ်ဂျူအရေဝ်ဘာသာကဵုအက္ခရ်ဂမၠိုၚ်",
},
{
regex = "^မဝ်ဂျူ:data tables/data..?.?.?$",
cat = "နိဿဲပါ်ခြာမဝ်ဂျူစရၚ်အၚ်ဂမၠိုၚ်",
},
{
regex = "^မဝ်ဂျူ:zh/data/dial%-pron/.+$",
cat = "စရၚ်မဝ်ဂျူဆေၚ်စပ်ကဵုပ္တိတ်ရမျာၚ်အရေဝ်တၞဟ်ခြာဘာသာကြုက်ဂမၠိုၚ်",
process = "zh dial or syn",
},
{
regex = "^မဝ်ဂျူ:zh/data/dial%-syn/.+$",
cat = "စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်နကဵုဘာသာကြုက်ဂမၠိုၚ်",
process = "zh dial or syn",
},
{
regex = "^မဝ်ဂျူ:zh/data/glyph%-data/.+$",
cat = "စရၚ်မဝ်ဂျူဗျဉ်ကြုက်ဗီုပြၚ်မဆေၚ်စပ်ကဵုဝၚ်ဂမၠိုၚ်",
process = function(title, cats)
local character = title.fullText:match("^မဝ်ဂျူ:zh/data/glyph%-data/(.+)")
if character then
return ("မဝ်ဂျူတဏအ်မထိၚ်ဒဝ်လဝ်စရၚ်လ္တူမဆေၚ်စပ်ကဵုဝၚ်ဗီုပြၚ်ဗျဉ်ကြုက်နကဵုဝေါဟာ %s။")
:format(zh_link(character))
end
end,
},
{
regex = "^မဝ်ဂျူ:zh/data/ltc%-pron/(.+)$",
cat = "စရၚ်ပတိတ်ရမျာၚ်မဝ်ဂျူကြုက်လဒေါဝ်ဂမၠိုၚ်|%1",
process = "zh data",
},
{
regex = "^မဝ်ဂျူ:zh/data/och%-pron%-BS/(.+)$",
cat = "မဝ်ဂျူဒေတာဗွဟ်ရမ္သာၚ်(Baxter-Sagart)ကြုက်တြေံဂမၠိုၚ်|%1",
process = "zh data",
},
{
regex = "^မဝ်ဂျူ:zh/data/och%-pron%-ZS/(.+)$",
cat = "စရၚ်မဝ်ဂျူကြုက်တြေံဗီုပတိတ်ရမျာၚ် (Zhengzhang) ဂမၠိုၚ်|%1",
process = "zh data",
},
{
-- capture rest of zh/data submodules
regex = "^မဝ်ဂျူ:zh/data/(.+)$",
cat = "စရၚ်မဝ်ဂျူကြုက်ဂမၠိုၚ်|%1",
},
{
regex = "^မဝ်ဂျူ:mul/guoxue%-data/cjk%-?(.*)$",
process = "guoxue-data",
},
{
regex = "^မဝ်ဂျူ:Unicode data/(.+)$",
cat = "မဝ်ဂျူစရၚ်ယူနဳကုတ်ဂမၠိုၚ်|%1",
process = make_Unicode_data_documentation,
},
{
regex = "^မဝ်ဂျူ:number list/data/(.+)$",
process = function(title, cats, lang_code)
local lang = insert_lang_data_module_cats(cats, lang_code, "မဝ်ဂျူစရၚ်ဂၞန်ဂမၠိုၚ်")
if lang then
return ("This module contains data on various types of numbers in %s.\n%s")
:format(lang:makeCategoryLink(), number_list_show_table() or "")
end
end,
},
{
regex = "^မဝ်ဂျူ:accel/(.+)$",
process = function(title, cats)
local lang_code = title.subpageText
local lang = lang_cache[lang_code]
if lang then
cats:insert("မဝ်ဂျူ" .. lang:getCanonicalName() .. "ဂမၠိုၚ်|accel")
cats:insert(("မဝ်ဂျူဒကုတ်ဍောတ်အေက်သာယ်ဂမၠိုၚ်|%s"):format(lang:getCanonicalName()))
return ("This module contains new entry creation rules for %s; see [[WT:ACCEL]] for an overview, and [[Module:accel]] for information on creating new rules.")
:format(lang:makeCategoryLink())
end
end,
},
{
regex = "^မဝ်ဂျူ:inc%-ash/dial/data/(.+)$",
cat = "မဝ်ဂျူအခါန်ကာန် ပရာကရေတ်ဂမၠိုၚ်|%1",
process = function(title, cats)
local word = title.fullText:match("^မဝ်ဂျူ:inc%-ash/dial/data/(.+)$")
if word then
local lang = lang_cache["inc-ash"]
return ("This module contains data on the pronunciation of %s in dialects of %s.")
:format(full_link({ term = word, lang = lang }, "term"),
lang:makeCategoryLink())
end
end,
},
{
regex = "^.+%-translit$",
process = "translit",
},
{
regex = "^မဝ်ဂျူ:form of/lang%-data/(.+)$",
process = function(title, cats, lang_code)
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "စရၚ်မဝ်ဂျူကွက်ဒက်စုတ်သမ္တီအရေဝ်ဘာသာချိုတ်ချိုတ်ပၠိုတ်ပၠိုတ်ဂမၠိုၚ်")
if lang then
-- FIXME, display more info.
return "This module contains language-specific form-of data (tags, shortcuts, base lemma params. etc.) for " ..
langname .. "."
end
end
},
{
regex = "^မဝ်ဂျူ:labels/data/lang/(.+)$",
process = function(title, cats, lang_code)
local lang = insert_lang_data_module_cats(cats, lang_code, "စရၚ်မဝ်ဂျူကွက်ဒက်စုတ်သမ္တီအရေဝ်ဘာသာချိုတ်ချိုတ်ပၠိုတ်ပၠိုတ်ဂမၠိုၚ်")
if lang then
return {
title = "label language-specific data documentation",
args = { [1] = lang_code },
}
end
end
},
{
regex = "^မဝ်ဂျူ:category tree/lang/(.+)$",
process = function(title, cats, lang_code)
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "တၞံမဝ်ဂျူဂၠေံဂၠေံဂမၠိုၚ်/ကဏ္ဍဒကုတ်တံလိက်")
if lang then
return "This module handles generating the descriptions and categorization for " .. langname .. " category pages "
.. "of the format \"" .. langname .. " LABEL\" where LABEL can be any text. Examples are "
.. "[[:Category:Bulgarian conjugation 2.1 verbs]] and [[:Category:Russian velar-stem neuter-form nouns]]. "
.. "This module is part of the category tree system, which is a general framework for generating the "
.. "descriptions and categorization of category pages.\n\n"
.. "For more information, see [[Module:category tree/lang/documentation]].\n\n"
.. "'''NOTE:''' If you add a new language-specific module, you must add the language code to the "
.. "list at the top of [[Module:category tree/lang]] in order for the module to be recognized."
end
end
},
{
regex = "^မဝ်ဂျူ:category tree/topic/(.+)$",
process = function(title, cats, submodule)
cats:insert("ကဏ္ဍတၞံစရၚ်မဝ်ဂျူဂမၠိုၚ်/ပရောပရာသဳကၠဳ| ")
return {
title = "topic cat data submodule documentation"
}
end
},
{
regex = "^မဝ်ဂျူ:category tree/(.+)$",
process = function(title, cats, submodule)
cats:insert("တၞံမဝ်ဂျူဂၠေံဂၠေံဂမၠိုၚ်/ကဏ္ဍဒကုတ်တံလိက်| ")
return {
title = "category tree data submodule documentation"
}
end
},
{
regex = "^မဝ်ဂျူ:ja/data/(.+)$",
cat = "စရၚ်မဝ်ဂျူဂျပါန်ဂမၠိုၚ်|%1",
},
{
regex = "^မဝ်ဂျူ:fi%-dialects/data/feature/Kettunen1940 ([0-9]+)$",
cat = "စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာနကဵုဘာသာဖေန်လာန်ဂမၠိုၚ်|%1",
process = function(title, cats, shard)
return "This module contains shard " .. shard .. " of the online version of Lauri Kettunen's 1940 work " ..
"''Suomen murteet III A. Murrekartasto'' (\"Finnish dialects III A: Dialect atlas\"). " ..
"It was imported and converted from urn:nbn:fi:csc-kata20151130145346403821, published by the " ..
"''Kotimaisten kielten keskus'' under the CC BY 4.0 license."
end
},
{
regex = "^မဝ်ဂျူ:fi%-dialects/data/feature/(.+)",
cat = "စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာနကဵုဘာသာဖေန်လာန်ဂမၠိုၚ်|%1",
},
{
regex = "^မဝ်ဂျူ:fi%-dialects/data/word/(.+)",
cat = "စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာနကဵုဘာသာဖေန်လာန်ဂမၠိုၚ်|%1",
},
{
regex = "^မဝ်ဂျူ:Swadesh/data/([%l-]+)$",
process = function(title, cats, lang_code)
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "မဝ်ဂျူသွဳဒေါတ်ဂမၠိုၚ်")
if lang then
return "မဝ်ဂျူတဏအ်ဝွံ မဆက်ဆောံဆေၚ်စပ်ကဵုစရၚ်သွဳဒေါတ်နကဵုဝေါဟာတံမူလအပ္ဍဲဘာသာ" .. langname .. "ဂမၠိုၚ်။"
end
end
},
{
regex = "^မဝ်ဂျူ:Swadesh/data/([%l-]+)/([^/]*)$",
process = function(title, cats, lang_code, variety)
local lang, langname = insert_lang_data_module_cats(cats, lang_code, "မဝ်ဂျူသွဳဒေါတ်ဂမၠိုၚ်")
if lang then
local prefix = "မဝ်ဂျူတဏအ်ဝွံ မဆက်ဆောံဆေၚ်စပ်ကဵုစရၚ်သွဳဒေါတ်နကဵုဝေါဟာတံမူလအပ္ဍဲ "
local etym_lang = get_lang(variety, nil, " ")
if etym_lang then
return ("%s %s သီုကဵုအရာနာနာသာ်နူ %sဂမၠိုၚ်။"):format(prefix, etym_lang:getCanonicalName(), langname)
end
local script = get_script(variety)
if script then
return ("သဵုကဵုအက္ခရ် %s %s %s ဂမၠိုၚ်။"):format(prefix, langname, script:getCanonicalName())
end
return ("%s %s သီုကဵုအရာနာနာသာ်နူ %sဂမၠိုၚ်။"):format(prefix, variety, langname)
end
end
},
{
regex = "^မဝ်ဂျူ:typing%-aids",
process = function(title, cats)
local data_suffix = title.fullText:match("^မဝ်ဂျူ:typing%-aids/data/(.+)$")
local sortkey
if data_suffix then
if data_suffix:find "^[%l-]+$" then
local lang = get_lang(data_suffix)
if lang then
sortkey = lang:getCanonicalName()
cats:insert("စရၚ်မဝ်ဂျူ" .. sortkey .. "ဂမၠိုၚ်")
end
elseif data_suffix:find "^%u%l%l%l$" then
local script = get_script(data_suffix)
if script then
sortkey = script:getCanonicalName()
cats:insert(script:getCategoryName())
end
end
cats:insert("စရၚ်မဝ်ဂျူမစုတ်ပၠောပ်ဗျဉ်ဂမၠိုၚ်|" .. (sortkey or data_suffix))
end
end,
},
{
regex = "^မဝ်ဂျူ:R:([%l-]+):(.+)$",
process = function(title, cats, lang_code, refname)
local lang = lang_cache[lang_code]
if lang then
cats:insert("မဝ်ဂျူ" .. lang:getCanonicalName() .. "ဂမၠိုၚ်|" .. refname)
cats:insert(("မဝ်ဂျူနိဿဲဂမၠိုၚ်|%s"):format(lang:getCanonicalName()))
return "မဝ်ဂျူတဏအ်ဝွံ မရပ်စပ်ဆေၚ်စပ်ကဵုထာမ်ပလိက်နိဿဲနကဵု {{temp|R:" .. lang_code .. ":" .. refname .. "}}ဂမၠိုၚ်။"
end
end,
},
{
regex = "^မဝ်ဂျူ:Quotations/([%l-]+)/?(.*)",
process = "Quotation",
},
{
regex = "^မဝ်ဂျူ:affix/lang%-data/([%l-]+)",
process = "affix lang-data",
},
{
regex = "^မဝ်ဂျူ:dialect synonyms/([%l-]+)$",
process = function(title, cats, lang_code)
local lang = lang_cache[lang_code]
if lang then
local langname = lang:getCanonicalName()
cats:insert("စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်ဂမၠိုၚ်|" .. langname)
cats:insert("စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်နကဵုဘာသာ" .. langname .. "ဂမၠိုၚ်| ")
return "မဝ်ဂျူတဏအ်ဝွံ မဆက်ဆောံစရၚ်လ္တူအရာနာနာသာ်ဗွဲတၟေၚ်ဆေၚ်စပ်ကဵုဘာသာ" .. langname .. "၊ သွက်မရပ်စပ်နူကဵု " ..
"ဝေါဟာဇာတိအဓိပ္ပါဲတုပ်ဂမၠိုၚ်။ ဆေၚ်စပ်ကဵုဝေါဟာမဆက်ဆောံအဓိပ္ပါဲတုပ်အဇေတ်အဍာံဂှ်မနွံဒၟံၚ်ပ္ဍဲမဝ်ဂျူတန်ဍောတ်ဂမၠိုၚ်။\n\n" ..
expand_template({ title = 'dial syn', args = { lang_code, ["demo mode"] = "y" } })
end
end,
},
{
regex = "^မဝ်ဂျူ:dialect synonyms/([%l-]+)/(.+)$",
process = function(title, cats, lang_code, term)
local lang = lang_cache[lang_code]
if lang then
local langname = lang:getCanonicalName()
cats:insert("စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်ဂမၠိုၚ်|" .. langname)
cats:insert("စရၚ်မဝ်ဂျူအရေဝ်တၞဟ်ခြာအဓိပ္ပာဲတုပ်နကဵုဘာသာ" .. langname .. "ဂမၠိုၚ်|" .. term)
return ("မဝ်ဂျူတဏအ်ဝွံ မဆက်ဆောံပွံၚ်အဓိပ္ပါဲ %s နကဵုဝေါဟာအဓိပ္ပါဲတုပ်သွက် {{m|%s|%s}} ဂမၠိုၚ်။\n\n%s"):format(langname, lang_code, term, expand_template({ title = 'dial syn', args = { lang_code, term } }))
end
end,
},
{
regex = "^မဝ်ဂျူ:bibliography/data/([%l-]+)$",
process = function(title, cats, lang_code)
if lang_code == "preload" then
return 'Used as a base model for other languages when the button "create new language submodule" is clicked.'
end
local page = require(title.fullText).bib_page
if not page then
page = lang_cache[lang_code]:getCanonicalName()
if page then
cats:insert("မဝ်ဂျူ"..page.."ဂမၠိုၚ်")
end
end
cats:insert("မဝ်ဂျူနိဿဲဂမၠိုၚ်")
return "This module holds bibliographical data for "..page..". For the formatted bibliography see '''[[Appendix:Bibliography/"..page.."]]'''."
end,
},
}
function export.show(frame)
local boolean_default_false = {type = "boolean", default = false}
local args = process_params(frame.args, {
["hr"] = true,
["for"] = true,
["from"] = true,
["allowondoc"] = boolean_default_false, -- Don't throw an error if used on a documentation subpage.
["notsubpage"] = boolean_default_false,
["nodoc"] = boolean_default_false,
["nolinks"] = boolean_default_false, -- suppress all "Useful links"
["nosandbox"] = boolean_default_false, -- supress sandbox
})
local output = Array('\n<div class="documentation" style="display:block; clear:both">\n')
local cats = Array()
local nodoc = args.nodoc
if (not args.hr) or (args.hr == "above") then
output:insert("----\n")
end
local title = args["for"] and new_title(args["for"]) or get_current_title()
local doc_title = args.from ~= "-" and new_title(args.from or title.fullText .. '/documentation') or nil
local contentModel = title.contentModel
local pagetype, is_script_or_stylesheet = get_pagetype(title)
local preload, fallback_docs, doc_content, old_doc_title, user_name, skin_name, needs_doc
local doc_content_source = "မဝ်ဂျူ:documentation"
local auto_generated_cat_source
local cats_auto_generated = false
if not args.allowondoc and is_documentation(title) then
-- TODO: merge with {{documentation subpage}}, and choose behaviour based on the page type.
error("This template should not be used on a documentation page. Please use [[Template:documentation subpage]].")
elseif is_sandbox(title) then
local sandbox_ns = title.nsText
preload = ("ထာမ်ပလိက်:documentation/preload%s%sSandbox"):format(
sandbox_ns == "မဝ်ဂျူ" and sandbox_ns or "ထာမ်ပလိက်",
title.rootText:match("^[Uu]ser:(.+)") and "ညးလွပ်" or ""
)
elseif pagetype:match("%f[%w]gadget%f[%W]") then
preload = "ထာမ်ပလိက်:documentation/preloadGadget"
elseif pagetype:match("%f[%w]script%f[%W]") then -- .js
if title.nsText == "မဳဒဳယာဝဳကဳ" then
preload = "ထာမ်ပလိက်:documentation/preloadMediaWikiJavaScript"
else
preload = "ထာမ်ပလိက်:documentation/preloadTemplate" -- XXX
if title.nsText == "ညးလွပ်" then
user_name = title.rootText
end
end
is_script_or_stylesheet = true
elseif pagetype:match("%f[%w]stylesheet%f[%W]") then -- .css
preload = "ထာမ်ပလိက်:documentation/preloadTemplate" -- XXX
if title.nsText == "ညးလွပ်" then
user_name = title.rootText
end
is_script_or_stylesheet = true
elseif contentModel == "Scribunto" then -- Exclude pages in Module: which aren't Scribunto.
preload = "ထာမ်ပလိက်:documentation/preloadModule"
elseif pagetype:match("%f[%w]template%f[%W]") or pagetype:match("%f[%w]project%f[%W]") then
preload = "ထာမ်ပလိက်:documentation/preloadTemplate"
end
if doc_title and doc_title.isRedirect then
old_doc_title = doc_title
doc_title = doc_title.redirectTarget
end
output:insert("<dl class=\"plainlinks\" style=\"font-size: smaller;\">")
local function get_module_doc_and_cats(categories_only)
cats_auto_generated = true
local automatic_cats = nil
if user_name then
fallback_docs = "documentation/fallback/user module"
automatic_cats = {"မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်"}
else
for _, data in ipairs(module_regex) do
local captures = {umatch(title.fullText, data.regex)}
if #captures > 0 then
local cat, process_function
if is_callable(data.process) then
process_function = data.process
elseif type(data.process) == "string" then
doc_content_source = "မဝ်ဂျူ:documentation/functions/" .. data.process
process_function = require(doc_content_source)
end
if process_function then
doc_content = process_function(title, cats, unpack(captures))
end
if type(doc_content) == "table" then
doc_content_source = doc_content.title and "ထာမ်ပလိက်:" .. doc_content.title or doc_content_source
doc_content = expand_template(doc_content)
elseif doc_content ~= nil then
doc_content = preprocess(doc_content)
end
cat = data.cat
if cat then
if type(cat) == "string" then
cat = {cat}
end
for _, c in ipairs(cat) do
insert(cats, (ugsub(title.fullText, data.regex, c)))
end
end
break
end
end
end
if title.subpageText == "ထာမ်ပလိက်" then
cats:insert("မဝ်ဂျူထာမ်ပလိက်အိန်တာဖှေတ်ဂမၠိုၚ်")
end
if automatic_cats then
for _, c in ipairs(automatic_cats) do
cats:insert(c)
end
end
if #cats == 0 then
local auto_cats = categorize_module(frame, "return raw", "noerror")
if #auto_cats > 0 then
auto_generated_cat_source = "မဝ်ဂျူ:module categorization"
end
for _, category in ipairs(auto_cats) do
cats:insert(category)
end
end
-- meaning module is not in user’s sandbox or one of many datamodule boring series
needs_doc = not categories_only and not (automatic_cats or doc_content or fallback_docs)
end
-- Override automatic documentation, if present.
if doc_title and doc_title.exists then
local cats_auto_generated_text = ""
if contentModel == "Scribunto" then
local doc_page_content = doc_title.content
-- Track then do nothing if there are uses of includeonly. The
-- pattern is slightly too permissive, but any false-positives are
-- obvious typos that should be corrected.
if doc_page_content:lower():match("</?includeonly%f[%s/>][^>]*>") then
track("module-includeonly")
else
-- Check for uses of {{module cat}}. find_templates treats the
-- input as transcluded by default (i.e. it parses the wikitext
-- which will be transcluded through to the module page).
local module_cat
for template in find_templates(doc_page_content) do
if template:get_name() == "module cat" then
module_cat = true
break
end
end
if not module_cat then
get_module_doc_and_cats("categories only")
auto_generated_cat_source = auto_generated_cat_source or doc_content_source
cats_auto_generated_text = " Categories were auto-generated by [[" .. auto_generated_cat_source .. "]]. <sup>[[" ..
new_title(auto_generated_cat_source):fullUrl{action = "ပလေဝ်ဒါန်"} .. " ပလေဝ်ဒါန်]]</sup>"
end
end
end
output:insert(
"<dd><i style=\"font-size: larger;\">ပွမဗက် " ..
"[[Help:စရၚ်ထာမ်ပလိက်ကဵုမဝ်ဂျူဂမၠိုၚ်|လိက်စၟတ်သမ္တီ]]မချူလဝ်နကဵုခၞံဗဒှ်အပ္ဍဲ [[" ..
doc_title.fullText .. "]]အတေံ။ " .. "<sup>[[" .. doc_title:fullUrl{action = "ပလေဝ်ဒါန်"} .. " ပလေဝ်ဒါန်]]</sup>" ..
cats_auto_generated_text .. "</i></dd>")
else
if contentModel == "Scribunto" then
get_module_doc_and_cats(false)
elseif title.nsText == "ထာမ်ပလိက်" then
--cats:insert("Uncategorized templates")
needs_doc = not (fallback_docs or nodoc)
elseif user_name and is_script_or_stylesheet then
skin_name = skins[title.text:sub(#title.rootText + 1):match("^/(%l+)%.[jc]ss?$")]
if skin_name then
fallback_docs = "documentation/fallback/user " .. contentModel
end
end
if doc_content then
output:insert(
"<dd><i style=\"font-size: larger;\">မဆေၚ်စပ်ကဵုပွမဗက်က္ကရဴ " ..
"[[Help:စရၚ်ထာမ်ပလိက်ကဵုမဝ်ဂျူဂမၠိုၚ်|လိက်စၟတ်သမ္တီမချူလဝ်]]ဂှ် " ..
"ကၠောန်ပ္တိတ်လဝ်နူကဵု [[" .. doc_content_source .. "]]။ <sup>[[" ..
new_title(doc_content_source):fullUrl{action = "ပလေဝ်ဒါန်"} ..
" ပလေဝ်ဒါန်]]</sup> </i></dd>")
elseif not nodoc then
if doc_title then
output:insert(
"<dd><i style=\"font-size: larger;\">" .. pagetype ..
" တဏအ်ဝွံဟွံမွဲကဵု[[Help:စရၚ်ထာမ်ပလိက်ကဵုမဝ်ဂျူဂမၠိုၚ်|လိက်စၟတ်သမ္တီမချူလဝ်နကဵုမုက်လိက်ဂၠေံဂၠေံ]]။ " ..
(fallback_docs and "ဇကုမသ္ပမာန်နကဵု" or "သ္ပဂုန်တုဲ") ..
"[" .. doc_title:fullUrl{action = "ပလေဝ်ဒါန်", preload = preload}
.. " ဍဵုခၞံဗဒှ်ဏံညိ]။</i></dd>\n")
else
output:insert(
"<dd><i style=\"font-size: larger; color: #FF0000;\">Unable to auto-generate " ..
"documentation for this " .. pagetype ..".</i></dd>\n")
end
end
end
if startswith(title.fullText, "မဳဒဳယာဝဳကဳ:Gadget-") then
local is_gadget = false
for line in gline(new_title("မဳဒဳယာဝဳကဳ:Gadgets-definition").content) do
local gadget, items = line:match("^%*%s*(%a[%w_-]*)%[.-%]|(.+)$")
if not gadget then
gadget, items = line:match("^%*%s*(%a[%w_-]*)|(.+)$")
end
if gadget then
items = Array(split(items, "|"))
for i, item in ipairs(items) do
if title.fullText == ("မဳဒဳယာဝဳကဳ:Gadget-" .. item) then
is_gadget = true
output:insert("<dd> ''အက္ခရ်တဏအ်ဝွံဟွံသေၚ်ကဵုဒကုတ်ဆေၚ်စပ်ကဵု <code> လဵုဒှ်ဒှ်ရအဴ")
output:insert(gadget)
output:insert("</code> gadget ([")
output:insert(tostring(full_url("မဳဒဳယာဝဳကဳ:Gadgets-definition", {action = "ပလေဝ်ဒါန်"})))
output:insert(" edit definitions])'' <dl>")
output:insert("<dd> ''Description ([")
output:insert(tostring(full_url("မဳဒဳယာဝဳကဳ:Gadget-" .. gadget, {action = "ပလေဝ်ဒါန်"})))
output:insert(" ပလေဝ်ဒါန်])'': ")
output:insert(preprocess(new_message('Gadget-' .. gadget):plain()))
output:insert(" </dd>")
items:remove(i)
if #items > 0 then
for j, item in ipairs(items) do
items[j] = '[[မဳဒဳယာဝဳကဳ:Gadget-' .. item .. '|' .. item .. ']]'
end
output:insert("<dd> ''Other parts'': ")
output:insert(list_to_text(items))
output:insert("</dd>")
end
output:insert("</dl></dd>")
break
end
end
end
end
if not is_gadget then
output:insert("<dd> ''အက္ခရ်တဏအ်ဝွံဟွံသေၚ်ကဵုဒကုတ်ဆေၚ်စပ်ကဵု [")
output:insert(tostring(full_url("တၟေၚ်:ကိရိယာဂမၠိုၚ်", {uselang = "mnw"})))
output:insert(' gadget] ([')
output:insert(tostring(full_url("မဳဒဳယာဝဳကဳ:Gadgets-definition", {action = "ပလေဝ်ဒါန်"})))
output:insert(' ပလေဝ်ဒါန်ဝေါဟာအဓိပ္ပါဲဂမၠိုၚ်])လဵုဒှ်ဒှ်ရအဴ။</dd>')
-- else
-- cats:insert("ဂေက်ဂျေက်ဝိတ်ရှေန်နရဳဂမၠိုၚ်")
end
end
if old_doc_title then
output:insert("<dd> ''Redirected from'' [")
output:insert(old_doc_title:fullUrl{redirect = "ဟွံ"})
output:insert(" ")
output:insert(old_doc_title.fullText)
output:insert("] ([")
output:insert(old_doc_title:fullUrl{action = "ပလေဝ်ဒါန်"})
output:insert(" ပလေဝ်ဒါန်])။</dd>\n")
end
if not args.nolinks then
local links = Array()
if title.isSubpage and not args.notsubpage then
links:insert("[[:" .. title.nsText .. ":" .. title.rootText .. "|မုက်လိက်တံရိုဟ်]]")
links:insert("[[Special:PrefixIndex/" .. title.nsText .. ":" .. title.rootText .. "/|တံရိုဟ်မုက်လိက်ဂၠေံဂၠေံ]]")
else
links:insert("[[Special:PrefixIndex/" .. title.fullText .. "/|စရၚ်မုက်လိက်ဂၠေံဂၠေံ]]")
end
links:insert(
"[" .. tostring(full_url("တၟေၚ်:လေန်စၠောအ်နူလဵုရော/" .. title.fullText, {hidetrans = true, hideredirs = true})) .. " လေန်ဂမၠိုၚ်]")
if contentModel ~= "Scribunto" then
links:insert(
"[" .. tostring(full_url("တၟေၚ်:လေန်စၠောအ်နူလဵုရော/" .. title.fullText, {hidelinks = true, hidetrans = true})) .. " မပြံၚ်လှာဲဂၠံၚ်ဍာဲဂမၠိုၚ်]")
end
if is_script_or_stylesheet then
if user_name then
links:insert("[[Special:MyPage" .. title.text:sub(#title.rootText + 1) .. "|ဒြပ်ဇကု]]")
end
else
links:insert(
"[" .. tostring(full_url("တၟေၚ်:လေန်စၠောအ်နူလဵုရော/" .. title.fullText, {hidelinks = true, hideredirs = true})) .. " ပရေၚ်မပံၚ်စပ်ဂမၠိုၚ်]")
end
if contentModel == "Scribunto" then
local is_testcases = title.isSubpage and title.subpageText == "testcases"
local without_subpage = title.nsText .. ":" .. title.baseText
if is_testcases then
links:insert("[[:" .. without_subpage .. "|tested module]]")
else
links:insert("[[" .. title.fullText .. "/testcases|testcases]]")
end
if user_name then
links:insert("[[ညးလွပ်:" .. user_name .. "|မုက်လိက်ညးလွပ်]]")
links:insert("[[ညးလွပ် ဓရီုကျာ:" .. user_name .. "|မုက်လိက်ဓရီုကျာညးလွပ်]]")
links:insert("[[Special:PrefixIndex/ညးလွပ်:" .. user_name .. "/|လ္ဂာံညးလွပ်ဂမၠိုၚ်]]")
-- If sandbox module, add a link to the module that this is a sandbox of.
-- Exclude user sandbox modules like [[User:Dine2016/sandbox]].
elseif title.text:find("/sandbox%d*%f[/%z]") then
cats:insert("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
-- Sandbox modules don’t really need documentation.
needs_doc = false
-- Don't track user sandbox modules.
local text_title = new_title(title.text)
if not (text_title and text_title.namespace == 2) then
track("sandbox to be moved")
local sandbox_of, diff = title.baseText
if title_exists(sandbox_of) then
diff = " (" .. compare_pages(title.fullText, sandbox_of, "diff") .. ")"
else
track("no sandbox of")
end
links:insert("[[:" .. sandbox_of .. "|ကဠာသံၚ်ဗ္တဳမဆေၚ်စပ်ကဵု]]" .. (diff or ""))
end
-- If not a sandbox module, add link to sandbox module.
-- Sometimes there are multiple sandboxes for a single module:
-- [[Module:sa-pronunc/sandbox]], [[Module:sa-pronunc/sandbox2]].
-- Occasionally sandbox modules have their own subpages that are also
-- sandboxes: [[Module:grc-decl/sandbox/decl]].
else
local sandbox_title
if title.rootText == "grc-decl" then
sandbox_title = string_insert(title.fullText, 16, "/sandbox")
elseif is_testcases then
sandbox_title = title.fullText:gsub("/testcases", "/sandbox/testcases")
else
sandbox_title = title.fullText .. "/sandbox"
end
local sandbox_link = "[[:" .. sandbox_title .. "|ကဠာသံၚ်ဗ္တဳ]]"
local diff
if title_exists(sandbox_title) then
diff = " (" .. compare_pages(title.fullText, sandbox_title, "diff") .. ")"
end
links:insert(sandbox_link .. (diff or ""))
end
end
if title.nsText == "ထာမ်ပလိက်" then
-- Error search: all(any namespace), hastemplate (show pages using the template), insource (show source code), incategory (any/specific error) -- [[mw:Help:CirrusSearch]], [[w:Help:Searching/Regex]]
-- apparently same with/without: &profile=advanced&fulltext=1
local errorq = 'searchengineselect=mediawiki&search=all: hastemplate:\"'..title.rootText..'\" insource:\"'..title.rootText..'\" incategory:'
local eincategory = "Pages_with_module_errors|ParserFunction_errors|DisplayTitle_errors|Pages_with_ISBN_errors|Pages_with_ISSN_errors|Pages_with_reference_errors|Pages_with_syntax_highlighting_errors|Pages_with_TemplateStyles_errors"
links:insert(
'[' .. tostring(full_url('Special:Search', errorq..eincategory )) .. ' မဗၠေတ်ဗၠေၚ်ဂမၠိုၚ်]'
.. ' (' ..
'[' .. tostring(full_url('Special:Search', errorq..'ParserFunction_errors' )) .. ' မပါ်ပ္တိတ်တၞဟ်ခြာပိုဒ်]'
.. '/' ..
'[' .. tostring(full_url('Special:Search', errorq..'Pages_with_module_errors' )) .. ' မဝ်ဂျူ]'
.. ')'
)
if title.isSubpage and title.text:find("/sandbox%d*%f[/%z]") then -- This is a sandbox template.
-- At the moment there are no user sandbox templates with subpage
-- “/sandbox”.
cats:insert("ထာမ်ပလိက်ကဠာဗ္တဳဂမၠိုၚ်")
-- Sandbox templates don’t really need documentation.
needs_doc = false
-- Will behave badly if “/sandbox” occurs twice in title!
local sandbox_of = title.fullText:gsub("/sandbox%d*%f[/%z]", "")
local diff
if title_exists(sandbox_of) then
diff = " (" .. compare_pages(title.fullText, sandbox_of, "diff") .. ")"
else
track("no sandbox of")
end
links:insert("[[:" .. sandbox_of .. "|sandbox of]]" .. (diff or ""))
-- This is a template that can have a sandbox.
elseif not args.nosandbox then -- unless we tell it not to
local sandbox_title = title.fullText .. "/sandbox"
local diff
if title_exists(sandbox_title) then
diff = " (" .. compare_pages(title.fullText, sandbox_title, "diff") .. ")"
end
links:insert("[[:" .. sandbox_title .. "|ကဠာသံၚ်ဗ္တဳ]]" .. (diff or ""))
end
end
if #links > 0 then
output:insert("<dd> ''လေန်မရပ်စပ်သုၚ်စောဲ'': " .. links:concat(" • ") .. "</dd>")
end
end
output:insert("</dl>\n")
-- Show error from [[Module:category tree/topic cat/data]] on its submodules'
-- documentation to, for instance, warn about duplicate labels.
if startswith(title.fullText, "မဝ်ဂျူ:category tree/topic/") then
local ok, err = pcall(require, "မဝ်ဂျူ:category tree/topic/data")
if not ok then
output:insert('<span class="error">' .. err .. '</span>\n\n')
end
end
if doc_title and doc_title.exists then
-- Override automatic documentation, if present.
doc_content = expand_template{ title = doc_title.fullText }
elseif not doc_content and fallback_docs then
doc_content = expand_template{
title = fallback_docs,
args = {
['user'] = user_name,
['page'] = title.fullText,
['skin name'] = skin_name,
},
}
end
if doc_content then
output:insert(doc_content)
end
output:insert(('\n<%s style="clear: both;" />'):format(args.hr == "below" and "hr" or "br"))
if cats_auto_generated and not cats[1] and (not doc_content or not doc_content:find("%[%[ကဏ္ဍ:")) then
if contentModel == "Scribunto" then
cats:insert("Uncategorized modules")
-- elseif title.nsText == "ထာမ်ပလိက်" then
-- cats:insert("Uncategorized templates")
end
end
if needs_doc then
cats:insert("ထာမ်ပလိက်ကဵုမဝ်ဂျူမနွံပၟိက်လိက်စၟတ်မချူသမ္တီပတိုန်လဝ်ဂမၠိုၚ်")
end
for _, cat in ipairs(cats) do
output:insert("[[ကဏ္ဍ:" .. cat .. "]]")
end
output:insert("</div>\n")
return output:concat()
end
function export.module_auto_doc_table()
local parts = {}
local function ins(text)
insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Regex !! Category !! Handling modules")
for _, spec in ipairs(module_regex) do
local cat_text
local cats = spec.cat
if cats then
local cat_parts = {}
if type(cats) == "string" then
cats = {cats}
end
for _, cat in ipairs(cats) do
insert(cat_parts, ("<code>%s</code>"):format((cat:gsub("|", "|"))))
end
cat_text = concat(cat_parts, ", ")
else
cat_text = "''(unspecified)''"
end
ins("|-")
ins(("| <code>%s</code> || %s || %s"):format(spec.regex, cat_text,
is_callable(spec.process) and "''(handled internally)''" or
type(spec.process) == "string" and ("[[မဝ်ဂျူ:documentation/functions/%s]]"):format(spec.process) or
"''(no documentation generator)''"))
end
ins("|}")
return concat(parts, "\n")
end
-- Used by {{translit module documentation}}.
function export.translitModuleLangList(frame)
local pagename, subpage
if frame.args[1] then
pagename = frame.args[1]
else
local title = get_current_title()
subpage = title.subpageText
pagename = title.text
if subpage ~= pagename then
pagename = title.rootText
end
end
local translitModule = pagename
local languageObjects = require("မဝ်ဂျူ:languages/byTranslitModule")(translitModule)
local codeInPagename = pagename:match("^([%l-]+)%-.*translit$")
local categories = Array()
local codeInPagenameInList = false
if codeInPagename then
if languageObjects[1] and subpage ~= "doc" then
local agreement = languageObjects[2] and "ဂမၠိုၚ်" or ""
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူကၠာဲမအခဝ်မရပ်စပ်နူကဵု " ..
#languageObjects .. "အရေဝ်ဘာသာ" .. agreement .. "]]")
end
languageObjects = Array(languageObjects)
:filter(
function (lang)
local result = lang:getCode() ~= codeInPagename
codeInPagenameInList = codeInPagenameInList or result
return result
end)
end
if subpage ~= "doc" then
for script_code in pagename:gmatch("%f[^-%z]%u%l%l%l%f[-]") do
local script = get_script(script_code)
if script then
categories:insert("[[ကဏ္ဍ:ဘာသာ" .. script:getCategoryName() .. "]]")
end
end
end
if subpage ~= "doc" and not title_exists("မဝ်ဂျူ:" .. pagename .. "/testcases") then
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူကၠာဲမအခဝ်လ္ပာ်မ္ၚးကိစ္စစမ်ၜတ်မုက်ဂၠေံဂၠေံဂမၠိုၚ်]]")
end
if not languageObjects[1] then
return categories:concat()
end
local langs = Array(languageObjects)
:sort(
function(lang1, lang2)
return lang1:getCode() < lang2:getCode()
end)
-- This will not error because languageObjects is not empty.
:map(languageObjects[1].makeCategoryLink)
:serialCommaJoin()
return "It is " .. ( codeInPagenameInList and "also" or "" ) ..
" used to transliterate " .. langs .. "." .. categories:concat()
end
-- Used by {{entry name module documentation}}.
function export.entryNameModuleLangList(frame)
local pagename, subpage
if frame.args[1] then
pagename = frame.args[1]
else
local title = get_current_title()
subpage = title.subpageText
pagename = title.text
if subpage ~= pagename then
pagename = title.rootText
end
end
local entryNameModule = pagename
local languageObjects = require("မဝ်ဂျူ:languages/byEntryNameModule")(entryNameModule)
local codeInPagename = pagename:match("^([%l-]+)%-.*entryname$")
local categories = Array()
local codeInPagenameInList = false
if codeInPagename then
if languageObjects[1] and subpage ~= "doc" then
local agreement = languageObjects[2] and "ဂမၠိုၚ်" or ""
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်မရပ်စပ်နူကဵု " ..
#languageObjects .. " အရေဝ်ဘာသာ" .. agreement .. "]]")
end
languageObjects = Array(languageObjects)
:filter(
function (lang)
local result = lang:getCode() ~= codeInPagename
codeInPagenameInList = codeInPagenameInList or result
return result
end)
end
if subpage ~= "doc" then
for script_code in pagename:gmatch("%f[^-%z]%u%l%l%l%f[-]") do
local script = get_script(script_code)
if script then
categories:insert("[[ကဏ္ဍ:ဘာသာ" .. script:getCategoryName() .. "]]")
end
end
end
if subpage ~= "doc" and not title_exists("မဝ်ဂျူ:" .. pagename .. "/testcases") then
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူပွမကၠောန်ပ္တိတ်စုတ်ပၠောပ်ယၟုမနွံကဵုကိစ္စစမ်ၜတ်ရံၚ်မုက်လိက်ဂၠေံဂၠေံဂမၠိုၚ်]]")
end
if not languageObjects[1] then
return categories:concat()
end
local langs = Array(languageObjects)
:sort(
function(lang1, lang2)
return lang1:getCode() < lang2:getCode()
end)
-- This will not error because languageObjects is not empty.
:map(languageObjects[1].makeCategoryLink)
:serialCommaJoin()
return "It is " .. ( codeInPagenameInList and "also" or "" ) ..
" used to generate entry names for " .. langs .. "." .. categories:concat()
end
-- Used by {{sortkey module documentation}}.
function export.sortkeyModuleLangList(frame)
local pagename, subpage
if frame.args[1] then
pagename = frame.args[1]
else
local title = get_current_title()
subpage = title.subpageText
pagename = title.text
if subpage ~= pagename then
pagename = title.rootText
end
end
local sortkeyModule = pagename
local languageObjects = require("Module:languages/bySortkeyModule")(sortkeyModule)
local codeInPagename = pagename:match("^([%l-]+)%-.*sortkey$")
local categories = Array()
local codeInPagenameInList = false
if codeInPagename then
if languageObjects[1] and subpage ~= "documentation" or "doc" then
local agreement = languageObjects[2] and " " or ""
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူပွမကၠောန်ပ္တိတ်ပါ်အဇာကဳမရပ်နူကဵု " ..
#languageObjects .. agreement .. "ဘာသာဂမၠိုၚ်]]")
end
languageObjects = Array(languageObjects)
:filter(
function (lang)
local result = lang:getCode() ~= codeInPagename
codeInPagenameInList = codeInPagenameInList or result
return result
end)
end
if subpage ~= "doc" then
for script_code in pagename:gmatch("%f[^-%z]%u%l%l%l%f[-]") do
local script = get_script(script_code)
if script then
categories:insert("[[ကဏ္ဍ:" .. script:getCategoryName() .. "]]")
end
end
end
if subpage ~= "doc" and not title_exists("မဝ်ဂျူ:" .. pagename .. "/testcases") then
categories:insert("[[ကဏ္ဍ:မဝ်ဂျူပွမကၠောန်ပ္တိတ်ပါ်အဇာကဳမနွံကဵုကိစ္စစမ်ၜတ်ရံၚ်မုက်လိက်ဂၠေံဂၠေံဂမၠိုၚ်]]")
end
if not languageObjects[1] then
return categories:concat()
end
local langs = Array(languageObjects)
:sort(
function(lang1, lang2)
return lang1:getCode() < lang2:getCode()
end)
-- This will not error because languageObjects is not empty.
:map(languageObjects[1].makeCategoryLink)
:serialCommaJoin()
return "It is " .. ( codeInPagenameInList and "also" or "" ) ..
" used to sort " .. langs .. "." .. categories:concat()
end
return export
f5vwxemqiyiv3d2di3jpfm79nfmu1x4
မဝ်ဂျူ:languages/data/3/n
828
657
385839
385033
2026-04-07T09:26:15Z
Intobesa.bot
1035
Bot: ပလေဝ်ဒါန်
385839
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["naa"] = {
"Namla",
3508760,
"paa-pau",
"Latn",
}
m["nab"] = {
"Nambikwara",
2068190,
"sai-nmk",
"Latn",
}
m["nac"] = {
"Narak",
6965295,
"ngf",
"Latn",
}
m["nae"] = {
"Naka'ela",
6960073,
"poz",
"Latn",
}
m["naf"] = {
"Nabak",
11732491,
"ngf",
"Latn",
}
m["nag"] = {
"Naga Pidgin",
3503454,
"crp",
"Latn",
ancestors = "as",
}
m["nah"] = {
"Nahuatl",
13300,
"azc-nah",
"Latn",
}
m["naj"] = {
"Nalu",
36026,
"alv-nal",
"Latn",
}
m["nak"] = {
"နာကာနာဲ",
6528669,
"poz-ocw",
"Latn",
}
m["nal"] = {
"Nalik",
3335387,
"poz-ocw",
"Latn",
}
m["nam"] = {
"Ngan'gityemerri",
3298041,
"aus-dal",
"Latn",
}
-- Being converted into the family "Southern Min" ("zhx-nan", which will take the code "nan" once the language can be removed). Retain the name "Min Nan" here to avoid having to move things that are scheduled for deletion anyway.
m["nan"] = {
"မိန်နာန်",
36495,
"zhx-com",
"Hants, Latn, Bopo, Kana",
wikimedia_codes = "zh-min-nan",
generate_forms = "zh-generateforms",
sort_key = {
Hani = "Hani-sortkey",
Kana = "Kana-sortkey"
},
}
m["nao"] = {
"Naaba",
11883865,
"sit-tib",
ancestors = "xct",
}
m["nap"] = {
"နဳပဝ်လဳတေန်",
33845,
"roa-itd",
"Latn",
}
m["naq"] = {
"ခိုဝ်ခိုဝ်",
13301,
"khi-khk",
"Latn",
}
m["nar"] = {
"Iguta",
5621686,
"nic-jer",
"Latn",
}
m["nas"] = {
"Nasioi",
56772,
"paa-sbo",
"Latn",
}
m["nat"] = {
"Hungworo",
3914395,
"nic-kmk",
"Latn",
}
m["naw"] = {
"Nawuri",
35906,
"alv-gng",
"Latn",
}
m["nax"] = {
"Nakwi",
3504178,
"qfa-mal",
"Latn",
}
m["nay"] = {
"Ngarrindjeri",
7022091,
"aus-pam",
"Latn",
}
m["naz"] = {
"Coatepec Nahuatl",
5138605,
"azc-nah",
"Latn",
}
m["nba"] = {
"Nyemba",
3346655,
"bnt-clu",
"Latn",
ancestors = "lch",
}
m["nbb"] = {
"Ndoe",
36134,
"nic-eko",
"Latn",
}
m["nbc"] = {
"Chang",
5071694,
"sit-kch",
"Latn",
}
m["nbd"] = {
"Ngbinda",
11132859,
"bnt-boa",
"Latn",
}
m["nbe"] = {
"Konyak Naga",
6430448,
"sit-kch",
"Latn",
}
m["nbg"] = {
"Nagarchal",
13299,
"dra-gon",
}
m["nbh"] = {
"Ngamo",
3438705,
"cdc-wst",
"Latn",
}
m["nbi"] = {
"Mao Naga",
12952905,
"tbq-anp",
"Latn",
}
m["nbj"] = {
"Ngarinman",
10600380,
nil,
"Latn",
}
m["nbk"] = {
"Nake",
11732496,
"ngf-mad",
"Latn",
}
m["nbm"] = {
"Ngbaka Ma'bo",
3915331,
"nic-nkm",
"Latn",
}
m["nbn"] = {
"Kuri",
3200540,
"poz",
"Latn",
}
m["nbo"] = {
"Nkukoli",
3914482,
"nic-uce",
"Latn",
}
m["nbp"] = {
"Nnam",
36138,
"nic-eko",
"Latn",
}
m["nbq"] = {
"Nggem",
12952956,
"ngf",
"Latn",
}
m["nbr"] = {
"Numana",
5529310,
"nic-nin",
"Latn",
}
m["nbs"] = {
"Namibian Sign Language",
6961792,
"sgn",
"Latn", -- when documented
}
m["nbt"] = {
"Na",
12952895,
"sit-tan",
"Deva, Latn",
}
m["nbu"] = {
"Rongmei Naga",
12952912,
"sit-zem",
"Latn",
}
m["nbv"] = {
"Ngamambo",
11129694,
"nic-mom",
"Latn",
}
m["nbw"] = {
"Southern Ngbandi",
17522635,
"nic-ngd",
"Latn",
}
m["nby"] = {
"Ningera",
11732524,
"paa-brd",
"Latn",
}
m["nca"] = {
"Iyo",
6101336,
"ngf-fin",
"Latn",
}
m["ncb"] = {
"Central Nicobarese",
3335553,
"aav-nic",
"Deva, Latn",
}
m["ncc"] = {
"Ponam",
3396122,
"poz-aay",
"Latn",
}
m["ncd"] = {
"Nachering",
6957144,
"sit-kic",
"Deva",
}
m["nce"] = {
"Yale",
2992915,
"paa", --kwomtari or isolate
"Latn",
}
m["ncf"] = {
"Notsi",
3344784,
"poz-ocw",
"Latn",
}
m["ncg"] = {
"နေတ်သကာ",
3342138,
"nai-tsi",
"Latn",
}
m["nch"] = {
"Central Huasteca Nahuatl",
2194290,
"azc-nah",
"Latn",
}
m["nci"] = {
"နာဝါတ်ဒဝ်ဝၚ်ဂန္ထ",
559242,
"azc-nah",
"Latn",
entry_name = {remove_diacritics = c.macron},
}
m["ncj"] = {
"Northern Puebla Nahuatl",
15705671,
"azc-nah",
"Latn",
}
m["nck"] = {
"Nakara",
6960662,
"aus-arn",
"Latn",
}
m["ncl"] = {
"Michoacán Nahuatl",
2896217,
"azc-nah",
"Latn",
}
m["ncm"] = {
"Nambo",
42173731,
nil,
"Latn",
}
m["ncn"] = {
"Nauna",
3337158,
"poz-aay",
"Latn",
}
m["nco"] = {
"Sibe",
56806,
"paa-sbo",
"Latn",
}
m["ncr"] = {
"Ncane",
11297920,
"nic-bbe",
"Latn",
ancestors = "nhu",
}
m["ncs"] = {
"Nicaraguan Sign Language",
33765,
"sgn",
"Sgnw",
}
m["nct"] = {
"Chothe Naga",
5105385,
"tbq-kuk",
"Beng, Latn",
}
m["ncu"] = {
"Chumburung",
35198,
"alv-gng",
"Latn",
}
m["ncx"] = {
"Central Puebla Nahuatl",
5061727,
"azc-nah",
"Latn",
}
m["ncz"] = {
"Natchez",
3111838,
nil,
"Latn",
}
m["nda"] = {
"Ndasa",
35904,
"bnt-kel",
"Latn",
}
m["ndb"] = {
"Kenswei Nsei",
7067553,
"nic-rnn",
"Latn",
}
m["ndc"] = {
"Ndau",
13311,
"bnt-sho",
"Latn",
}
m["ndd"] = {
"Nde-Nsele-Nta",
36131,
"nic-eko",
"Latn",
}
m["ndf"] = {
"Nadruvian",
6957967,
nil,
"Latn",
}
m["ndg"] = {
"Ndengereko",
6983726,
"bnt-mbi",
"Latn",
}
m["ndh"] = {
"Ndali",
6983678,
"bnt-run",
"Latn",
}
m["ndi"] = {
"Chamba Leko",
36381,
"alv-lek",
"Latn",
}
m["ndj"] = {
"Ndamba",
6983684,
"bnt-kil",
"Latn",
}
m["ndk"] = {
"Ndaka",
11164947,
"bnt-nya",
"Latn",
}
m["ndl"] = {
"Ndolo",
6983788,
"bnt-zbi",
"Latn",
ancestors = "lse",
}
m["ndm"] = {
"Ndam",
56283,
"cdc-est",
"Latn",
}
m["ndn"] = {
"Ngundi",
35916,
"bnt-ngn",
"Latn",
}
m["ndp"] = {
"Ndo",
6983774,
"csu-mle",
"Latn",
}
m["ndq"] = {
"Ndombe",
6983792,
"bnt-swb",
"Latn",
}
m["ndr"] = {
"Ndoola",
35837,
"nic-mmb",
"Latn",
}
m["nds"] = {
"ဂျာမာန်မသဝ်",
25433,
"gmw-lgm",
"Latn",
ancestors = "gml",
}
m["ndt"] = {
"Ndunga",
6983857,
"nic-mbc",
"Latn",
}
m["ndu"] = {
"Dugun",
11015189,
"alv-dur",
"Latn",
}
m["ndv"] = {
"Ndut",
36028,
"alv-cng",
"Latn",
}
m["ndw"] = {
"Ndobo",
11008568,
"bnt-ngn",
"Latn",
}
m["ndx"] = {
"Nduga",
6983833,
nil,
"Latn",
}
m["ndy"] = {
"Lutos",
6705910,
"csu-val",
"Latn",
}
m["ndz"] = {
"Ndogo",
35983,
"nic-ser",
"Latn",
}
m["nea"] = {
"Eastern Ngad'a",
12473454,
"poz-cet",
}
m["neb"] = {
"ထါန်ရာ",
7853636,
"dmn-mda",
"Latn",
}
m["nec"] = {
"Nedebang",
4925378,
"ngf",
}
m["ned"] = {
"Nde-Gbite",
11010279,
"nic-grf",
}
m["nee"] = {
"Kumak",
3347266,
"poz-cln",
"Latn",
}
m["nef"] = {
"Nefamese",
6987002,
"crp",
}
m["neg"] = {
"နေတ်ဂေါတ်ဒါန်",
33676,
"tuw-ewe",
"Cyrl",
}
m["neh"] = {
"Nyenkha",
3695185,
"sit-ebo",
"Tibt, Latn",
translit = {Tibt = "Tibt-translit"},
override_translit = true,
display_text = {Tibt = s["Tibt-displaytext"]},
entry_name = {Tibt = s["Tibt-entryname"]},
sort_key = {Tibt = "Tibt-sortkey"},
}
m["nej"] = {
"နေကိုဝ်",
6989840,
"ngf-fin",
"Latn",
}
m["nek"] = {
"Neku",
14916900,
"poz-cln",
}
m["nem"] = {
"Nemi",
3338008,
"poz-cln",
"Latn",
}
m["nen"] = {
"Nengone",
3338052,
"poz-cln",
"Latn",
}
m["neo"] = {
"Ná-Meo",
15977293,
"hmn",
}
m["neq"] = {
"North Central Mixe",
25559729,
nil,
"Latn",
}
m["ner"] = {
"Yahadian",
8046778,
nil,
"Latn",
}
m["nes"] = {
"Bhoti Kinnauri",
21179921,
"sit-las",
}
m["net"] = {
"Nete",
6998869,
"paa-eng",
}
m["neu"] = {
"Neo",
606917,
"art",
"Latn",
type = "appendix-constructed",
}
m["nev"] = {
"Nyaheun",
7070801,
"mkh-ban",
}
m["new"] = {
"နူဝါ",
33979,
"sit-new",
"Deva, Newa, Ranj",
ancestors = "nwx",
translit = {
Deva = "new-translit",
Newa = "new-Newa-translit",
},
}
m["nex"] = {
"Neme",
12952941,
}
m["ney"] = {
"Neyo",
36410,
"kro",
}
m["nez"] = {
"Nez Perce",
3339226,
"nai-shp",
"Latn",
}
m["nfa"] = {
"Dhao",
2053828,
"poz",
}
m["nfd"] = {
"Ahwai",
3913957,
"nic-plt",
"Latn",
}
m["nfl"] = {
"အာဲဝူ",
56742,
"poz-tem",
"Latn",
}
m["nfr"] = {
"Nafaanra",
13297,
"alv-snf",
"Latn",
}
m["nfu"] = {
"Mfumte",
6826794,
"nic-nka",
"Latn",
}
m["nga"] = {
"Ngbaka",
36022,
"gba-eas",
"Latn",
}
m["ngb"] = {
"Northern Ngbandi",
17522631,
"nic-ngd",
"Latn",
}
m["ngc"] = {
"Ngombe (Congo)",
3123524,
"bnt-bun",
}
m["ngd"] = {
"Ngando (Central African Republic)",
35910,
"bnt-ngn",
}
m["nge"] = {
"Ngemba",
6750551,
"nic-nge",
"Latn",
}
m["ngg"] = { -- compare 'aiy'
"Ngbaka Manza",
11033316,
"gba-eas",
"Latn",
}
m["ngh"] = {
"Nǀuu",
2618974,
"khi-tuu",
"Latn",
}
m["ngi"] = {
"Ngizim",
3914924,
"cdc-wst",
"Latn",
}
m["ngj"] = {
"Ngie",
36361,
"nic-mom",
"Latn",
}
m["ngk"] = {
"Ngalkbun",
3913790,
"aus-gun",
"Latn",
}
m["ngl"] = {
"Lomwe",
35824,
"bnt-mak",
"Latn",
}
m["ngm"] = {
"Ngatik Men's Creole",
36400,
"crp",
ancestors = "en, pon",
}
m["ngn"] = {
"Ngwo",
36051,
"nic-mom",
"Latn",
}
m["ngo"] = {
"Ngoni",
7022547,
"bnt-ngu",
"Latn",
}
m["ngp"] = {
"Ngulu",
7193332,
"bnt-seu",
"Latn",
}
m["ngq"] = {
"Ngoreme",
7022573,
"bnt-lok",
"Latn",
}
m["ngr"] = {
"Nagu",
3063524,
"poz-tem",
"Latn",
}
m["ngs"] = {
"Gvoko",
3441188,
"cdc-cbm",
"Latn",
}
m["ngt"] = {
"Ngeq",
25559548,
"mkh-kat",
}
m["ngu"] = {
"Guerrero Nahuatl",
5614980,
"azc-nah",
"Latn",
}
m["ngv"] = {
"Nagumi",
35842,
"nic-jrn",
}
m["ngw"] = {
"Ngwaba",
3440480,
"cdc-cbm",
"Latn",
}
m["ngx"] = {
"Nggwahyi",
56265,
"cdc-cbm",
"Latn",
}
m["ngy"] = {
"Tibea",
36598,
"bnt-baf",
"Latn",
}
m["ngz"] = {
"Ngungwel",
35920,
"bnt-tkc",
"Latn",
}
m["nha"] = {
"Nhanda",
3339380,
"aus-psw",
"Latn",
}
m["nhb"] = {
"ဗါန်",
3913311,
"dmn-nbe",
"Latn",
}
m["nhc"] = {
"Tabasco Nahuatl",
6047326,
"azc-nah",
"Latn",
}
m["nhd"] = {
"Chiripá",
2873230,
"tup-gua",
"Latn",
ancestors = "gn",
}
m["nhe"] = {
"ဝါသတေကာ နာဝါတော လ္ပာ်ဖာဗၟံက်",
4358289,
"azc-nah",
"Latn",
}
m["nhf"] = {
"Nhuwala",
10600396,
"aus-nga",
"Latn",
}
m["nhg"] = {
"ထာန်ထာန်သေန်ဂဝ် နာဝါတော",
3450252,
"azc-nah",
"Latn",
}
m["nhh"] = {
"Nahari",
6583560,
"inc-hal",
}
m["nhi"] = {
"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl",
12953764,
"azc-nah",
"Latn",
}
m["nhk"] = {
"Cosoleacaque Nahuatl",
12953757,
"azc-nah",
"Latn",
}
m["nhm"] = {
"Morelos Nahuatl",
4800819,
"azc-nah",
"Latn",
}
m["nhn"] = {
"နာဟောတ် မဇ္ဇျိမ",
6047309,
"azc-nah",
"Latn",
}
m["nho"] = {
"Takuu",
3409818,
"poz-pnp",
"Latn",
}
m["nhp"] = {
"Pajapan Nahuatl",
12953760,
"azc-nah",
"Latn",
}
m["nhq"] = {
"Huaxcaleca Nahuatl",
12953758,
"azc-nah",
"Latn",
}
m["nhr"] = {
"Naro",
2164778,
"khi-kal",
"Latn",
}
m["nht"] = {
"Ometepec Nahuatl",
7090132,
"azc-nah",
"Latn",
}
m["nhu"] = {
"နဝ်ဝါန်",
36072,
"nic-bbe",
"Latn",
}
m["nhv"] = {
"Temascaltepec Nahuatl",
2379405,
"azc-nah",
"Latn",
}
m["nhw"] = {
"ဝုတ်သတေကာ နာဟာဒ်တာဲ လ္ပာ်ပလိုတ်",
2678840,
"azc-nah",
"Latn",
}
m["nhx"] = {
"မကာယျာပါံ နာဝါတဝ်",
12953756,
"azc-nah",
"Latn",
}
m["nhy"] = {
"Northern Oaxaca Nahuatl",
12953763,
"azc-nah",
"Latn",
}
m["nhz"] = {
"Santa María La Alta Nahuatl",
15705753,
"azc-nah",
"Latn",
}
m["nia"] = {
"နဳယျာ",
2407831,
"poz-nws",
"Latn",
}
m["nib"] = {
"Nakame",
11732495,
"ngf-fin",
"Latn",
}
m["nid"] = {
"Ngandi",
7021977,
"aus-arn",
"Latn",
}
m["nie"] = {
"Niellim",
33662,
"alv-bua",
}
m["nif"] = {
"Nek",
6989781,
"ngf-fin",
"Latn",
}
m["nig"] = {
"Ngalakan",
3913796,
"aus-gun",
"Latn",
}
m["nih"] = {
"Nyiha",
11128374,
"bnt-mby",
"Latn",
}
m["nii"] = {
"Nii",
35237,
"ngf",
"Latn",
}
m["nij"] = {
"ၚဂျူ",
2992872,
"poz-brw",
"Latn",
}
m["nik"] = {
"Southern Nicobarese",
7570194,
"aav-nic",
}
m["nil"] = {
"Nila",
7036821,
}
m["nim"] = {
"Nilamba",
4121200,
"bnt-tkm",
"Latn",
}
m["nin"] = {
"Ninzo",
3914021,
"nic-nin",
}
m["nio"] = {
"နၞဴနေတ်သာန်",
36743,
"syd",
"Cyrl",
translit = "nio-translit",
}
m["niq"] = {
"Nandi",
6956591,
"sdv-nma",
}
m["nir"] = {
"Nimboran",
301116,
"paa-nim",
}
m["nis"] = {
"Nimi",
11732523,
"ngf-fin",
"Latn",
}
m["nit"] = {
"ကိုဝ်လာမဳ လ္ပာ်ဒိုဟ်ပလိုတ်သမၠုၚ်ကျာ",
56767,
"dra-knk",
"Deva, Telu",
translit = {
Telu = "te-translit"
},
}
m["niu"] = {
"နဳဥုအာယ်",
33790,
"poz-ton",
"Latn",
}
m["niv"] = {
"နိဖှေတ်",
36464,
"qfa-iso",
"Cyrl",
translit = "niv-translit",
entry_name = {
from = {"['’]"},
to = {"ʼ"}
},
sort_key = "niv-sortkey",
}
m["niw"] = {
"Nimo",
3504126,
"paa-asa",
}
m["nix"] = {
"Hema",
5710904,
"bnt-nyg",
"Latn",
}
m["niy"] = {
"Ngiti",
7022396,
"csu-lnd",
}
m["niz"] = {
"Ningil",
11732527,
"qfa-tor",
}
m["nja"] = {
"Nzanyi",
3441299,
"cdc-cbm",
"Latn",
}
m["njb"] = {
"Nocte Naga",
7046410,
"sit-tno",
}
m["njh"] = {
"Lotha Naga",
33590,
"sit-aao",
}
m["nji"] = {
"Gudanji",
3915692,
"aus-mir",
}
m["njj"] = {
"Njen",
36112,
"nic-mom",
"Latn",
}
m["njl"] = {
"Njalgulgule",
7071229,
"sdv-daj",
}
m["njm"] = {
"Angami",
56761,
"tbq-anp",
"Latn",
}
m["njn"] = {
"Liangmai Naga",
14194500,
"sit-zem",
}
m["njo"] = {
"အာအဝ်",
28433,
"sit-aao",
"Latn",
}
m["njr"] = {
"Njerep",
35844,
"nic-mmb",
"Latn",
}
m["njs"] = {
"Nisa",
13593518,
"paa-egb",
}
m["njt"] = {
"Ndyuka-Trio Pidgin",
13591205,
"crp",
ancestors = "djk, tri",
}
m["nju"] = {
"Ngadjunmaya",
7021846,
"aus-pam",
}
m["njx"] = {
"Kunyi",
3196559,
"bnt-kng",
"Latn",
}
m["njy"] = {
"Njyem",
35898,
"bnt-ndb",
"Latn",
}
m["njz"] = {
"နာ်ယဳဃှဳ",
56870,
"sit-tan",
"Latn",
}
m["nka"] = {
"Nkoya",
7042633,
"bnt-lbn",
"Latn",
}
m["nkb"] = {
"Khoibu Naga",
21481876,
"sit-mar",
}
m["nkc"] = {
"Nkongho",
35863,
"bnt-saw",
"Latn",
}
m["nkd"] = {
"Koireng",
6426342,
"sit-zem",
}
m["nke"] = {
"Duke",
3041075,
"poz-ocw",
}
m["nkf"] = {
"Inpui Naga",
21481817,
"sit-zem",
}
m["nkg"] = {
"Nekgini",
11732509,
"ngf-fin",
"Latn",
}
m["nkh"] = {
"Khezha Naga",
6401519,
"tbq-anp",
}
m["nki"] = {
"Thangal Naga",
56374,
"sit-zem",
}
m["nkj"] = {
"Nakai",
14916897,
"ngf-okk",
"Latn",
}
m["nkk"] = {
"Nokuku",
7048122,
"poz-vnn",
"Latn",
}
m["nkm"] = {
"Namat",
15634505,
}
m["nkn"] = {
"Nkangala",
10962292,
"bnt-clu",
"Latn",
ancestors = "mck",
}
m["nko"] = {
"အၚ်္ခါဝ်နိယျာ",
35867,
"alv-gng",
"Latn",
}
m["nkp"] = {
"Niuatoputapu",
3399095,
"poz-pnp",
}
m["nkq"] = {
"Nkami",
7042522,
"alv-gng",
"Latn",
}
m["nkr"] = {
"Nukuoro",
2635961,
"poz-pnp",
"Latn",
}
m["nks"] = {
"North Asmat",
11732049,
}
m["nkt"] = {
"Nyika",
16917497,
"bnt-mwi",
"Latn",
}
m["nku"] = {
"Bouna Kulango",
20668241,
"alv-kul",
}
-- nkv is treated as nkt, see WT:LT
m["nkw"] = {
"Nkutu",
7193313,
"bnt-tet",
"Latn",
}
m["nkx"] = {
"Nkoroo",
36000,
"ijo",
}
m["nkz"] = {
"Nkari",
11130307,
"nic-ief",
ancestors = "ibr",
}
m["nla"] = {
"Ngombale",
36292,
"bai",
"Latn",
}
m["nlc"] = {
"Nalca",
6960839,
"ngf",
"Latn",
}
m["nle"] = {
"East Nyala",
25559347,
"bnt-msl",
"Latn",
ancestors = "luy",
}
m["nlg"] = {
"Gela",
3063531,
"poz-sls",
"Latn",
}
m["nli"] = {
"Grangali",
3444203,
"inc-kun",
}
m["nlj"] = {
"Nyali",
7070830,
"bnt-nya",
"Latn",
}
m["nlk"] = {
"Ninia Yali",
12953310,
}
m["nll"] = {
"နဳဟာလဳ",
33904,
"qfa-iso",
"Deva, Latn",
}
m["nlm"] = {
"Mankiyali",
47522426,
"inc-koh",
}
m["nlo"] = {
"Ngul",
35894,
"bnt-bdz",
"Latn",
}
m["nlq"] = {
"Lao Naga",
63283609,
"sit-tno",
}
m["nlu"] = {
"Nchumbulu",
36143,
"alv-gng",
"Latn",
}
m["nlv"] = {
"Orizaba Nahuatl",
3086050,
"azc-nah",
"Latn",
}
m["nlw"] = {
"Walangama",
7961277,
}
m["nlx"] = {
"Nahali",
33361,
"inc-bhi",
}
m["nly"] = {
"Nyamal",
7070837,
"aus-nga",
"Latn",
}
m["nlz"] = {
"Nalögo",
20527138,
"poz-tem",
"Latn",
}
m["nma"] = {
"Maram Naga",
56378,
"sit-zem",
}
m["nmb"] = {
"Big Nambas",
2902304,
"poz-vnc",
"Latn",
}
m["nmc"] = {
"ၚါမ်",
3915446,
"csu-sar",
"Latn",
}
m["nmd"] = {
"Ndumu",
35901,
"bnt-mbt",
"Latn",
}
m["nme"] = {
"Mzieme Naga",
6949473,
"sit-zem",
}
m["nmf"] = {
"Tangkhul Naga",
7682992,
"sit-tng",
}
m["nmg"] = {
"Kwasio",
34098,
"bnt-mnj",
"Latn",
}
m["nmh"] = {
"Monsang Naga",
6902496,
}
m["nmi"] = {
"Nyam",
3438738,
"cdc-wst",
"Latn",
}
m["nmj"] = {
"Ngombe (Central African Republic)",
3913949,
"gba-sou",
}
m["nmk"] = {
"Namakura",
3335410,
"poz-vnc",
"Latn",
}
m["nml"] = {
"Ndemli",
36089,
"nic-grf",
"Latn",
}
m["nmm"] = {
"Manangba",
6746900,
"sit-tam",
"Tibt, Deva",
translit = {Tibt = "Tibt-translit"},
override_translit = true,
display_text = {Tibt = s["Tibt-displaytext"]},
entry_name = {Tibt = s["Tibt-entryname"]},
sort_key = {Tibt = "Tibt-sortkey"},
}
m["nmn"] = {
"သူ",
13229,
"khi-tuu",
"Latn",
}
m["nmo"] = {
"Moyon Naga",
6927748,
"tbq-kuk",
}
m["nmp"] = {
"Nimanbur",
16891606,
}
m["nmq"] = {
"Nambya",
11008869,
"bnt-sho",
"Latn",
}
m["nmr"] = {
"Nimbari",
36069,
"alv-lni",
}
m["nms"] = {
"Letemboi",
3236886,
"poz-vnc",
"Latn",
}
m["nmt"] = {
"Namonuito",
12908815,
"poz-mic",
}
m["nmu"] = {
"Northeast Maidu",
3278074,
"nai-mdu",
"Latn",
}
m["nmv"] = {
"Ngamini",
7021944,
"aus-kar",
"Latn",
}
m["nmw"] = {
"Nimoa",
7037729,
"poz-ocw",
}
m["nmy"] = {
"နန်မူယဳ",
56844,
"sit-nax",
"Latn",
}
m["nmz"] = {
"Nawdm",
36085,
"nic-yon",
"Latn",
}
m["nna"] = {
"Nyangumarta",
33653,
}
m["nnb"] = {
"Nande",
3196953,
"bnt-glb",
"Latn",
}
m["nnc"] = {
"Nancere",
3140491,
"cdc-est",
"Latn",
}
m["nnd"] = {
"West Ambae",
2841479,
"poz-vnn",
"Latn",
}
m["nne"] = {
"Ngandyera",
10961003,
"bnt-ova",
"Latn",
}
m["nnf"] = {
"Ngaing",
11732510,
"ngf-fin",
"Latn",
}
m["nng"] = {
"Maring Naga",
12952908,
"sit-mar",
}
m["nnh"] = {
"Ngiemboon",
36286,
"bai",
"Latn",
}
m["nni"] = {
"North Nuaulu",
12952968,
"poz-cma",
}
m["nnj"] = {
"Nyangatom",
4662604,
"sdv-ttu",
}
m["nnk"] = {
"Nankina",
11732502,
"ngf-fin",
"Latn",
}
m["nnl"] = {
"Northern Rengma Naga",
7067615,
"tbq-anp",
}
m["nnm"] = {
"Namia",
56363,
"paa-spk",
"Latn",
}
m["nnn"] = {
"Ngete",
56625,
"cdc-mas",
"Latn",
}
m["nnp"] = {
"ဝါန်ဆေဝ်",
7967085,
"sit-kch",
"Wcho, Deva, Latn",
}
m["nnq"] = {
"Ngindo",
7022366,
"bnt-mbi",
"Latn",
}
m["nnr"] = {
"Narungga",
13591127,
"aus-pam",
"Latn",
}
m["nnt"] = {
"Nanticoke",
3915517,
"alg-eas",
"Latn",
}
m["nnu"] = {
"Dwang",
35258,
"alv-gng",
"Latn",
}
m["nnv"] = {
"Nukunu",
10604066,
}
m["nnw"] = {
"Southern Nuni",
11152248,
"nic-gnn",
"Latn",
}
m["nnx"] = {
"Ngong",
12952915,
}
m["nny"] = { -- contrast aus-ynk
"Nyangga",
10604331,
"aus-tnk",
"Latn",
}
m["nnz"] = {
"Nda'nda'",
36016,
"bai",
"Latn",
}
m["noa"] = {
"Woun Meu",
3111873,
"sai-chc",
"Latn",
}
m["noc"] = {
"Nuk",
11732534,
"ngf-fin",
"Latn",
}
m["nod"] = {
"သေံသၟဝ်ကျာ",
565110,
"tai-swe",
"Lana, Thai",
translit = {
Lana = "Lana-translit",
Thai = "Thai alphabet-translit",
},
sort_key = {
from = {"%p", "᩠", "ᩔ", "ᩕ", "ᩖ", "ᩘ", "([ᨭ-ᨱ])ᩛ", "([ᨷ-ᨾ])ᩛ", "ᩤ", "ก", "ค", "ร", "ฮ", "ต", u(0x200C)},
to = {"", "", "ᩈᩈ", "ᩁ", "ᩃ", "ᨦ", "%1ᨮ", "%1ᨻ", "ᩣ", "ᨠ", "ᨣ", "ᩁ", "ᩁ", "ᨲ"}},
entry_name = {
from = {u(0x200C)},
to = {}},
entry_name = {remove_diacritics = c.ZWNJ},
sort_key = {
Lana = "Lana-sortkey",
Thai = "Thai-sortkey"
},
}
m["noe"] = {
"နဳမာဒဳ",
3502294,
"raj",
"Deva",
translit = "hi-translit",
}
m["nof"] = {
"Nomane",
11732531,
}
m["nog"] = {
"နဝ်ကာယ်",
33871,
"trk-kno",
"Cyrl, Arab, Latn",
translit = "nog-translit",
override_translit = true,
}
m["noh"] = {
"Nomu",
11732532,
}
m["noi"] = {
"Noiri",
12953774,
"inc-bhi",
}
m["noj"] = {
"Nonuya",
5372139,
"sai-wit",
"Latn",
}
m["nok"] = {
"Nooksack",
3343396,
}
m["nol"] = {
"Nomlaki",
3343229,
"nai-wtq",
"Latn",
}
m["nom"] = {
"Nocamán",
7046289,
"sai-pan",
"Latn",
}
m["non"] = {
"နဳနိုတ်တြေံ",
35505,
"gmq",
"Latn, Runr",
translit = {Runr = "Runr-translit"},
}
m["nop"] = {
"Numanggang",
7069052,
"ngf-fin",
"Latn",
}
m["noq"] = {
"Ngongo",
11057478,
"bnt-yak",
"Latn",
}
m["nos"] = {
"Eastern Nisu",
25559419,
"tbq-nis",
}
m["not"] = {
"Nomatsiguenga",
3342992,
"awd",
"Latn",
}
m["nou"] = {
"Ewage-Notu",
5418860,
}
m["nov"] = {
"Novial",
36738,
"art",
"Latn",
type = "appendix-constructed"
}
m["now"] = {
"Nyambo",
4967930,
"bnt-haj",
"Latn",
}
m["noy"] = {
"Noy",
36321,
"alv-bua",
}
m["noz"] = {
"Nayi",
3183349,
"omv-diz",
}
m["npa"] = {
"Nar Phu",
4926353,
"sit-tam",
}
m["npb"] = {
"Nupbikha",
3695201,
"sit-ebo",
}
m["npg"] = {
"Ponyo",
7228475,
"sit-kch",
}
m["nph"] = {
"Phom",
7187109,
"sit-kch",
}
m["npl"] = {
"Southeastern Puebla Nahuatl",
4632950,
"azc-nah",
"Latn",
}
m["npn"] = {
"Mondropolon",
3320594,
"poz-aay",
}
m["npo"] = {
"Pochuri Naga",
7206342,
"tbq-anp",
}
m["nps"] = {
"Nipsan",
11732528,
}
m["npu"] = {
"Puimei Naga",
7259044,
"sit-zem",
}
m["npy"] = {
"Napu",
12953768,
}
m["nqg"] = {
"Ede Nago",
12952408,
"alv-ede",
}
m["nqk"] = {
"Kura Ede Nago",
12952409,
"alv-ede",
}
m["nql"] = {
"Ngendelengo",
63283693,
"bnt-swb",
"Latn",
}
m["nqm"] = {
"Ndom",
6983791,
"ngf",
"Latn",
}
m["nqn"] = {
"Nen",
20816352,
"paa-yam",
}
m["nqo"] = {
"အိန်'ဂဝ်",
18546266,
"dmn-man",
"Nkoo",
}
m["nqq"] = {
"Kyan-Karyaw Naga",
63283784,
"sit-tno",
}
m["nqy"] = {
"Akyaung Ari",
4702035,
"sit-tng",
}
m["nra"] = {
"Ngom",
36087,
"bnt-kel",
"Latn",
}
m["nrb"] = {
"Nara",
36179,
"sdv-nes",
}
m["nrc"] = {
"Noric",
37023,
"cel",
"Ital",
}
m["nre"] = {
"Southern Rengma Naga",
7313205,
"tbq-anp",
}
m["nrf"] = {
"နဝ်မေံ",
33850,
"roa-oil",
"Latn",
wikimedia_codes = "nrm",
ancestors = "fro-nor",
sort_key = s["roa-oil-sortkey"],
}
m["nrg"] = {
"Narango",
12952929,
"poz-vnn",
"Latn",
}
m["nri"] = {
"Chokri Naga",
5104247,
"tbq-anp",
}
m["nrk"] = {
"Ngarla",
3915860,
"aus-nga",
"Latn",
}
m["nrl"] = {
"Ngarluma",
7022078,
"aus-nga",
"Latn",
}
m["nrm"] = {
"Narom",
3336135,
"poz-swa",
"Latn",
}
m["nrn"] = {
"နန်",
36708,
"gmq-ins",
"Latn",
}
m["nrp"] = {
"ပဳသေန် သၟဝ်ကျာ",
430138,
nil,
"Ital",
translit = "Ital-translit",
}
m["nrr"] = {
"Norra",
12952967,
"tai",
}
m["nrt"] = {
"Northern Kalapuya",
3192121,
"nai-klp",
}
m["nru"] = {
"Narua",
21658869,
"sit-nas",
"Latn",
}
m["nrx"] = {
"Ngurmbur",
2591251,
}
m["nrz"] = {
"Lala (New Guinea)",
6480151,
"poz-ocw",
}
m["nsa"] = {
"Sangtam Naga",
7418144,
"sit-aao",
}
m["nsb"] = {
"Lower Nossob",
6693681,
"khi-tuu",
"Latn",
}
m["nsc"] = {
"Nshi",
11129508,
"nic-rnn",
"Latn",
}
m["nsd"] = {
"Southern Nisu",
63284284,
"tbq-nis",
}
m["nse"] = {
"Nsenga",
3081996,
"bnt-sna",
"Latn",
}
m["nsg"] = {
"Ngasa",
56345,
"sdv-lma",
}
m["nsh"] = {
"Ngoshie",
7022582,
"nic-mom",
"Latn",
}
m["nsi"] = {
"Nigerian Sign Language",
7033021,
"sgn",
}
m["nsk"] = {
"နေတ်သကာပဳ",
1704302,
"alg",
"Cans",
ancestors = "cr",
translit = "nsk-translit",
}
m["nsl"] = {
"Norwegian Sign Language",
1781613,
"sgn",
}
m["nsm"] = {
"Sema",
3478238,
"tbq-anp",
}
m["nsn"] = {
"Nehan",
3337774,
"poz-ocw",
}
m["nso"] = {
"သူထူ လ္ပာ်သၟဝ်ကျာ",
33890,
"bnt-sts",
"Latn",
}
m["nsp"] = {
"Nepalese Sign Language",
3915492,
"sgn",
}
m["nsq"] = {
"Northern Sierra Miwok",
3344226,
"nai-utn",
"Latn",
}
m["nsr"] = {
"Maritime Sign Language",
3915483,
"sgn",
}
m["nss"] = {
"Nali",
3335385,
"poz-aay",
}
m["nst"] = {
"ထေန်သ",
56350,
"sit-tno",
"Latn, Tnsa",
}
m["nsu"] = {
"Sierra Negra Nahuatl",
63284326,
"azc-nah",
"Latn",
}
m["nsv"] = {
"Southwestern Nisu",
63308004,
"tbq-nis",
}
m["nsw"] = {
"Navut",
3337327,
"poz-vnn",
"Latn",
}
m["nsx"] = {
"Nsongo",
7067577,
"bnt-tmb",
"Latn",
}
m["nsy"] = {
"Nasal",
6966574,
}
m["nsz"] = {
"Nisenan",
33665,
"nai-mdu",
"Latn",
}
m["ntd"] = {
"Northern Tidung",
24938325,
"poz-san",
}
m["nte"] = {
"Nathembo",
11030947,
"bnt-mak",
}
m["ntg"] = {
"Ngantangarra",
33060509,
}
m["nti"] = {
"Natioro",
36140,
"alv-wan",
}
m["ntj"] = {
"Ngaanyatjarra",
3915409,
"aus-pam",
"Latn",
}
m["ntk"] = {
"Ikoma",
5996114,
"bnt-lok",
"Latn",
}
m["ntm"] = {
"Nateni",
3070731,
"nic-grm",
"Latn",
}
m["nto"] = {
"Ntomba",
11130292,
"bnt-mon",
"Latn",
}
m["ntp"] = {
"ထေပ်ပုဝ်ဝါန် လ္ပာ်သၟဝ်ကျာ",
15615651,
"azc",
"Latn",
sort_key = {remove_diacritics = c.acute},
}
m["ntr"] = {
"Delo",
35195,
"nic-gne",
"Latn",
}
m["nts"] = {
"Natagaimas",
6967931,
}
m["ntu"] = {
"Natügu",
63308082,
"poz-tem",
"Latn",
}
m["ntw"] = {
"Nottoway",
3344791,
"iro-nor",
}
m["ntx"] = {
"Somra",
7560536,
"sit-tng",
}
m["nty"] = {
"Mantsi",
56878,
"sit-mnz",
}
m["nua"] = {
"Yuanga",
3573088,
"poz-cln",
"Latn",
}
m["nuc"] = {
"Nukuini",
3346231,
}
m["nud"] = {
"Ngala",
7021893,
"paa-spk",
"Latn",
}
m["nue"] = {
"Ngundu",
12952953,
"bad-cnt",
"Latn",
}
m["nuf"] = {
"Nusu",
56413,
"tbq-nus",
}
m["nug"] = {
"Nungali",
7069826,
"aus-mir",
}
m["nuh"] = {
"Ndunda",
3913968,
"nic-mmb",
"Latn",
}
m["nui"] = {
"Ngumbi",
36459,
"bnt-yko",
}
m["nuj"] = {
"Nyole (Uganda)",
3739448,
"bnt-msl",
"Latn",
}
m["nuk"] = {
"နှတ်တက",
2992876,
"wak",
"Latn",
}
m["nul"] = {
"Nusa Laut",
7070332,
"poz-cma",
}
m["num"] = {
"Niuafo'ou",
36173,
"poz-ton",
"Latn",
}
m["nun"] = {
"Anong",
2748232,
"sit-nng",
}
m["nuo"] = {
"ၚောန်",
3915785,
"mkh-vie",
"Latn",
sort_key = "vi-sortkey",
}
m["nup"] = {
"နူပဳ",
36720,
"alv-ngb",
"Latn",
entry_name = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.caron},
sort_key = "nup-sortkey",
}
m["nuq"] = {
"Nukumanu",
12909019,
"poz-pnp",
}
m["nur"] = {
"Nuguria",
7068910,
"poz-pnp",
}
m["nus"] = {
"နူအေ",
33675,
"sdv-dnu",
"Latn",
}
m["nut"] = {
"နောန်",
72695,
"tai",
"Latn, Hani",
sort_key = {Hani = "Hani-sortkey"},
}
m["nuu"] = {
"Ngbundu",
11126081,
"bad",
"Latn",
}
m["nuv"] = {
"Northern Nuni",
11016572,
"nic-gnn",
"Latn",
}
m["nuw"] = {
"Nguluwan",
6528643,
}
m["nux"] = {
"Mehek",
6809452,
"paa-spk",
"Latn",
}
m["nuy"] = {
"Nunggubuyu",
1747811,
"aus-arn",
}
m["nuz"] = {
"Tlamacazapa Nahuatl",
2073277,
"azc-nah",
"Latn",
}
m["nvh"] = {
"Nasarian",
6966614,
"poz-vnc",
"Latn",
}
m["nvm"] = {
"Namiae",
12952922,
}
m["nvo"] = {
"Nyokon",
19573407,
"nic-mbw",
"Latn",
}
m["nwa"] = {
"နဝထဳဟေနအ်",
6982892,
"alg-ara",
"Latn",
}
m["nwb"] = {
"Nyabwa",
33664,
"kro-wee",
}
m["nwc"] = {
"Classical Newar",
5128301,
"sit-new",
}
m["nwe"] = {
"Ngwe",
36181,
"bai",
"Latn",
}
m["nwi"] = {
"Southwest Tanna",
3504488,
"poz-vns",
"Latn",
}
m["nwm"] = {
"Nyamusa-Molo",
12747951,
"csu-bbk",
}
m["nwo"] = {
"Nauo",
6981305,
"aus-pam",
"Latn",
}
m["nwr"] = {
"Nawaru",
12638166,
"ngf",
}
m["nwx"] = {
"Middle Newar",
65455877,
"sit-new",
"Deva, Newa, Ranj",
ancestors = "nwc",
}
m["nwy"] = {
"Nottoway-Meherrin",
65455878,
"iro-nor",
}
m["nxa"] = {
"နောတ်အေတ်",
6981095,
"poz-tim",
}
m["nxd"] = {
"Ngando (Congo)",
3913277,
"bnt-ske",
}
m["nxe"] = {
"Nage",
2295569,
"poz-cet",
}
m["nxg"] = {
"Ngadha",
1516651,
"poz-cet",
"Latn",
}
m["nxi"] = {
"Nindi",
7038230,
"bnt-mbi",
"Latn",
}
m["nxl"] = {
"South Nuaulu",
18544857,
"poz-cma",
}
m["nxm"] = {
"Numidian",
35761,
"afa",
"Tfng, Latn", --Tfng may not support all the needed characters
}
m["nxn"] = {
"Ngawun",
3915711,
"aus-pam",
"Latn",
}
m["nxo"] = {
"Ndambomo",
6983681,
"bnt-kel",
"Latn",
}
m["nxq"] = {
"နာဃှဳ",
2478711,
"sit-nas",
"Nkdb, Nkgb, Latn, Lisu",
translit = {Lisu = "Lisu-translit"},
sort_key = {Lisu = s["Lisu-sortkey"]},
}
m["nxr"] = {
"Ninggerum",
11732526,
"ngf-okk",
"Latn",
}
m["nxu"] = {
"Narau",
6965452,
"ngf",
"Latn",
}
m["nxx"] = {
"Nafri",
6958211,
"paa-sen",
"Latn",
}
m["nyb"] = {
"Nyangbo",
36256,
"alv-ktg",
"Latn",
}
m["nyc"] = {
"Nyanga-li",
7070876,
"bnt-boa",
"Latn",
}
m["nyd"] = {
"Nyole (Kenya)",
7071227,
"bnt-msl",
"Latn",
}
m["nye"] = {
"Nyengo",
7071068,
"bnt-clu",
"Latn",
}
m["nyf"] = {
"Giryama",
3107606,
"bnt-mij",
"Latn",
}
m["nyg"] = {
"Nyindu",
11030685,
"bnt-shh",
"Latn",
}
m["nyh"] = {
"Nyigina",
3913780,
"aus-nyu",
"Latn",
}
m["nyi"] = {
"Nyimang",
34846,
"sdv-nyi",
"Latn",
}
m["nyj"] = {
"Nyanga (Congo)",
7070879,
"bnt-nyb",
"Latn",
}
m["nyk"] = {
"Nyaneka",
10962298,
"bnt-swb",
"Latn",
}
m["nyl"] = {
"Nyeu",
3033578,
"mkh-kat",
}
m["nym"] = {
"Nyamwezi",
4121131,
"bnt-tkm",
"Latn",
}
m["nyn"] = {
"နယျာန်ကိုဝ်လေဝ်",
13207,
"bnt-nyg",
"Latn",
}
m["nyo"] = {
"နယျဝ်ရုဝ်",
33794,
"bnt-nyg",
"Latn",
}
m["nyp"] = {
"Nyang'i",
7070894,
"ssa-klk",
}
m["nys"] = {
"Nyunga",
7049771,
"aus-pam",
"Latn",
}
m["nyt"] = {
"Nyawaygi",
3915783,
"aus-dyb",
}
m["nyu"] = {
"Nyungwe",
7071318,
"bnt-sna",
"Latn",
}
m["nyv"] = {
"Nyulnyul",
3442732,
"aus-nyu",
"Latn",
}
m["nyw"] = {
"နေဴ",
26425602,
"tai",
"Thai, Latn, Tayo", -- Vietnamese alphabet
sort_key = "Thai-sortkey", -- no effect on Latn
}
m["nyx"] = {
"Nganyaywana",
3913800,
"aus-cww",
"Latn",
}
m["nyy"] = {
"Nyakyusa",
3272620,
"bnt-run",
"Latn",
}
m["nza"] = {
"ထိုၚ်ဂန် အာန်ဗာန်ဗေ",
36518,
"nic-jkn",
"Latn",
}
m["nzb"] = {
"Njebi",
35923,
"bnt-nze",
"Latn",
}
m["nzd"] = {
"နဇာဒဳ",
17152586,
"bnt-bdz",
"Latn",
entry_name = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.caron},
}
m["nzi"] = {
"Nzima",
36337,
"alv-ctn",
}
m["nzk"] = {
"Nzakara",
3913339,
"znd",
"Latn",
}
m["nzm"] = {
"Zeme Naga",
21491053,
"sit-zem",
}
m["nzs"] = {
"New Zealand Sign Language",
36239,
"sgn",
}
m["nzu"] = {
"Central Teke",
36473,
"bnt-tkc",
}
m["nzy"] = {
"Nzakambay",
36374,
"alv-mbm",
"Latn",
}
m["nzz"] = {
"Nanga Dama Dogon",
6963443,
"nic-nwa",
}
return require("Module:languages").finalizeData(m, "language")
jta85r0zr7jgcn28revpxqx01ej97fx
မဝ်ဂျူ:languages/data/3/t
828
661
385840
385055
2026-04-07T09:32:40Z
Intobesa.bot
1035
Bot: ပလေဝ်ဒါန်
385840
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"] = {
"တဗါသာရာန်",
34079,
"cau-esm",
"Cyrl, Latn, Arab",
translit = "tab-translit",
override_translit = true,
display_text = {Cyrl = s["cau-Cyrl-displaytext"]},
entry_name = {
Cyrl = s["cau-Cyrl-entryname"],
Latn = s["cau-Latn-entryname"],
},
sort_key = "tab-sortkey",
}
m["tac"] = {
"Lowland Tarahumara",
15616384,
"azc-trc",
"Latn",
}
m["tad"] = {
"Tause",
2356440,
"paa-lkp",
"Latn",
}
m["tae"] = {
"Tariana",
732726,
"awd-nwk",
"Latn",
}
m["taf"] = {
"ထာပေအ်ရာပဵု",
7684673,
"tup-gua",
"Latn",
}
m["tag"] = {
"Tagoi",
36537,
"nic-ras",
"Latn",
}
m["taj"] = {
"တမာန် လ္ပာ်ဖာဗၟံက်",
12953177,
"sit-tam",
"sit-tam-Tibt, Deva",
display_text = {["sit-tam-Tibt"] = s["Tibt-displaytext"]},
entry_name = {["sit-tam-Tibt"] = s["Tibt-entryname"]},
}
m["tak"] = {
"Tala",
3914494,
"cdc-wst",
"Latn",
}
m["tal"] = {
"Tal",
3440387,
"cdc-wst",
"Latn",
}
m["tan"] = {
"Tangale",
529921,
"cdc-wst",
"Latn",
}
m["tao"] = {
"ယျာမိ",
715760,
"phi",
"Latn",
}
m["tap"] = {
"Taabwa",
7673650,
"bnt-sbi",
"Latn",
}
m["tar"] = {
"ထာရာန်ဟူမာရာန် ဗဟဵု",
20090009,
"azc-trc",
"Latn",
sort_key = {remove_diacritics = c.acute .. "ꞌ"},
}
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-mad",
"Latn",
}
m["tax"] = {
"Tamki",
3449082,
"cdc-est",
"Latn",
}
m["tay"] = {
"အာတာယော",
715766,
"map-ata",
"Latn",
}
m["taz"] = {
"Tocho",
36680,
"alv-tal",
"Latn",
}
m["tba"] = {
"Aikanã",
3409307,
"qfa-iso",
"Latn",
}
m["tbb"] = {
"Tapeba",
12953908,
}
m["tbc"] = {
"Takia",
3514336,
"poz-oce",
}
m["tbd"] = {
"Kaki Ae",
6349417,
"poz-ocw",
"Latn",
}
m["tbe"] = {
"Tanimbili",
3515188,
"poz-tem",
"Latn",
}
m["tbf"] = {
"Mandara",
3285424,
"poz-ocw",
"Latn",
}
m["tbg"] = {
"North Tairora",
20210398,
"paa-kag",
}
m["tbh"] = {
"Thurawal",
3537135,
"aus-yuk",
}
m["tbi"] = {
"Gaam",
35338,
"sdv-eje",
"Latn",
}
m["tbj"] = {
"Tiang",
3528020,
"poz-ocw",
"Latn",
}
m["tbk"] = {
"Calamian Tagbanwa",
3915487,
"phi-kal",
}
m["tbl"] = {
"Tboli",
7690594,
"phi",
"Latn",
}
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-lkp",
"Latn",
}
m["tbr"] = {
"Tumtum",
3407029,
"qfa-kad",
}
m["tbs"] = {
"Tanguat",
7683166,
"paa",
"Latn",
}
m["tbt"] = {
"Kitembo",
13123561,
"bnt-shh",
"Latn",
}
m["tbu"] = {
"Tubar",
56730,
"azc-trc",
"Latn",
}
m["tbv"] = {
"Tobo",
7811712,
"ngf",
}
m["tbw"] = {
"Tagbanwa",
3915475,
"phi",
"Latn",
}
m["tbx"] = {
"Kapin",
6366665,
"poz-ocw",
"Latn",
}
m["tby"] = {
"ထေက်ဗရု",
11732670,
"paa-nha",
"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"] = {
"Southern Tutchone",
31091048,
"ath-nor",
"Latn",
}
m["tcf"] = {
"Malinaltepec Tlapanec",
25559732,
"omq",
"Latn",
}
m["tcg"] = {
"Tamagario",
7680531,
"ngf",
}
m["tch"] = {
"Turks and Caicos Creole English",
7855478,
"crp",
"Latn",
ancestors = "en",
}
m["tci"] = {
"Wára",
20825638,
"paa-yam",
}
m["tck"] = {
"Tchitchege",
36595,
"bnt-tek",
}
m["tcl"] = {
"တာမာန် (ဍုၚ်ဗၟာ)",
15616518,
"sit-jnp",
"Latn",
}
m["tcm"] = {
"Tanahmerah",
3514927,
"ngf",
}
m["tco"] = {
"Taungyo",
12953186,
"tbq-brm",
ancestors = "obr",
}
m["tcp"] = {
"Tawr Chin",
7689338,
"tbq-kuk",
}
m["tcq"] = {
"Kaiy",
6348709,
"paa-lkp",
}
m["tcs"] = {
"ခရဳအဝ်လ် ကလိုဟ်ၜဳ တုဝ်ရေက်သ်",
36648,
"crp",
"Latn",
ancestors = "en",
}
m["tct"] = {
"T'en",
3442330,
"qfa-kms",
}
m["tcu"] = {
"Southeastern Tarahumara",
36807,
"azc-trc",
"Latn",
}
m["tcw"] = {
"Tecpatlán Totonac",
7692795,
"nai-ttn",
"Latn",
}
m["tcx"] = {
"တဝ်ဒါ",
34042,
"dra-tkt",
"Taml",
--translit = {Taml = "Taml-translit"},
}
m["tcy"] = {
"တူဠူ",
34251,
"dra-tlk",
"Tutg, Mlym, Knda", -- Tigalari is not available. Mlym is nearer than Knda but both lack ɛ/ɛː.
translit = {
Mlym = "ml-translit",
Knda = "kn-translit",
},
}
m["tcz"] = {
"Thado Chin",
6583558,
"tbq-kuk",
}
m["tda"] = {
"Tagdal",
36570,
"son",
}
m["tdb"] = {
"Panchpargania",
21946879,
"inc-eas",
"Deva, as-Beng, Orya, Chis",
ancestors = "bh",
}
m["tdc"] = {
"Emberá-Tadó",
3052041,
"sai-chc",
"Latn",
}
m["tdd"] = {
"သေံတာဲခေါၚ်",
36556,
"tai-swe",
"Tale",
translit = "Tale-translit",
entry_name = {remove_diacritics = c.ZWNJ .. c.ZWJ},
}
m["tde"] = {
"Tiranige Diga Dogon",
5313387,
"nic-dgw",
}
m["tdf"] = {
"Talieng",
37525108,
"mkh-ban",
}
m["tdg"] = {
"တမာန် လ္ပာ်ဖာပလိုတ်",
12953178,
"sit-tam",
"sit-tam-Tibt, Deva",
display_text = {["sit-tam-Tibt"] = s["Tibt-displaytext"]},
entry_name = {["sit-tam-Tibt"] = s["Tibt-entryname"]},
}
m["tdh"] = {
"Thulung",
56553,
"sit-kiw",
}
m["tdi"] = {
"Tomadino",
7818197,
"poz-btk",
"Latn",
}
m["tdj"] = {
"တာဂျဳယျဝ်",
7676870,
"poz",
}
m["tdk"] = {
"Tambas",
3440392,
"cdc-wst",
}
m["tdl"] = {
"Sur",
3914453,
"nic-tar",
}
m["tdm"] = {
"Taruma",
5559094,
}
m["tdn"] = {
"Tondano",
3531514,
"phi",
}
m["tdo"] = {
"Teme",
3913994,
"alv-mye",
}
m["tdq"] = {
"Tita",
3914899,
"nic-bco",
}
m["tdr"] = {
"Todrah",
7812881,
"mkh",
}
m["tds"] = {
"Doutai",
5302331,
"paa-lkp",
}
m["tdt"] = {
"Tetun Dili",
12643484,
"poz-tim",
"Latn",
}
m["tdu"] = {
"Tempasuk Dusun",
3529155,
"poz-san",
}
m["tdv"] = {
"Toro",
3438367,
"nic-alu",
}
m["tdy"] = {
"Tadyawan",
7674700,
"phi",
}
m["tea"] = {
"Temiar",
3914693,
"mkh-asl",
}
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",
}
m["tef"] = {
"Teressa",
3518362,
"aav-nic",
}
m["teg"] = {
"Teke-Tege",
36478,
"bnt-tek",
}
m["teh"] = {
"ထာယ်ဝေပ်သ်",
33930,
"sai-cho",
"Latn",
}
m["tei"] = {
"Torricelli",
3450788,
"qfa-tor",
}
m["tek"] = {
"Ibali Teke",
2802914,
"bnt-tek",
}
m["tem"] = {
"Temne",
36613,
"alv-mel",
}
m["ten"] = {
"Tama (Colombia)",
3832969,
"sai-tuc",
"Latn",
}
m["teo"] = {
"Ateso",
29474,
"sdv-ttu",
"Latn",
}
m["tep"] = {
"Tepecano",
3915525,
"azc",
"Latn",
}
m["teq"] = {
"Temein",
7698064,
"sdv",
}
m["ter"] = {
"Tereno",
3314742,
"awd",
"Latn",
}
m["tes"] = {
"Tengger",
12473479,
"poz",
}
m["tet"] = {
"တေထီု",
34125,
"poz-tim",
"Latn",
}
m["teu"] = {
"စူ",
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"] = {
"ထေတ်သေရေတ်",
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"] = {
"တာယ်ရဳဗာယ်",
36533,
"cba",
}
m["tft"] = {
"ဒေနာတ်တေ",
3518492,
"paa-nha",
"Latn, Arab",
}
m["tga"] = {
"Sagalla",
12953082,
"bnt-cht",
}
m["tgb"] = {
"Tobilung",
12953913,
"poz-san",
}
m["tgc"] = {
"Tigak",
3528276,
"poz-ocw",
}
m["tgd"] = {
"Ciwogai",
3438799,
"cdc-wst",
}
m["tge"] = {
"ဂေါ်ခါ တာမာန် လ္ပာ်ဖာဗၟံက်",
12953175,
"sit-tam",
"sit-tam-Tibt, Deva",
display_text = {["sit-tam-Tibt"] = s["Tibt-displaytext"]},
entry_name = {["sit-tam-Tibt"] = s["Tibt-entryname"]},
}
m["tgf"] = {
"ချာလဳ",
3695197,
"sit-ebo",
"Tibt, Latn",
translit = {Tibt = "Tibt-translit"},
override_translit = true,
display_text = {Tibt = s["Tibt-displaytext"]},
entry_name = {Tibt = s["Tibt-entryname"]},
sort_key = {Tibt = "Tibt-sortkey"},
}
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"] = {
"တာန်ဂဝ်အာ",
2410276,
"poz-vnn",
"Latn",
}
m["tgq"] = {
"Tring",
7842360,
"poz-swa",
}
m["tgr"] = {
"Tareng",
25559541,
"mkh",
}
m["tgs"] = {
"Nume",
3346290,
"poz-vnn",
"Latn",
}
m["tgt"] = {
"တဂ်ဗါန်ဝါ ဗဟဵု",
3915515,
"phi",
"Tagb",
}
m["tgu"] = {
"Tanggu",
7682930,
"paa",
"Latn",
}
m["tgv"] = {
"Tingui-Boto",
7808195,
"sai-mje",
"Latn",
}
m["tgw"] = {
"Tagwana Senoufo",
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",
}
m["thf"] = {
"Thangmi",
7710314,
"sit-new",
}
m["thh"] = {
"Northern Tarahumara",
15616395,
"azc-trc",
"Latn",
}
m["thi"] = {
"Tai Long",
25559562,
"tai-swe",
}
m["thk"] = {
"Tharaka",
15407179,
"bnt-kka",
}
m["thl"] = {
"Dangaura Tharu",
22083815,
"inc-tha",
}
m["thm"] = {
"ကသၚ်",
34780,
"mkh-vie",
"Thai", --Laoo is feasible but no evidence yet.
sort_key = "Thai-sortkey",
}
m["thn"] = {
"Thachanadan",
7708880,
"dra-mal",
}
m["thp"] = {
"တိုဝ်mpson",
1755054,
"sal",
}
m["thq"] = {
"Kochila Tharu",
22083826,
"inc-tha",
}
m["thr"] = {
"Rana Tharu",
12953920,
"inc-tha",
}
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-okk",
}
m["tig"] = {
"တဳဂရာန်",
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",
}
m["tim"] = {
"Timbe",
7804599,
"ngf",
}
m["tin"] = {
"ထေန်ဒဳ",
36860,
"cau-and",
"Cyrl",
translit = "cau-nec-translit",
override_translit = true,
display_text = {Cyrl = s["cau-Cyrl-displaytext"]},
entry_name = {Cyrl = s["cau-Cyrl-entryname"]},
}
m["tio"] = {
"ထဳအာ်",
3518239,
"poz-ocw",
}
m["tip"] = {
"Trimuris",
7842270,
"paa-tkw",
}
m["tiq"] = {
"Tiéfo",
3914874,
"alv-sav",
}
m["tis"] = {
"Masadiit Itneg",
18748769,
"phi",
}
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"] = {
"တဳရူရာန်",
7809425,
"phi",
"Latn",
}
m["tiz"] = {
"Tai Hongjin",
3915716,
"tai-swe",
}
m["tja"] = {
"Tajuasohn",
3915326,
"kro-wkr",
}
m["tjg"] = {
"တုန်ဂျွေန်",
3542117,
"poz",
}
m["tji"] = {
"ထူစေၚ်ယျာ လ္ပာ်သၟဝ်ကျာ",
12953229,
"sit-tja",
}
m["tjl"] = {
"သေံဍာဲ",
7675773,
"tai-swe",
"Mymr",
translit = "tjl-translit",
}
m["tjm"] = {
"Timucua",
638300,
"qfa-iso",
}
m["tjn"] = {
"Tonjon",
3913372,
"dmn-jje",
}
m["tjs"] = {
"Southern Tujia",
12633994,
"sit-tja",
"Latn",
}
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",
}
m["tkd"] = {
"တူခူဒေဒေ",
36863,
"poz-tim",
"Latn",
}
m["tke"] = {
"Takwane",
11030092,
"bnt-mak",
ancestors = "vmw",
}
m["tkf"] = {
"Tukumanféd",
42330115,
"tup-gua",
"Latn",
}
m["tkl"] = {
"တဝ်ကဲလော",
34097,
"poz-pnp",
"Latn",
}
m["tkm"] = {
"Takelma",
56710,
}
m["tkn"] = {
"တဝ်ကူ-နဝ်-ဃှဳမ",
3530484,
"jpx-nry",
"Jpan",
translit = s["jpx-translit"],
display_text = s["jpx-displaytext"],
entry_name = s["jpx-entryname"],
sort_key = s["jpx-sortkey"],
}
m["tkp"] = {
"Tikopia",
36682,
"poz-pnp",
"Latn",
}
m["tkq"] = {
"Tee",
3075144,
"nic-ogo",
"Latn",
}
m["tkr"] = {
"သာတ်ခေါန်",
36853,
"cau-wsm",
"Cyrl, Latn, Arab",
display_text = {Cyrl = s["cau-Cyrl-displaytext"]},
entry_name = {
Cyrl = s["cau-Cyrl-entryname"],
Latn = s["cau-Latn-entryname"],
},
}
m["tks"] = {
"Ramandi",
25261947,
"xme-ttc",
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-okk",
}
m["tkz"] = {
"Takua",
7678544,
"mkh",
}
m["tla"] = {
"Southwestern Tepehuan",
3518245,
"azc",
"Latn",
}
m["tlb"] = {
"တဝ်ဗါယ်ဋ္ဌဝ်",
1142333,
"paa-nha",
}
m["tlc"] = {
"Misantla Totonac",
56460,
"nai-ttn",
"Latn",
}
m["tld"] = {
"Talaud",
7678964,
"phi",
}
m["tlf"] = {
"Telefol",
7696150,
"ngf-okk",
}
m["tlg"] = {
"Tofanma",
4461493,
"paa-pau",
}
m["tlh"] = {
"ခလေန်ဂွါန်",
10134,
"art",
"Latn",
type = "appendix-constructed",
}
m["tli"] = {
"ထလေန်ကေတ်",
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",
}
m["tls"] = {
"Tambotalo",
7681065,
"poz-vnn",
"Latn",
}
m["tlt"] = {
"Teluti",
12953194,
"poz-cma",
}
m["tlu"] = {
"Tulehu",
7852006,
"poz-cma",
}
m["tlv"] = {
"တာလဳၜေအ်",
3514498,
"poz-cma",
"Latn",
}
m["tlx"] = {
"Khehek",
3196124,
"poz-aay",
}
m["tly"] = {
"တာလေတ်",
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,
"ngf-mad",
}
m["tme"] = {
"Tremembé",
5246937,
}
m["tmf"] = {
"Toba-Maskoy",
3033544,
"sai-mas",
"Latn",
}
m["tmg"] = {
"ဒေနာတ်တေño",
7232597,
}
m["tmh"] = {
"ထူအာ်ရေတ်",
34065,
"ber",
"Latn, Tfng, Arab",
entry_name = {remove_diacritics = c.grave .. c.acute .. c.circ},
}
m["tmi"] = {
"Tutuba",
7857052,
"poz-vnn",
"Latn",
}
m["tmj"] = {
"Samarokena",
7408865,
"paa-tkw",
}
m["tmk"] = {
"တမာန် လ္ပာ်ဖာဒိုဟ်ပလိုတ်သၟဝ်ကျာ",
15616509,
"sit-tam",
"sit-tam-Tibt, Deva",
display_text = {["sit-tam-Tibt"] = s["Tibt-displaytext"]},
entry_name = {["sit-tam-Tibt"] = s["Tibt-entryname"]},
}
m["tml"] = {
"Tamnim Citak",
12643315,
"ngf",
}
m["tmm"] = {
"Tai Thanh",
7675842,
"tai-swe",
}
m["tmn"] = {
"တာမာန် (အိန်ဒဝ်နဳယျာ)",
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-lkp",
}
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-mad",
"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",
}
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",
}
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",
}
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,
}
m["tog"] = {
"Tonga (Malawi)",
3847648,
"bnt-nys",
"Latn",
}
m["toh"] = {
"Tonga (Mozambique)",
7820988,
"bnt-bso",
}
m["toi"] = {
"Tonga (Zambia)",
34101,
"bnt-bot",
}
m["toj"] = {
"Tojolabal",
36762,
"myn",
}
m["tok"] = {
"တဝ်ကဳ ပဝ်နာ",
36846,
"art",
"Latn",
type = "appendix-constructed",
}
m["tol"] = {
"Tolowa",
20827,
"ath-pco",
"Latn",
}
m["tom"] = {
"Tombulu",
3531199,
"phi",
}
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"] = {
"တိုဝ်",
22694631,
"mkh-vie",
}
m["tov"] = {
"Upper Taromi",
12953183,
"xme-ttc",
ancestors = "xme-ttc-cen",
}
m["tow"] = {
"Jemez",
3912876,
"nai-kta",
"Latn",
}
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"] = {
"Azoyú Me'phaa",
25559730,
"omq",
}
m["tpe"] = {
"Tippera",
16115423,
"tbq-bdg",
}
m["tpf"] = {
"Tarpia",
12953185,
"poz-ocw",
}
m["tpg"] = {
"Kula",
6442714,
"qfa-tap",
}
m["tpi"] = {
"တေဝ်ဖါဲသေၚ်",
34159,
"crp",
"Latn",
ancestors = "en",
}
m["tpj"] = {
"Tapieté",
3121063,
}
m["tpk"] = {
"Tupinikin",
33924,
"tup-gua",
}
m["tpl"] = {
"Tlacoapa Me'phaa",
16115511,
"omq",
}
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"] = {
"တူပဳတြေံ",
56944,
"tup-gua",
"Latn",
}
m["tpx"] = {
"Acatepec Me'phaa",
31157882,
"omq",
"Latn",
}
m["tpy"] = {
"Trumai",
12294279,
"qfa-iso",
}
m["tpz"] = {
"Tinputz",
3529205,
"poz-ocw",
}
m["tqb"] = {
"ထာန်ဗေန်",
10322157,
"tup-gua",
"Latn",
}
m["tql"] = {
"Lehali",
3229119,
"poz-vnn",
"Latn",
}
m["tqm"] = {
"Turumsa",
7856508,
"paa",
}
m["tqn"] = {
"Tenino",
15699255,
"nai-shp",
"Latn",
ancestors = "nai-spt",
}
m["tqo"] = {
"Toaripi",
7811403,
"ngf",
}
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"] = {
"ထံၚ်ခါဝါ",
2454881,
"qfa-iso",
}
m["tra"] = {
"တဳရာဟဳ",
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",
ancestors = "en",
}
m["trg"] = {
"Lishán Didán",
56473,
"sem-nna",
}
m["trh"] = {
"Turaka",
12953237,
"ngf",
}
m["tri"] = {
"ထရဳအဝ်",
56885,
"sai-tar",
"Latn",
}
m["trj"] = {
"Toram",
3441225,
"cdc-est",
}
m["trl"] = {
"Traveller Scottish",
3915671,
"qfa-mix",
"Latn",
ancestors = "rom, sco",
}
m["trm"] = {
"ထရေဂါမဳ",
34081,
"nur-sou",
}
m["trn"] = {
"Trinitario",
3539279,
"awd",
}
m["tro"] = {
"Tarao",
3515603,
"tbq-kuk",
"Latn",
}
m["trp"] = {
"Kokborok",
35947,
"tbq-bdg",
}
m["trq"] = {
"San Martín Itunyoso Triqui",
12953934,
"omq-tri",
"Latn",
}
m["trr"] = {
"Taushiro",
1957508,
}
m["trs"] = {
"Chicahuaxtla Triqui",
3539587,
"omq-tri",
"Latn",
}
m["trt"] = {
"Tunggare",
615071,
"paa-egb",
"Latn",
}
m["tru"] = {
"တဝ်ရဝ်ယဝ်",
34040,
"sem-cna",
"Syrc, Latn",
entry_name = "Syrc-entryname",
translit = "tru-translit",
}
m["trv"] = {
"တာရုဝ်ကိုအ်",
716686,
"map-ata",
"Latn",
}
m["trw"] = {
"တောဝ်ဝါလဳ",
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"] = {
"သေပ်ခါဝ်နဳယာန်",
220607,
"grk",
"Grek",
ancestors = "grc-dor",
translit = "el-translit",
entry_name = {remove_diacritics = c.caron .. c.diaerbelow .. c.brevebelow},
sort_key = s["Grek-sortkey"],
}
m["tse"] = {
"Tunisian Sign Language",
7853191,
"sgn",
}
m["tsf"] = {
"Southwestern Tamang",
12953176,
"sit-tam",
}
m["tsg"] = {
"ထာဴသု",
34142,
"phi",
"Latn, Arab",
}
m["tsh"] = {
"Tsuvan",
3502326,
"cdc-cbm",
}
m["tsi"] = {
"Tsimshian",
20085721,
"nai-tsi",
}
m["tsj"] = {
"ချာန်လာ",
36840,
"sit-tsk",
"Tibt, Latn, Deva",
translit = {Tibt = "Tibt-translit"},
override_translit = true,
display_text = {Tibt = s["Tibt-displaytext"]},
entry_name = {Tibt = s["Tibt-entryname"]},
sort_key = {Tibt = "Tibt-sortkey"},
}
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"] = {
"တသျော",
716681,
"map",
"Latn",
}
m["tsv"] = {
"Tsogo",
36674,
"bnt-tso",
}
m["tsw"] = {
"Tsishingini",
13123571,
"nic-kam",
}
m["tsx"] = {
"Mubami",
6930815,
"ngf",
}
m["tsy"] = {
"Tebul Sign Language",
7692090,
"sgn",
}
m["tta"] = {
"Tutelo",
2311602,
"sio-ohv",
}
m["ttb"] = {
"Gaa",
3438361,
"nic-dak",
}
m["ttc"] = {
"Tektiteko",
36686,
"myn",
}
m["ttd"] = {
"Tauade",
7688634,
}
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"] = {
"တိုဝ်ရုဝ်",
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-pau",
}
m["tto"] = {
"Lower Ta'oih",
25559539,
"mkh-kat",
}
m["ttp"] = {
"Tombelala",
6799663,
"poz-kal",
}
m["ttr"] = {
"Tera",
56267,
"cdc-cbm",
}
m["tts"] = {
"ဣသၚ်",
33417,
"tai-swe",
"Thai",
sort_key = "Thai-sortkey",
}
m["ttt"] = {
"ထေပ်",
56489,
"ira-swi",
"Cyrl, Latn, Armn, fa-Arab",
ancestors = "fa",
}
m["ttu"] = {
"Torau",
3532208,
"poz-ocw",
}
m["ttv"] = {
"Titan",
3445811,
"poz-aay",
}
m["ttw"] = {
"Long Wat",
7856961,
"poz-swa",
}
m["tty"] = {
"Sikaritai",
7513600,
"paa-lkp",
}
m["ttz"] = {
"Tsum",
12953223,
"sit-kyk",
}
m["tua"] = {
"Wiarumus",
7998045,
"qfa-tor",
"Latn",
}
m["tub"] = {
"ထူဗါတူလာဗါန်",
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",
}
m["tug"] = {
"Tunia",
863721,
"alv-bua",
}
m["tuh"] = {
"Taulil",
3516141,
"paa-bng",
}
m["tui"] = {
"Tupuri",
36646,
"alv-mbm",
"Latn",
}
m["tuj"] = {
"Tugutil",
12953228,
"paa-nha"
}
m["tul"] = {
"Tula",
3914907,
"alv-wjk",
}
m["tum"] = {
"Tumbuka",
34138,
"bnt-nys",
"Latn",
}
m["tun"] = {
"Tunica",
56619,
"qfa-iso",
"Latn",
}
m["tuo"] = {
"တူကာနဝ်",
3541834,
"sai-tuc",
"Latn",
}
m["tuq"] = {
"Tedaga",
36639,
"ssa-sah",
}
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"] = {
"တူဝါဠူအာန်",
34055,
"poz-pnp",
"Latn",
}
m["tvm"] = {
"Tela-Masbuar",
7695666,
"poz-tim",
}
m["tvn"] = {
"ဟဝါဲ",
7689158,
"tbq-brm",
"Mymr",
ancestors = "obr",
}
m["tvo"] = {
"ထဳဒါဝ်ရေ",
3528199,
"paa-nha",
"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"] = {
"ထိုၚ်ဝဲအာန်",
1975271,
"map",
"Latn",
}
m["tvy"] = {
"Timor Pidgin",
4904029,
"crp",
ancestors = "pt",
}
m["twa"] = {
"Twana",
7857412,
"sal",
}
m["twb"] = {
"Western Tawbuid",
12953912,
"phi",
}
m["twc"] = {
"Teshenawa",
3436597,
"phi",
}
m["twe"] = {
"Teiwa",
3519302,
"ngf",
"Latn",
}
m["twf"] = {
"ထောဴ",
7684320,
"nai-kta",
"Latn",
}
m["twg"] = {
"Tereweng",
12953200,
"qfa-tap",
}
m["twh"] = {
"သေံခဴ",
7675751,
"tai-swe",
"Tavt",
translit = "Tavt-translit",
sort_key = {
from = {"[꪿ꫀ꫁ꫂ]", "([ꪵꪶꪹꪻꪼ])([ꪀ-ꪯ])"},
to = {"", "%2%1"}
},
}
m["twm"] = {
"တဝါန် မန်ပါ",
36586,
"sit-ebo",
"Tibt",
translit = "Tibt-translit",
override_translit = true,
display_text = s["Tibt-displaytext"],
entry_name = s["Tibt-entryname"],
sort_key = "Tibt-sortkey",
}
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"] = {
"Southwestern Tarahumara",
12953909,
"azc-trc",
"Latn",
}
m["twt"] = {
"Turiwára",
3542307,
"tup-gua",
"Latn",
}
m["twu"] = {
"Termanu",
7702572,
"poz-tim",
}
m["tww"] = {
"Tuwari",
7857159,
"paa-spk",
}
m["twy"] = {
"တာဝဝ်ယျာန်",
3513542,
"poz-bre",
}
m["txa"] = {
"Tombonuo",
7818692,
"poz-san",
}
m["txb"] = {
"တဝ်ချာရေဝ်ယာန် ဗဳ",
3199353,
"ine-toc",
"Latn",
wikipedia_article = "Tocharian languages", -- wikidata id has no associated article
standardChars = "AaÄäĀāCcEeIiKkLlMmṂṃNnṄṅÑñOoPpRrSsŚśṢṣTtUuWwYy" .. c.punc,
}
m["txc"] = {
"Tsetsaut",
20829,
"ath-nor",
"Latn",
}
m["txe"] = {
"Totoli",
7828387,
"poz-tot",
"Latn",
}
m["txg"] = {
"တာန်ဂူ",
2727930,
"sit-qia",
"Tang",
translit = "txg-translit",
}
m["txj"] = {
"Tarjumo",
24906088,
"ssa-sah",
"Latn, Arab",
}
m["txh"] = {
"တရသဳယာန်",
36793,
"ine",
"Latn, Grek",
translit = "el-translit",
}
m["txi"] = {
"ဣကာပ်ပါပ်",
9344891,
"sai-pek",
"Latn",
}
m["txm"] = {
"Tomini",
7818911,
"poz",
}
m["txn"] = {
"West Tarangan",
3515594,
"poz",
}
m["txo"] = {
"တဝ်တဝ်",
36709,
"sit-dhi",
"Beng, Toto"
}
m["txq"] = {
"Tii",
7801784,
"poz-tim",
}
m["txr"] = {
"Tartessian",
36795,
}
m["txs"] = {
"Tonsea",
3531659,
"phi",
}
m["txt"] = {
"Citak",
3447279,
"ngf",
}
m["txu"] = {
"Kayapó",
3101212,
"sai-nje",
"Latn",
}
m["txx"] = {
"Tatana",
18643518,
"poz-san",
}
m["tya"] = {
"Tauya",
7688978,
"ngf-mad",
}
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",
"Thai, Latn, Tayo", -- Vietnamese alphabet
}
m["tyl"] = {
"Thu Lao",
12953921,
"tai-cen",
}
m["tyn"] = {
"Kombai",
6428241,
"ngf",
}
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"] = {
"တူဗါန်",
34119,
"trk-ssb",
"Cyrl",
translit = "tyv-translit",
override_translit = true,
sort_key = "tyv-sortkey",
}
m["tyx"] = {
"ထေကာအ်-ထျာၚ်",
36634,
"bnt-nze",
}
m["tyz"] = {
"ထာၚ်", -- This does not mean its umbrella "Tai" languages.
2511476,
"tai-tay",
"Latn, Hani",
sort_key = {Hani = "Hani-sortkey"},
}
m["tza"] = {
"Tanzanian Sign Language",
7684177,
"sgn",
}
m["tzh"] = {
"တာယ်ဇြာယ်လ်တဴလ်",
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"] = {
"အာက်လေတ် ထာမာသေတ် ဗဟဵု",
49741,
"ber",
"Tfng, Arab, Latn",
translit = "Tfng-translit",
}
m["tzn"] = {
"Tugun",
12953225,
"poz-tim",
}
m["tzo"] = {
"သအ်သေန်",
36809,
"myn",
"Latn",
}
m["tzx"] = {
"Tabriak",
56872,
"paa-lsp",
"Latn",
}
return require("Module:languages").finalizeData(m, "language")
7q7ox8mteretaipswlhg62h2ksduaz1
မဝ်ဂျူ:vi-sortkey
828
1301
385832
136226
2026-04-07T08:53:04Z
咽頭べさ
33
385832
Scribunto
text/plain
local export = {}
local m_str_utils = require("Module:string utilities")
local gsub = m_str_utils.gsub
local lower = m_str_utils.lower
local toNFC = mw.ustring.toNFC
local toNFD = mw.ustring.toNFD
local u = m_str_utils.char
local upper = m_str_utils.upper
local a, b = u(0xF000), u(0xF001)
local diacritics = {
--[===[--Order given by Stephen G. Brown
[u(0x0301)] = c, -- acute
[u(0x0300)] = d, -- grave
[u(0x0309)] = e, -- hook
[u(0x0303)] = f, -- tilde
[u(0x0323)] = g -- dot above]===]
-- Order given by Fumiko Take
[u(0x0300)] = "!", -- grave
[u(0x0309)] = "#", -- hook
[u(0x0303)] = "$", -- tilde
[u(0x0301)] = "%", -- acute
[u(0x0323)] = "&" -- dot above
}
local oneChar = { -- separate letters
["ă"] = "a" .. a, ["â"] = "a" .. b, ["đ"] = "d" .. a, ["ê"] = "e" .. a, ["ô"] = "o" .. a, ["ơ"] = "o" .. b, ["ư"] = "u" .. a
}
function export.makeSortKey(text, lang, sc)
text = gsub(lower(toNFD(text)), ".", diacritics)
text = gsub(text, "([!-&])([^%s]+)", "%2%1")
return upper(gsub(toNFC(text), ".", oneChar))
end
local vi = require("Module:languages").getByCode("vi")
local function tag(text)
return require("Module:script utilities").tag_text(text, vi)
end
local showsubst = {
[a] = "₂", [b] = "₃", ["!"] = "²", ["#"] = "³", ["$"] = "⁴", ["%"] = "⁵", ["&"] = "⁶"
}
function export.showSortkey(frame)
local output = {}
for _, word in ipairs(frame.args) do
local sc = vi:findBestScript(word):getCode()
local sortkey = gsub(export.makeSortKey(word, "vi", sc), ".", showsubst)
sortkey = gsub(sortkey, "([^0-9²³⁴⁵⁶])$", "%1¹")
sortkey = gsub(sortkey, "([^0-9²³⁴⁵⁶])(%s)", "%1¹%2")
local example = "\n* <code>" .. sortkey .. "</code>\n: " .. tag(word)
table.insert(output, example)
end
return table.concat(output)
end
function export.showSorting(frame)
local terms = {}
for _, term in ipairs(frame.args) do
table.insert(terms, term)
end
local makeSortKey = require("Module:memoize")(export.makeSortKey)
local function comp(term1, term2)
return makeSortKey(term1) < makeSortKey(term2)
end
table.sort(terms, comp)
for i, term in pairs(terms) do
local sc = vi:findBestScript(term):getCode()
local sortkey = gsub(export.makeSortKey(term, "vi", sc), ".", showsubst)
sortkey = gsub(sortkey, "([^0-9²³⁴⁵⁶])$", "%1¹")
sortkey = gsub(sortkey, "([^0-9²³⁴⁵⁶])(%s)", "%1¹%2")
terms[i] = "\n* " .. tag(term) .. " (<code>" .. sortkey .. "</code>)"
end
return table.concat(terms)
end
return export
99gtmslomokvnht9jjucda14p66cmre
mười
0
7746
385841
267817
2026-04-07T09:35:46Z
咽頭べさ
33
385841
wikitext
text/x-wiki
{{also|muoi|muôi|muối|muỗi|muội|mươi|muồi}}
==ၚောန်==
===နိရုတ်===
ဝေါဟာကၠုၚ်နူ {{inh|nuo|mkh-vie-pro|*maːl}}
===ဗွဟ်ရမ္သာၚ်===
* {{IPA|nuo|/mɨəj²/}}
===ဂၞန်သၚ်္ချာ===
{{head|nuo|numeral|sort=mười}}
# [[စှ်]]။
==ထာၚ်==
===ဗွဟ်ရမ္သာၚ်===
* {{tyz-IPA}}
===နာမ်===
{{tyz-noun|枚}}
# {{synonym of|tyz|muồi}}
==တိုဝ်==
{{cardinalbox|tou|9|10|11|chỉn|mười một}}
===နိရုတ်===
ဝေါဟာကၠုၚ်နူ {{inh|tou|mkh-vie-pro|*maːl}}
===ဗွဟ်ရမ္သာၚ်===
*{{IPA|tou|/mɨəj²/}}
===ဂၞန်သၚ်္ချာ===
{{head|tou|numeral|sort=mười}}
# [[စှ်]]။
=={{=vi=}}==
{{cardinalbox|vi|9|10|11|chín|mười một|ord=[[thứ]] [[mười]]}}
===နိရုတ်===
ဝေါဟာကၠုၚ်နူ {{inh|vi|mkh-vie-pro|*maːl}} {{doublet|vi|mươi}}.
===ဗွဟ်ရမ္သာၚ်===
{{vi-IPA}}
* {{audio|vi|Vi-hanoi-m-mười.ogg|a=Hanoi}}
===ဂၞန်သၚ်္ချာ===
{{vi-pos|numeral|[[𨒒]], [[𨑮]], [[辻]], [[邁]], [[𱑕]]}}
# [[စှ်]]။
#: {{syn|vi|chục}}
{{C|vi|စှ်}}
iveb3zifqi1u5zofaqzy2244vbe6y9c
ညးလွပ်:咽頭べさ/Notepad
2
9186
385805
385684
2026-04-06T17:38:37Z
咽頭べさ
33
385805
wikitext
text/x-wiki
[[🝴]] [[🝵]] [[🝶]] [[🝻]] [[🝼]] [[🝽]] [[🝾]] [[🝿]] [[🟙]] [[🛜]] [[🩵]] [[🩶]] [[🩷]] [[🪇]] [[🪈]] [[🪭]] [[🪮]] [[🪯]] [[🪻]] [[🪼]] [[🪽]] [[🪿]] [[🫎]] [[🫏]] [[🫚]] [[🫛]] [[🫨]] [[🫷]] [[🫸]]
[[File:Omx-san̊krān.png|50x50px]]
# {{l|shn|ၶိူဝ်း}}
{{shn-pron|ၽူၼ်-တူၵ်း}}
* {{kjp-IPA|လီ}}
#: {{ux|mnw|ဗညာ ထဝ်
|t=bh}}
#: {{ux|ksw|ဃိၣ်သၢရှ်ဖျၢၣ်တၢ်ဘါတရိၣ်
|t=bh}}
|
#: {{ux|shn|ၽူၼ်တူၵ်း
|t=bh}}
#: {{ux|my|နေ့
|t=bh}}
{{alt sp|th|บ้านมอญ นครสวรรค์}}
* {{ur-IPA|grī}}
{{der3|shn
|တေ မိူဝ်း ယဝ့် ႁုး
|
|
}}
{{pi-alt|Mymr=ယဒိ လောကသန္တိံ ဣစ္ဆေယျ၊ ဗုဒ္ဓမဂ္ဂံ ဝိနာ အညော မဂ္ဂေါ နတ္ထိ။}}
{{sa-alt|Deva=किं मया एतस्य विषये रोदनस्य आवश्यकता अस्ति}}
{{langtrack|mnw|mkh-mmn|omx|mkh-pro|mkh-mnc-pro}}
{{langtrack|mn|en|enm|ang|ine-pro|gem-pro|gmw-pro}}
{{langtrack|th|shn|tai-pro|tai-swe-pro|qfa-bet-pro|aho|ar|ja|}}
{{langtrack|sa|la|hi|ru|ur}}
{{langtrack|so|as|it|hu|pt}}
{{langtrack|zh|vi|km|lo|ko}}
{{langtrack|es|sh|gmw-pro|fr|ine-pro}}
{{langtrack|my|za|wa|ka|mn}}
8lfcs7dlebcqkhe0mbgrzayqgu6ygtg
385806
385805
2026-04-06T17:40:58Z
咽頭べさ
33
385806
wikitext
text/x-wiki
[[🝴]] [[🝵]] [[🝶]] [[🝻]] [[🝼]] [[🝽]] [[🝾]] [[🝿]] [[🟙]] [[🛜]] [[🩵]] [[🩶]] [[🩷]] [[🪇]] [[🪈]] [[🪭]] [[🪮]] [[🪯]] [[🪻]] [[🪼]] [[🪽]] [[🪿]] [[🫎]] [[🫏]] [[🫚]] [[🫛]] [[🫨]] [[🫷]] [[🫸]]
[[File:Omx-san̊krān.png|50x50px]]
# {{l|shn|ၶိူဝ်း}}
{{shn-pron|ၽူၼ်-တူၵ်း}}
* {{kjp-IPA|လီ}}
#: {{ux|mnw|မိ စဴ ဗု
|t=bh}}
#: {{ux|ksw|ဃိၣ်သၢရှ်ဖျၢၣ်တၢ်ဘါတရိၣ်
|t=bh}}
|
#: {{ux|shn|ၽူၼ်တူၵ်း
|t=bh}}
#: {{ux|my|နေ့
|t=bh}}
{{alt sp|th|บ้านมอญ นครสวรรค์}}
* {{ur-IPA|grī}}
{{der3|shn
|တေ မိူဝ်း ယဝ့် ႁုး
|
|
}}
{{pi-alt|Mymr=ယဒိ လောကသန္တိံ ဣစ္ဆေယျ၊ ဗုဒ္ဓမဂ္ဂံ ဝိနာ အညော မဂ္ဂေါ နတ္ထိ။}}
{{sa-alt|Deva=किं मया एतस्य विषये रोदनस्य आवश्यकता अस्ति}}
{{langtrack|mnw|mkh-mmn|omx|mkh-pro|mkh-mnc-pro}}
{{langtrack|mn|en|enm|ang|ine-pro|gem-pro|gmw-pro}}
{{langtrack|th|shn|tai-pro|tai-swe-pro|qfa-bet-pro|aho|ar|ja|}}
{{langtrack|sa|la|hi|ru|ur}}
{{langtrack|so|as|it|hu|pt}}
{{langtrack|zh|vi|km|lo|ko}}
{{langtrack|es|sh|gmw-pro|fr|ine-pro}}
{{langtrack|my|za|wa|ka|mn}}
1mftovyk850pdww1i79d6um5h7ypums
385807
385806
2026-04-06T17:45:32Z
咽頭べさ
33
385807
wikitext
text/x-wiki
[[🝴]] [[🝵]] [[🝶]] [[🝻]] [[🝼]] [[🝽]] [[🝾]] [[🝿]] [[🟙]] [[🛜]] [[🩵]] [[🩶]] [[🩷]] [[🪇]] [[🪈]] [[🪭]] [[🪮]] [[🪯]] [[🪻]] [[🪼]] [[🪽]] [[🪿]] [[🫎]] [[🫏]] [[🫚]] [[🫛]] [[🫨]] [[🫷]] [[🫸]]
[[File:Omx-san̊krān.png|50x50px]]
# {{l|shn|ၶိူဝ်း}}
{{shn-pron|ၽူၼ်-တူၵ်း}}
* {{kjp-IPA|လီ}}
#: {{ux|mnw|မိ ပ္ကဴ ထဝ် မိ ကဴ သြန်
|t=bh}}
#: {{ux|ksw|ဃိၣ်သၢရှ်ဖျၢၣ်တၢ်ဘါတရိၣ်
|t=bh}}
|
#: {{ux|shn|ၽူၼ်တူၵ်း
|t=bh}}
#: {{ux|my|နေ့
|t=bh}}
{{alt sp|th|บ้านมอญ นครสวรรค์}}
* {{ur-IPA|grī}}
{{der3|shn
|တေ မိူဝ်း ယဝ့် ႁုး
|
|
}}
{{pi-alt|Mymr=ယဒိ လောကသန္တိံ ဣစ္ဆေယျ၊ ဗုဒ္ဓမဂ္ဂံ ဝိနာ အညော မဂ္ဂေါ နတ္ထိ။}}
{{sa-alt|Deva=किं मया एतस्य विषये रोदनस्य आवश्यकता अस्ति}}
{{langtrack|mnw|mkh-mmn|omx|mkh-pro|mkh-mnc-pro}}
{{langtrack|mn|en|enm|ang|ine-pro|gem-pro|gmw-pro}}
{{langtrack|th|shn|tai-pro|tai-swe-pro|qfa-bet-pro|aho|ar|ja|}}
{{langtrack|sa|la|hi|ru|ur}}
{{langtrack|so|as|it|hu|pt}}
{{langtrack|zh|vi|km|lo|ko}}
{{langtrack|es|sh|gmw-pro|fr|ine-pro}}
{{langtrack|my|za|wa|ka|mn}}
rdz0u461vdeg876x0m20pd42vdfl52w
မဝ်ဂျူ:pt-pronunc
828
11719
385868
155162
2026-04-07T10:47:23Z
咽頭べさ
33
385868
Scribunto
text/plain
--[=[
This module implements the template {{pt-IPA}}.
Author: Benwing
-- FIXME:
1. Implement i^ not before vowel = epenthetic i or deleted epenthetic i in Brazil (in that order), and i^^ not before
vowel = opposite order. Epenthetic i should not affect stress but should otherwise be treated like a normal vowel.
Deleted epenthetic i should trigger palatalization of t/d but have no other effects. [DONE]
2. Implement i^ before vowel = i.V or yV (in that order), and i^^ before vowel = opposite order. [DONE]
3. Implement i* = mandatory epenthetic i in Brazil. [DONE]
4. Implement u^ = u. or w (in that order), and u^^ = opposite order. [DONE]
5. Implement e^ = e or i in Brazil (in that order), and e^^ = opposite order. [DONE]
6. Implement o^ = o or u in Brazil (in that order), and o^^ = opposite order. [DONE]
7. Implement ê* = ê in Brazil, é in Portugal (useful especially before nasal consonants). [DONE]
8. Implement ô* = ô in Brazil, ó in Portugal (useful especially before nasal consonants). [DONE]
9. Implement é* = é in Brazil, ê in Portugal (useful especially in -éi-). [DONE]
10. Implement ó* = ó in Brazil, ô in Portugal (useful especially in -ói-). [DONE]
11. Implement des^ at beginning of word = 'dis++' or 'des++' in Brazil (in that order), and des^^ = opposite order. [DONE]
12. In Portugal, before [ɫ], unstressed 'a' should be /a/; unstressed 'e' should be /ɛ/; and unstressed 'o' should be
either /o/ or /ɔ/ (in that order). [DONE]
13. Support qualifiers using <q:...>. [DONE]
14. Support references using <ref:...>. Syntax is the same as for IPA ref=. [DONE]
15. In Portugal, unstressed o in hiatus should be /w/, and unstressed e in hiatus should be /j/. [DONE]
16. Support - (hyphen) = left and right parts should be treated as distinct phonological words but written joined
together, and non-final primary stresses turn into secondary stresses. Word-initial and word-final behavior should
happen, e.g. Brazil epenthesis of (j) before word-final /s/ followed a stressed vowel, Brazil raising of esC- and
Portugal rendering of o- as ò-. [DONE]
17. Support : (colon), similar to hyphen but in non-final parts, final vowels aren't rendered as closed. [DONE]
18. Support + (plus sign), similar to colon but non-final primary stresses aren't displayed and syllable-division
ignores the plus sign. [DONE]
19. In Brazil, word-initial enC-, emC- should display as (careful pronunciation) ẽ-, (natural pronunciation) ĩ-. [DONE]
20. In Portugal, -sç- and -sc(e/i)- should show as (careful pronunciation) /ʃs/, (natural pronunciation) /ʃ/. Same for
-sz- ([[as]] [[zonas]]). [DONE] [FIXME: Verify this reduction in [[as]] [[zonas]].]
21. In Portugal, grave accent indicates unstressed open a/e/o and macron indicates unstressed closed a/e/o; both are
ignored in Brazil. [DONE]
22. In Portugal, iCi where the first i is before the stress should (maybe) show as iCi, (traditional pronunciation) ɨCi.
In iCiCi, both of the first two i's show as ɨ in the traditional pronunciation (FIXME: verify this). C should be
only a single consonant, hence not in [[piscina]] or [[distrito]] (FIXME: verify this). Does not apply if the first
i is stressed (e.g. [[mínimo]], [[tília]], [[pírico]], [[tísica]]) or if the stressed i is word-final ([[Mimi]],
[[Lili]], [[chichizinho]], [[piripiri]]), or in certain other words ([[felicíssimo]], [[filhinho]], [[estilista]],
[[pirite]]). Possibly this means it doesn't apply when the stressed i is in a suffix (-íssimo, -inho, -ista). We
can always disable the eCi spelling by adding an h in 'ihCi' to make it look like a cluster between the i's. NOTE:
It appears that iCi -> eCi should apply in [[dicionário]], meaning if we apply it at the end, we have to distinguish
between glides from original i and glides from e or y.
23. In Portugal and Brazil, stressed o in hiatus should automatically be ô (voo, Samoa, Alagoas, perdoe, abençoe). [DONE]
24. In Northern Portugal, stressed closed ô in hiatus (whether written explicitly as e.g. vôo, Côa or generated automatically)
should show as e.g. /ˈbo.(w)ɐ/. [DONE] [FIXME: Verify syllable division.]
25. Recognize -zinha like -zinho, -mente. Just use hyphen (-) to handle these. We don't recognize -zão, -zona, -zito,
-zita because of too many false positives; you can just write the hyphen explicitly before the suffix as needed.
Cf. among our current vocabulary we have 10 -zão augmentatives (animalzão, aviãozão, cipozão, cuzão, homenzão,
leãozão, paizão, pãozão, pezão, tatuzão), 2 -ão augmentatives after a word ending in -z (codornizão, felizão), and
7 non-augmentatives (alazão, coalizão, razão, rezão, sazão, sezão, vazão). Similarly for -zona: we have 5 -zona
augmentatives (boazona, cuzona, maçãzona, mãezona, mãozona) against 8 non-augmentatives (amazona, aminofenazona,
arilidrazona, Arizona, cronozona, ecozona, Eurozona, fenazona) and no -ona augmentatives after words ending in -z.
For -zito, we have 1 -ito diminutive after a word ending in -z (Queluzito), one non-diminutive (quartzito), and no
-zito diminutives. For -zita we have 1 -zita diminutive (maçãzita) and 4 non-diminutives (andaluzita, monazita,
pedzita, stolzita). [DONE]
26. Final 'r' isn't optional before -zinho, -zinha, -mente. [DONE]
27. Consider making secondary stress optional in cases like traduçãozinha where the stress is directly before the
primary stress.
28. In Brazil, unstressed final-syllable /a/ should be reduced before -r, cf. [[açúcar]]. [DONE]
29. Support + = pagename, and pagename= argument. [DONE]
30. Deduplicate final pronunciations without distinct qualifiers. [DONE]
31. Implement support for dot-under without accompanying quality diacritic. When attached to a/e/o, it defaults to acute
= open pronun, except in the following circumstances, where it defaults to circumflex: (1) in the diphthongs
ei/eu/oi/ou; (2) in a nasal vowel. [DONE]
32. Portugal final -e should show as optional (ɨ) unless there is a vowel-initial word following, in which case it
should not be displayed at all. [NOT DONE]
33. Syllabification: "Improper" clusters of non-sibiliant-obstruent + obstruent (pt, bt, bd, dk, kt; ps, bs, bv, bʒ, tz,
dv, ks; ft), non-sibiliant-obstruent + nasal (pn, bn, tm, tn, dm, dn, gm, gn), nasal + nasal (mn) are syllabified in
Portugal as .pt, .bv, .mn, etc. Note ʃ.t, ʃ.p, ʃ.k, etc. But in Brazil, all of these divide between the consonants
(p.t, b.v, ʃ.t, s.p, etc.). Particular case: [[ab-rogação]] divides as a.brr in Portugal but ab.rr in Brazil. [DONE]
34. -ão, -ãe, -õe should be recognized as nasal diphthongs with a circumflex added to force stress. [DONE]
35. Recognize obsolete -aõ, -aẽ, -oẽ as equivalent to -ão, -ãe, -õe.
36. In CluV, CruV, CliV, CriV, the 'u' and 'i' are vowels not glides in both Portugal and Brazil. [DONE]
37. Epenthesis of (j) before final stressed s in Brazil should not happen after i. [DONE]
38. Dialect markers such as "Brazil", "Portugal" should go at the beginning. [DONE]
39. Portugal exC, êxC should be rendered like eiʃC (FIXME: Does this apply to "Central Portugal" as well?). exs- needs
handling like eiʃs-/(i)ʃs- not like eiss-. [DONE]
40. Unstressed word-initial exC- should maybe have two pronunciations, one with eiʃC- and the other with (i)ʃC-.
(FIXME: Verify.)
41. -sj- (e.g. [[transgénico]]) should reduce to a single /ʒ/. [DONE]
42. [[transgredir]] should have /z/ (Brazil), /ʒ/ (Portugal) instead of /s/, /ʃ/. [DONE]
43. Unstressed -ie- in hiatus should automatically be -iè- in Portugal or maybe -iè-/-ié-? [DONE] (FIXME: Verify.)
44. Initial esC- in Brazil should be either isC- or esC-. [DONE]
45. Initial sC- in Portugal and maybe Brazil should be /s/ not /ʃ/. [DONE]
46. Deleted epenthetic /i/ should block conversion of syllable-final m/n into nasalization, cf. [[amnésia]] respelled
'ami^nési^a'. [DONE]
47. Portugal 'o', 'os' should be unstressed with /u/, not have /ɔ/. [DONE]
48. /s/ after nasal vowel before glide should not become voiced. [DONE]
49. [[arrozinho]] (which uses the + component divider) should have the IPA stress mark before the 'z' not after. [DONE]
50. Portugal final -ɨ should be suppressed before a vowel (with a tie sign), and made optional word-finally. [DONE]
51. Final -dor/-tor/-sor/-ssor + feminine and plural should have closed /o/. [DONE]
52. Final -oso should have closed /o/, but feminine and plural should have open /ɔ/. [DONE]
53. Hiatuses in Brazil involving 'i' should have two possibilities (full vowel or glide); likewise for 'u'. [DONE]
54. In Brazil phonetic representation, hiatuses involving 'i' should be [ɪ], and those involving 'u' should be [ʊ]. [DONE]
55. ui^ should convert to 'ui' in Portugal = /wi/, but to 'u.i' or 'uy' in Brazil. [DONE]
56. des^ should be 'des++' or 'dis++' (++ in both cases). [DONE]
57. Word-boundary special handling (e.g. des^, x-, -x, etc.) should also respect component boundaries e.g. in
[[aerodeslizador]], [[criptoxantina]]. [DONE]
58. Convert apostrophe to tie, and make tie transparent to syllabification. [DONE]
59. 'x' in -nx- should default to /ʃ/ ([[enxame]], [[enxugar]]). [DONE]
60. Final i^ should not be stressed. [DONE]
61. There should not be a comma between phonemic and phonetic representations. [DONE]
62. Final stressed -io in Brazil should be either i.u or iw. [DONE]
63. Unstressed final '-ax' has open /a/ including in Portugal. [DONE]
64. Clean up handling of qualifiers and fix bugs. [DONE]
65. Support i#, u# for i./y or u./w in both Brazil and Portugal. [DONE]
66. In Portugal, final unstressed -ar/-or should be pronounced open, but in Brazil, closed. [DONE]
67. Suppress initial e- in esC- in Portugal after /i/. [DONE]
68. In C[lr][iu], [iu] should be either full vowel or glide in Portugal. [DONE]
69. Support substitution notation. [DONE]
70. [[em]] by itself should be /ẽj̃/ or /ĩ/. [DONE]
71. Suffixes beginning with a vowel should act as if a pseudo-consonant precedes. [DONE]
72. Prefixes should change primary stress to secondary. [DONE]
73. -ing should be like -im in Brazil but -ingh in Portugal. [DONE]
74. Single 's' after colon should be /z/ not /s/, in keeping with normal spelling practices;
likewise for single 'r'. [NOT YET, FIRST NEED TO PUSH APPROPRIATE RESPELLING CHANGES]
75. Intertonic 'o' after stressed i/e/ɛ ([[período]], [[rubéola]]) in Brazil should be .u or w.
76. Don't display phonetic IPA if identical to phonemic IPA. [DONE]
77. Add "South Brazil" pronunciation. [DONE; SEE ISSUES BELOW]
78. -êm should be like -ém in Brazil but -ẽiem in Portugal. [DONE]
79. -õem should be like -õe in Brazil but -õeem in Portugal. [DONE]
80. -le in Portugal should split into two pronuns, one with vowel for -e, one without. [DONE]
81. Initial 'e' in Portugal after des^ should be /i/. [DONE]
NEW!!!!:
(There's a LOT of changes that need to be made, and in some cases, there's changes on top of other changes. It's been years since the last real update to the module, so
I wouldn't be surprised if this got confusing. Talk to User:MedK1 so we can coordinate changes properly and avoid any confusion.)
For Brazilian Portuguese
82. i^sV (and i*, i^^ alike) produce /izi/ rather than the correct /isi/. i.e. {{pt-IPA|pam-pi^siquismo}} shouldn't produce /izi/
82.1. A similar thing happens with epenthesis on g/c; faulty logic is making the module turn the consonants soft
82.2. Epenthesis should actually be the default output in Brazil. Instead of having cluttered transcriptions (see pterodáctilo), it should transcribe
/ˌp(i)te.ɾoˈdak(i).t͡ʃi.lu/ by default instead and then have parameters that remove the epenthesis should that be needed — I don't think it will be used very much tho
83. -ia, -io endings shouldn't have two pronunciations. Keep only the "faster" one, the one that matches Portugal.
84. -ie is correct; do add parenthesis to the j though: "superfície"'s ending can be pronounced as both /si.i/ and /s(j)i/.
85. -ea, -eo, -ee unstressed endings should work ''exactly'' like -ia and -io after the above changes. No more /e.u/; /ju/ only.
86. The same goes for unstressed -oa (mágoa) and -ue (tênue); not "o.ɐ" and "u.i", but "wɐ" and "wi".
88. Word-initial "NH" should be treated in narrow transcriptions like word-medial NH and be represented as a nasal j.
89. Avoiding cluttered transcriptions: For a word like "emporcar", instead of "/ẽporka(ʁ)/ (careful pronunciation), /ĩporka(ʁ)/ (natural pronunciation)", have it show up
as "/ẽporka(ʁ)/, /ĩ-/". We do something like that for {{l|en|accent}}.
89.1. Hiatuses where the first vowel is an unstressed O/E should just be reduced (as if written with U/I) by default. /kade'adu/ is likely a very rare spelling
pronunciation.
89.2. "des^" should be the default behavior for "des-" as most words starting with that combination are prefixed with des-. It'd be better to manually specify non-des
prefixes than manually specify every des- prefix. Complete duplications should be avoided: Instead of /deˈzoj.tu/, /d͡ʒiˈzoj.tu/, just show /d͡ʒiˈzoj.tu/, /de-/.
This would invert markings so that "desenho" and "designar" no longer would use the 'default' transcription for the des- part, while the words that don't use it, would.
89.3. Essentially, I really don't like 'complete duplications' nor the "faster pronunciation" thing. Often (as in prédio), the 'slower' pronunciation is practically
unheard of, while in other cases (as in Iasmim), the 'faster' pronunciation is uncommon and shouldn't be the default. I'd like it if for mediana, for instance, it
displayed as /me.d͡ʒiˈɐ.nɐ/, /-ˈd͡ʒjɐ̃-/ instead of listing the whole thing twice. There's a lot of ca seswhere this 'complete' duplication occurs, and, ideally, all
of them should have the output shortened.
90. There's no difference between the E/I in padre, pista, fonte, hediondo and piá; there's no real reason to represent the last two as ɪ or ʊ.
91. This feels nitpicky, but imo the way we use graves in the module is a little odd. If they were swapped with the dot under vowels, we could make them able to read
old spellings like [[òtimamente]] just fine. On letters w/o open-closed distinction (aka Is and Us), they could force a hiatus like "." preceding them does. This would
allow them to read [[faìscazinha]] if need be, and if the dieresis accent could do the same thing, the same would go for [[saüdade]].
91.1. The old graves have been partially replaced by the ''acute'' accent here too, which led [[protocooperação]] to have accidentally been left marked as some
preproparoxytone for a while. So yeah, this change would really make it feel more... 'accurate', I guess?
92. Words like "Émerson" result in a nasal open E. I don't think those should ever ever ever ever ever be generated automatically. I pronounce those as /ɛ/, as does
everyone else I've met (including people actually named Émerson), but I wouldn't be too surprised if someone somewhere realized it as /ẽ/. I think the module should
generate /ɛ/ in those cases because adding the ẽ form later is easy: {{pt-IPA|Émerson,[É:Ẽ]}} (or even, [É:Ê]), but having it be the other way around is impossible.
92.1. Maybe it might be good to fix this by just making it so, at the end, if it sees there's an open vowel+nasal combination, it deletes the nasal? Of course,
this is unless ã́ ẽ́ ṍ are used. ...Though I can't think of any terms that'd need it. There's no phonemic open nasal. The closest you get is "online", but if anybody
nasalizes it, it's not phonemic at all — it's closer to how a language like English handles these.
..The appendix on Portuguese pronunciation stated that allophonic nasal vowels (as in "cabana", "pusilânime", "feno", "Bruno"; but NOT "antes", "porém", "onde")
aren't indicated. After talking it over with other editors, it might be best for learners if these nasals aren't indicated at a phonemic level, but as a narrow
transcription after the word. This would go for words like "treino" and "andaime" as well. Essentially, they should be handled (in broad transcription) like Portugal's
For both varieties:
93. Stressed oxytone O/Es next to Ls should be presumed to be open O/Es. Like, say, "anel" or "anzol". They shouldn't need to be specified: note how the default plural
of stressed "-el" and "-ol" are "-éis", "-óis" in the pt-verb module. [DONE]
94. Would it be possible to track words that have 'specified spellings', so we can notice patterns for future optimizations more clearly? Nvm if it's too
hard to implement, but I thought it might be interesting.
95. Words like "boiuva", "feiura" and "ouija" generate impossible triphthongs; these spellings should result in a diphthong followed by a stressed vowel.
(i.e. same as if it were written boiúva, feiúra, ouíja)
..Can we have rhyme support? Ideally, it'd be an English-like rhyming scheme that aims to maximize splits and only neglects extremely niche ones. Unstressed -e vs
unstressed -i would be seen as a merger in Brazil (and thus the rhyme page would have -ɨ), while -éi-/-ei- would be seen as a merger in Portugal (the rhyme page would
match Brazil).
..Making it so "impossible syllables" (not just unnatural ones like, say, "ap" and "ec", but ones that are altogether impossible such as consonant clusters with no
vowels) get parsed as individual letters would be nice. {{pt-IPA|pt ipa}} would generate /ˌpeˈte ˈipɐ/ for instance. (It'd just use the pronunciation of the actual
letters, with primary stress on the last letter)
---A factor that'd complicate this are alternative pronunciations for letters:
----The names of E and O can be open or closed.
----Portugal calls G,K,W "guê","capa","dâblio" not "gê","cá","dáblio"
For European Portuguese:
96. According to an Alentejano speaker in the talk page (Southern Portugal), the handling of "ei" is wrong and should be closer to how Brazil does it.
96.1. This includes -eia/-éia distinction.
97. B/D/G should also not undergo lenition in Southern Portugal.
98. For Cambridge (respelled quê*mbridji*), the European Portuguese transcription incorrectly lenites the dj as [ðʒ].
99. -ene endings should default to -éne in Portugal. [DONE]
100. Syllabification is still a bit wonky in Portugal; the module places the syllable boundaries at the wrong spot and creates odd clusters at the start of syllables,
like in E.dgar (instead of Ed.gar), a.dvogado (instead of ad.vogado), a.pto (instead of ap.to), fa.cto (instead of fac.to), etc. {{pt-IPA|faccioso}} gets you
/fɐˈksjo.zu/ instead of /fakˈsjo.zu/ as in fast Brazil.
101. Some dialects in Northern Portugal that separate X and CH also separate S/SS from Ç/Z, using apical consonants for terms spelled with Ss. They still differentiate
between voiced and unvoiced consonants, too, so "casa" uses /z̺/, "posso" uses /s̺/ and spellings with Ç/Z retain the laminal consonants. Note that coda S/Z as in
"funis" and "chafariz" are still /ʃ/. "Some" here refers to those north of Beira; the Beirão accent differentiates X from CH, but doesn't differentiate S/SS from Ç/Z
(speakers tend to use apicals s̺,z̺ for both)
102. There isn't a lot of support for epenthesis on PT-PT. I suggested making epenthesis the default for Brazil, but it seems to be far less regular for Portugal.
If the current (old) handling for Brazil's epenthesis could be done for Portugal, that'd be great! Though, since the epenthetic vowel is always /i/ in Brazil and
always /ɨ/ in Portugal, a hypothetical epenthesis on "cnidário" should probably be done with "c^nidário" rather than "ce^nidário" or "que^nidário".
]=]
--[=[
Issues concerning South Brazil pronunciation:
(Rather than an unified South Brazil pronunciation, it's better to transform it in Rio Grande do Sul/Gaúcho pronunciation)
1. Should all 'ẽ' (not just word-final) be rendered as [ẽj̃]? We have several existing examples, e.g.
/de.zẽ.ba.ˈla.do/|/de.zẽj̃.ba.ˈla.do/ for [[desembalado]], /ˌde.zẽj̃.has.ˈkɐ̃.so/ for [[desenrascanço]],
/ẽj̃.baw.sa.ˈma(ɻ)/ for [[embalsamar]], [ẽj̃.pũˈj̃aɾ] for [[empunhar]], /ẽ.ʁus.tiɾ/|[ẽj̃.ʁuʃˈ(t)͡ʃiɾ] for
[[enrustir]].
2. Coda 'r': Mostly /ɻ/ but sometimes given as both /ɾ/ and /ɻ/ or occasionally /r/.
3. Raising of unstressed 'e' and 'o', and 'des-': Mostly not present but sometimes yes, e.g. [[clarear]]
/kla.ɾe.ˈa(ɾ)/|/kla.ɾe.ˈa(ɻ)/|/kla.ɾi.ˈa(ɾ)/|/kla.ɾi.ˈa(ɻ)/|/kla.ˈɾja(ɾ)/|/kla.ˈɾja(ɻ)/, [[consentâneo]]
[kõ(w̃).senˈtə̃.ni̯u], [[cozido]] /ko.ˈzi.dʊ/|/ku.ˈzi.dʊ/, [[desbloquear]] /dez.blo.ke.ˈa(ɾ)/|/dez.blo.ˈkja(ɾ)/|/d͡ʒiz-/|/-(ɻ)/,
[[desferir]] /des.fe.ˈɾi(ɾ)/|/des.fe.ˈɾi(ɻ)/|/des.fi.ˈɾi(ɾ)/|/des.fi.ˈɾi(ɻ)/, [[desrespeitar]] /dez.hes.pej.ˈta(ɾ)/|/d͡ʒiz-/|/-(ɻ)/,
[[destruído]] /des.tɾu.ˈi.do/|/d͡ʒis.tɾu.ˈi.do/.
4. Epenthetic 'i': Less common? E.g. [[dignidade]] given as just /ˌd͡ʒiɡ.ni.ˈda.de/, but [[digno]] as /ˈd͡ʒiɡ.no/|/ˈd͡ʒi.ɡi.no/.
5. Secondary stress: Often given two syllables before the stress. I have left it out unless it seems stable and in a prefix, e.g.
[[eleitorado]] /e.ˌlej.to.ˈɾa.do/, [[eletrizante]] /e.ˌle.tɾi.ˈzɐ̃.te/, [[elevado]] /ˌe.le.ˈva.do/, [[elevador]] /e.ˌle.va.ˈdoɻ/,
[[engarrafamento]] /ˌẽ.ɡa.ˌha.fa.ˈmẽ.to/.
6. Initial em-: Mostly given as /ẽ-/ or /ẽj̃-/, but sometimes /ĩ-/ as in [[emparedar]] /ĩ.pa.ɾe.ˈda(ɾ)/|/ĩ.pa.ɾe.ˈda(ɻ)/
or both as in [[encaixar]] /ẽ.kaj.ˈʃa(ɾ)/|/ĩ.kaj.ˈʃa(ɻ)/|/ẽ.kaj.ˈʃa(ɾ)/|/ĩ.kaj.ˈʃa(ɻ)/.
7. -nh-: [[empunhar]] given as [ẽj̃.pũˈj̃aɾ], but is /j̃/ actually characteristic of this accent or is it /ɲ/?
8. Other inconsistencies: e.g. [[enrustir]] /ẽ.ʁus.tiɾ/|[ẽj̃.ʁuʃˈ(t)͡ʃiɾ], with coda /ʃ/ and strong [ʁ] (usually [h]).
[[ab-rogar]] /ab.ʁoˈɡa(ɻ)/|/ab.hoˈɡa(ɻ)/|/ab.χoˈɡa(ɻ)/|/ab.ɦoˈɡa(ɻ)/ with all possible strong r's.
9. Nasal vowels: Almost always as elsewhere, but occasionally e.g. [[entender]] /ĩn.tẽnˈde(r)/, [[a gente]] /a.ˈʒen.te/|/a.ˈʒẽ.te/.
10. Nasal diphthongs: -ão sometimes claims to be /ɐ̃õ/, sometimes /ɐ̃w̃/. [[-ção]] listed both.
]=]
local export = {}
local m_IPA = require("Module:IPA")
local m_table = require("Module:table")
local m_strutils = require("Module:string utilities")
local m_qual = require("Module:qualifier")
local lang = require("Module:languages").getByCode("pt")
local u = require("Module:string/char")
local rfind = mw.ustring.find
local rsubn = mw.ustring.gsub
local rmatch = mw.ustring.match
local rsplit = mw.text.split
local ulower = mw.ustring.lower
local uupper = mw.ustring.upper
local usub = mw.ustring.sub
local ulen = mw.ustring.len
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local AC = u(0x0301) -- acute = ́
local GR = u(0x0300) -- grave = ̀ = open vowel quality without stress in Portugal only
local MACRON = u(0x0304) -- macron = ̄ = closed vowel quality without stress in Portugal only
local CFLEX = u(0x0302) -- circumflex = ̂
local TILDE = u(0x0303) -- tilde = ̃
local DIA = u(0x0308) -- diaeresis = ̈
local CEDILLA = u(0x0327) -- cedilla = ̧
local DOTOVER = u(0x0307) -- dot over = ̇
-- DOTUNDER indicates an explicitly unstressed syllable; useful when accompanied by a quality marker (acute or
-- circumflex), or by itself with a/e/o, where it defaults to acute (except in the following circumstances, where it
-- defaults to circumflex: (1) in the diphthongs ei/eu/oi/ou; (2) in a nasal vowel).
local DOTUNDER = u(0x0323) -- dot under = ̣
-- LINEUNDER indicates an explicit secondary stress; normally not necessary as primary stress is converted to secondary
-- stress if another primary stress follows, but can be used e.g. after a primary stress; can be accompanied by a
-- quality marker (acute or circumflex) with a/e/o; if not, defaults to acute (except in the same circumstances where
-- dot under defaults to circumflex).
local LINEUNDER = u(0x0331) -- line under = ̱
-- Serves to temorarily mark where a syllable division should not happen; temporarily substitutes for comma+space;
-- temporarily substitutes for #.
local TEMP1 = u(0xFFF0)
local SYLDIV = u(0xFFF1) -- used to represent a user-specific syllable divider (.) so we won't change it
local PSEUDOCONS = u(0xFFF2) -- pseudo-consonant at the edge of prefixes ending in a vowel and suffixes beginning with a vowel
local PREFIX_MARKER = u(0xFFF3) -- marker indicating a prefix so we can convert primary to secondary accents
-- Since we convert all symbols at the beginning and decompose accented characters (except for ç and ü), we can later
-- use capital and/or accented letters to represent additional distinctions, typically in cases where we want to
-- remember the source of a given phoneme. By convention we use capital letters, optionally with accents.
-- Specifically:
-- * A/E/O represent written a/e/o where we don't yet know the vowel quality. Towards the beginning, we convert all
-- written a/e/o to A/E/O and later convert them to their final qualities (which might include /a/ /e/ /o/, so we
-- can't use those symbols directly for this purpose).
-- * Ẽ stands for a word-initial Brazilian sound that can be pronounced either /ẽ/ (in careful speech) or /ĩ/ (in
-- natural speech) and originates from en- or em- before a consonant. We distinguish this from written in-/im-,
-- which can be only /ĩ/, and written ehn-/ehm- (or similar), which can be only /ẽ/.
-- * I is used to represent epenthetic i in Brazilian variants (which should not affect stress assignment but is
-- otherwise treated as a normal sound), and Ɨ represents deleted epenthetic i (which still palatalizes /t/ and /d/).
-- I is also used to represent Brazil e or i from initial esC-, and Portugal (i) from initial esC-.
-- * Ì is used to represent either i. in hiatus or /j/ in Brazil; likewise for Ù representing u. in hiatus or /w/.
-- * Ɔ (capital version of ɔ) stands for a Portugal sound that can be pronounced either /o/ or /ɔ/ (depending on the
-- speaker), before syllable-final /l/.
-- * Ú is used word-finally after i to represent either .u in hiatus or /w/ in Brazil.
-- * L is used word-finally in Portugal to split words ending in -le into two pronuns due to the differing pronunciation
-- of /l/ in the two cases (coda or not).
local vowel = "aɐeɛiɨoɔuüAEẼIƗÌOƆÙÚ"
local V = "[" .. vowel .. "]"
local NV_NOT_SPACING_CFLEX = "[^" .. vowel .. "%^]"
local high_front_vocalic = "iIƗÌy"
local front_vocalic = "eɛɨẼ" .. high_front_vocalic
local FRONTV = "[" .. front_vocalic .. "]"
local glide = "yw"
local W = "[" .. glide .. "]" -- glide
local ipa_stress = "ˈˌ"
local ipa_stress_c = "[" .. ipa_stress .. "]"
local primary_quality = AC .. CFLEX
local primary_quality_c = "[" .. primary_quality .. "]"
local quality = AC .. CFLEX .. GR .. MACRON
local quality_c = "[" .. quality .. "]"
local stress = LINEUNDER .. DOTOVER .. DOTUNDER .. ipa_stress
local stress_c = "[" .. stress .. "]"
local non_primary_stress = LINEUNDER .. DOTUNDER .. "ˌ"
local non_primary_stress_c = "[" .. non_primary_stress .. "]"
local accent = quality .. stress .. TILDE
local accent_c = "[" .. accent .. "]"
-- Any component separator that should be "transparent" (i.e. ignored) during syllabification processes. This should
-- include a subset of the component_sep characters, currently + and * (which ++ is converted into).
local syl_transp_component_sep = "+*"
local syl_transp_component_sep_c = "[" .. syl_transp_component_sep .. "]"
-- Any character that should be "transparent" (i.e. ignored) during syllabification processes. This includes the
-- syllable-transparent component separators + and ++ (converted into *) as well as the tie character, which originates
-- from an apostrophe (e.g. [[barriga d'água]]).
local syl_transp = syl_transp_component_sep .. "‿"
local syl_transp_c = "[" .. syl_transp .. "]"
-- Zero or more syllable-transparent characters; used during syllabification.
local STC = syl_transp_c .. "*"
-- Component separators that are not transparent to syllabification. Includes colon (:), hyphen (-) and double hyphen
-- (--), which is converted internally to @.
local non_syl_transp_component_sep = ":@%-"
local non_syl_transp_component_sep_c = "[" .. non_syl_transp_component_sep .. "]"
-- "component_sep" means any symbol that may separate word components (not including #, which is added at a certain
-- point next to certain word components so that the adjacent characters are treated as if they are at word bounaries).
local component_sep = syl_transp_component_sep .. non_syl_transp_component_sep
local component_sep_c = "[" .. component_sep .. "]"
local word_or_component_sep_c = "[#" .. component_sep .. "]"
-- Syllable divider (auto-inserted or user-specified).
local syldiv = "." .. SYLDIV
local syldiv_c = "[" .. syldiv .. "]"
-- "charsep" means any symbol that may separate the individual characters that make up a word, and which should be
-- ignored for e.g. consonant-consonant assimilation processes. This currently includes accents and syllable dividers.
local charsep = accent .. syldiv
local charsep_c = "[" .. charsep .. "]"
-- Characters that may divide words, other than the tie (‿), which is transparent to syllabification.
local non_syl_transp_word_divider = " #"
-- All characters that may divide words.
local word_divider = non_syl_transp_word_divider .. "‿"
-- "wordsep_not_syl_transp" means the same as "wordsep" below but excludes syllable-transparent characters. It is used
-- in other collections of symbols (particularly when negated, so as to include syllable-transparent characters but
-- otherwise exclude word separators) rather than by itself.
local wordsep_not_syl_transp = charsep .. non_syl_transp_word_divider .. non_syl_transp_component_sep
-- "wordsep" means any symbol that may separate the individual characters that make up a word or may separate words or
-- components, and which should be ignored for e.g. consonant-consonant assimilation processes that operate across
-- words. This currently includes everything in "charsep" and "component_sep" plus symbols that may divide words.
local wordsep = wordsep_not_syl_transp .. syl_transp
local wordsep_c = "[" .. wordsep .. "]"
local C = "[^" .. vowel .. wordsep .. "_]" -- consonant
-- consonant or syllable-transparent component separator
local C_OR_SYL_TRANSP = "[^" .. vowel .. wordsep_not_syl_transp .. "_]"
local H_OR_SYL_TRANSP = "[h" .. syl_transp .. "]"
local H_GLIDE_OR_SYL_TRANSP = "[h" .. glide .. syl_transp .. "]"
local C_NOT_H_OR_GLIDE = "[^h" .. glide .. vowel .. wordsep .. "_]" -- consonant other than h, w or y
local C_OR_WORD_BOUNDARY = "[^" .. vowel .. charsep .. "_]" -- consonant or word boundary
local voiced_cons = "bdglʎmnɲŋrɾʁvzjʒʤ" -- voiced sound
-- Unstressed words with vowel reduction in Brazil and Portugal.
local unstressed_words = require("Module:table").listToSet({
"o", "os", -- definite articles
"me", "te", "se", "lhe", "lhes", "nos", "vos", -- unstressed object pronouns
-- See https://en.wikipedia.org/wiki/Personal_pronouns_in_Portuguese#Contractions_between_clitic_pronouns
"mo", "mos", "to", "tos", "lho", "lhos", -- object pronouns combined with articles
-- Allomorphs of articles after certain consonants
"lo", "los", "no", -- [[nos]] above as object pronoun
-- Allomorphs of object pronouns before other pronouns
"vo", -- [[no]] above as allomorph of article
"que", -- subordinating conjunctions
"e", -- coordinating conjunctions
"de", "do", "dos", "por", -- basic prepositions + combinations with articles; [[no]], [[nos]] above already
-- FIXME: Portugal pronun for pelos, pela, pelas given as if spelled pêlos, etc. with stress, but differently for pelo.
-- I am assuming the Portugal pronuns with stress are wrong.
"pelo", "pelos", "pela", "pelas" -- preposition + article combinations
})
-- Unstressed words with vowel reduction in Portugal only.
local unstressed_full_vowel_words_brazil = require("Module:table").listToSet({
"a", "as", -- definite articles
-- See https://en.wikipedia.org/wiki/Personal_pronouns_in_Portuguese#Contractions_between_clitic_pronouns
"ma", "mas", "ta", "tas", "lha", "lhas", -- object pronouns combined with articles
-- Allomorphs of articles after certain consonants
"la", "las", "na", "nas",
"da", "das", -- basic prepositions + combinations with articles; [[na]], [[nas]] above already
-- coordinating conjunctions; [[mas]] above already
"para", "pra", -- preposition; for the verb form use "pára" instead
})
-- Unstressed words without vowel reduction.
local unstressed_full_vowel_words = require("Module:table").listToSet({
"um", "uns", -- single-syllable indefinite articles
"meu", "teu", "seu", "meus", "teus", "seus", -- single-syllable possessives
"ou", -- coordinating conjunctions
-- Note that in order to match à and às we have to write them as below because at the point we are trying to
-- match them, all text has been converted to canonical decomposed Unicode form. Writing "à" and "às" directly
-- won't work even if you type in the text using decomposed Unicode characters because all page contents are
-- automatically converted to canonical composed form when saved.
"ao", "aos", "a" .. GR, "a" .. GR .. "s", -- basic prepositions + combinations with articles
"em", "com", -- other prepositions
})
-- Special-case pronunciations for certain unstressed words with irregular pronunciations. The left side is the
-- original spelling after DOTUNDER or DOTOVER has been added; which diacritic gets added depends on whether the word
-- has vowel reduction (DOTOVER) or no vowel reduction (DOTUNDER). The right side is the respelling. See comment just
-- above for why we write "a" .. GR instead of "à".
local unstressed_pronunciation_substitution = {
["a" .. DOTUNDER .. "o"] = "a" .. DOTUNDER .. "u",
["a" .. DOTUNDER .. "os"] = "a" .. DOTUNDER .. "us",
["a" .. GR .. DOTUNDER] = "a" .. DOTUNDER,
["a" .. GR .. DOTUNDER .. "s"] = "a" .. DOTUNDER .. "s",
["po" .. DOTOVER .. "r"] = "pu" .. DOTOVER .. "r",
}
-- Dialects and subdialects:
export.all_styles = {"gbr", "rio", "sp", "cpr", "sbr", "gpt", "cpt", "spt", "npt"}
export.all_style_groups = {
all = export.all_styles,
br = {"gbr", "rio", "sp", "cpr", "sbr"},
pt = {"gpt", "cpt", "spt", "npt"},
}
local style_to_style_group = {}
for group, styles in pairs(export.all_style_groups) do
if group ~= "all" then
for _, style in ipairs(styles) do
style_to_style_group[style] = group
end
end
end
export.all_style_descs = {
-- style groups
br = "[[w:Brazilian_Portuguese|Brazil]]",
pt = "[[w:European_Portuguese|Portugal]]",
-- styles
gbr = "[[w:Brazilian_Portuguese|Brazil]]", -- "general" Brazil
rio = "[[w:Carioca#Sociolect|Rio de Janeiro]]", -- Carioca accent
sp = "[[w:Paulistano_dialect|São Paulo]]", -- Paulistano accent
cpr = "[[w:Caipira_dialect|Caipira]]", -- Caipira accent (for approximant coda R)
sbr = "[[w:Gaúcho_dialect|Southern Brazil]]", -- Gaucho accent
gpt = "[[w:European_Portuguese|Portugal]]", -- "general" Portugal
-- lisbon = "Lisbon", -- (not added yet)
cpt = "[[w:Estremenho dialect|Central Portugal]]", -- Central Portugal outside of Lisbon
spt = "Southern Portugal", -- Dialects of Alentejo and Algarve (West Algarve is a distinct subdialect)
npt = "[[w:Northern Portuguese|Northern Portugal]]" -- Northern Portugal dialects (Porto/Minho and Transmontano are subdialects)
}
-- version of rsubn() that discards all but the first return value
local function rsub(term, foo, bar)
local retval = rsubn(term, foo, bar)
return retval
end
-- version of rsubn() that returns a 2nd argument boolean indicating whether
-- a substitution was made.
local function rsubb(term, foo, bar)
local retval, nsubs = rsubn(term, foo, bar)
return retval, nsubs > 0
end
-- apply rsub() repeatedly until no change
local function rsub_repeatedly(term, foo, bar)
while true do
local new_term = rsub(term, foo, bar)
if new_term == term then
return term
end
term = new_term
end
end
-- Flat-map a function `fun` over `items`. This is like `map` over a sequence followed by `flatten`, i.e. the function
-- must itself return a sequence and all of the returned sequences are flattened into a single sequence.
local function flatmap(items, fun)
local new = {}
for _, item in ipairs(items) do
local results = fun(item)
for _, result in ipairs(results) do
table.insert(new, result)
end
end
return new
end
-- Combine two sets of qualifiers, either of which may be nil or a list of qualifiers. Remove duplicate qualifiers.
-- Return value is nil or a list of qualifiers.
local function combine_qualifiers(qual1, qual2)
if not qual1 then
return qual2
end
if not qual2 then
return qual1
end
local qualifiers = m_table.deepCopy(qual1)
for _, qual in ipairs(qual2) do
m_table.insertIfNot(qualifiers, qual)
end
return qualifiers
end
-- Reorder the diacritics (accent marks) in `text` according to a canonical order. Specifically, there can conceivably
-- be up to three accents on a vowel: a quality mark (acute/circumflex/grave/macron); a mark indicating secondary stress
-- (lineunder), tertiary stress (dotunder; i.e. no stress but no vowel reduction) or forced vowel reduction (dotover);
-- and a nasalization mark (tilde). Order them as follows: quality - stress - nasalization. `err` is a function of one
-- argument (an error string) and should throw an error if called.
local function reorder_accents(text, err)
local function reorder_accent_string(accentstr)
local accents = rsplit(accentstr, "")
local accent_order = {
[AC] = 1,
[CFLEX] = 1,
[GR] = 1,
[MACRON] = 1,
[LINEUNDER] = 2,
[DOTUNDER] = 2,
[DOTOVER] = 2,
[TILDE] = 3,
}
table.sort(accents, function(ac1, ac2)
return accent_order[ac1] < accent_order[ac2]
end)
return table.concat(accents)
end
text = rsub(text, "(" .. accent_c .. "+)", reorder_accent_string)
-- Remove duplicate accents.
text = rsub_repeatedly(text, "(" .. accent_c .. ")%1", "%1")
-- Make sure we don't have more than one of a given class.
if rfind(text, quality_c .. quality_c) then
err("Two different quality diacritics cannot occur together")
end
if rfind(text, stress_c .. stress_c) then
err("Two different stress diacritics cannot occur together")
end
-- Only a/e/o can receive a circumflex, grave or macron.
if rfind(text, "[^aeo][" .. CFLEX .. GR .. MACRON .. "]") then
err("Only a/e/o can be followed by circumflex, grave or macron")
end
return text
end
-- Generate partial IPA for a single preprocessed term respelling `text` in the specified `style` ('gbr', 'rio', etc.;
-- see all_style_descs above). If `phonetic` is given, generate phonetic output, otherwise phonemic output. `err` is a
-- function of one argument (an error string) and should throw an error if called. This function is a subfunction of
-- `IPA` and cannot really be used by itself, because it generates output containing special symbols that need to be
-- postprocessed into multiple outputs (and in addition some other final postprocessing needs to happen, e.g. to get
-- stress marks in the right place). The function `IPA` is available be called externally.
local function one_term_ipa(text, style, phonetic, err)
local brazil = m_table.contains(export.all_style_groups.br, style) and true or false
local portugal = m_table.contains(export.all_style_groups.pt, style) and true or false
-- Initial x -> /ʃ/: [[xérox]], [[xilofone]], [[xadrez]], etc.
text = rsub(text, "(" .. word_or_component_sep_c .. ")x", "%1ʃ")
-- Final x -> /ks/ ([[clímax]], [[xérox]], [[córtex]], [[hélix]], [[durex]], [[lux]], etc.), but for now we map to
-- X because later on we open unstressed vowels before final x.
text = rsub(text, "x(" .. word_or_component_sep_c .. ")", "X%1")
-- x after certain dipthongs (ai, ei, oi, ou) and after -en- should be /ʃ/. Other diphthongs before x are rare
-- and mostly learned and we need to force explicit respelling.
text = rsub(text, "(([aeo])" .. charsep_c .. "*([iun])" .. charsep_c .. "*)x",
function(all, a, b)
local ab = a .. b
-- [[baixo]], [[peixe]], [[troixa]], [[frouxo]], [[enxame]], etc.
if ab == "ai" or ab == "ei" or ab == "oi" or ab == "ou" or ab == "en" then
return all .. "ʃ"
else
return all .. "x"
end
end)
-- -exC- should be pronounced like -esC- in Brazil but -eisC- in Portugal. Cf. excelente, experiência, têxtil,
-- êxtase. Not with other vowels (cf. [[Felixlândia]], [[Laxmi]], [[Oxford]]).
-- FIXME: Maybe this applies only to Lisbon and environs?
text = rsub(text, "(e" .. accent_c .. "*)x(" .. C .. ")", function(v, c)
if brazil then
return v .. "s" .. c
elseif c == "s" then
return v .. "isç"
else
return v .. "is" .. c
end
end)
if rfind(text, "x") then
err("x must be respelled z, sh, cs, ss or similar")
end
-- combinations with h; needs to precede handling of c and s, and needs to precede syllabification so that
-- the consonant isn't divided from the following h.
if style == "npt" then
-- In Northern Portugal the affricate tch is kept
text = rsub(text, "ch", "tʃ")
end
-- Else
text = rsub(text, "([sclnp])h", {["s"]="ʃ", ["c"]="ʃ", ["n"]="ɲ", ["l"]="ʎ", ["p"]="f" })
-- remove initial <h>
text = rsub(text, "(" .. word_or_component_sep_c .. ")h([^" .. accent .. "])", "%1%2")
-- Betacism
if style == "npt" then
-- In Northern Portugal, <v> is realized as <b>
text = rsub(text, "v", "b")
end
-- c, g, q
-- This should precede syllabification especially so that the latter isn't confused by gu, qu, gü, qü
-- also, c -> ç before front vowel ensures that cc e.g. in [[cóccix]], [[occitano]] isn't reduced to single c.
text = rsub(text, "c(" .. FRONTV .. ")", "ç%1")
text = rsub(text, "g(" .. FRONTV .. ")", "j%1")
text = rsub(text, "gu(" .. FRONTV .. ")", "g%1")
-- [[camping]], [[doping]], [[jogging]], [[Bangkok]], [[angstrom]], [[tungstênio]]
text = rsub(text, "ng([^" .. vowel .. glide .. "hlr])", brazil and "n%1" or "ngh%1")
text = rsub(text, "qu(" .. FRONTV .. ")", "k%1")
text = rsub(text, "ü", "u") -- [[agüentar]], [[freqüentemente]], [[Bündchen]], [[hübnerita]], etc.
text = rsub(text, "([gq])u(" .. V .. ")", "%1w%2") -- [[quando]], [[guarda]], etc.
text = rsub(text, "[cq]", "k") -- [[Qatar]], [[burqa]], [[Iraq]], etc.
-- y -> i between non-vowels, cf. [[Itamaraty]] /i.ta.ma.ɾa.ˈt(ʃ)i/, [[Sydney]] respelled 'Sýdjney' or similar
-- /ˈsid͡ʒ.nej/ (Brazilian). Most words with y need respelling in any case, but this may help.
text = rsub(text, "(" .. C_OR_WORD_BOUNDARY .. ")y(" .. accent_c .. "*" .. C_OR_WORD_BOUNDARY .. ")", "%1i%2")
-- Reduce double letters to single, except for rr, mm, nn and ss, which map to special single sounds. Do this
-- before syllabification so double letters don't get divided across syllables. The case of cci, cce is handled
-- above. nn always maps to /n/ and mm to /m/ and can be used to force a coda /n/ or /m/. As a result,
-- [[connosco]] will need respelling 'comnôsco', 'cõnôsco' or 'con.nôsco', and [[comummente]] will similarly
-- need respelling e.g. as 'comum.mente' or 'comũmente'. Examples of words with double letters (Brazilian
-- pronunciation):
-- * [[Accra]] no respelling needed /ˈa.kɾɐ/;
-- * [[Aleppo]] respelled 'Aléppo' /aˈlɛ.pu/;
-- * [[buffer]] respelled 'bâfferh' /ˈbɐ.feʁ/;
-- * [[cheddar]] respelled 'chéddarh' /ˈʃɛ.daʁ/;
-- * [[Hanna]] respelled 'Ranna' /ˈʁɐ̃.nɐ/;
-- * [[jazz]] respelled 'djézz' /ˈd͡ʒɛs/;
-- * [[Minnesota]] respelled 'Minnessôta' /mi.neˈso.tɐ/;
-- * [[nutella]] respelled 'nutélla' /nuˈtɛ.lɐ/;
-- * [[shopping]] respeled 'shópping' /ˈʃɔ.pĩ/ or 'shóppem' /ˈʃɔ.pẽj̃/;
-- * [[Stonehenge]] respelled 'Sto̱wnn.rrendj' /ˌstownˈʁẽd͡ʒ/;
-- * [[Yunnan]] no respelling needed /juˈnɐ̃/.
--
-- Note that further processing of r and s happens after syllabification and stress assignment, because we need
-- e.g. to know the distinction between final -s and -z to assign the stress properly.
text = rsub(text, "rr", "ʁ")
text = rsub(text, "nn", "N")
text = rsub(text, "mm", "M")
-- Deleted epenthetic /i/ should prevent preceding /m/, /n/ from being converted into nasalization.
text = rsub(text, "mƗ", "MƗ")
text = rsub(text, "nƗ", "NƗ")
-- Will map later to /s/; need to special case to support spellings like 'nóss' (= nós, plural of nó).
text = rsub(text, "ss", "S")
text = rsub(text, "(" .. C .. ")%1", "%1")
-- muit- is special and contains nasalization. Do before palatalization of t/d so [[muitíssimo]] works.
text = rsub(text, "(" .. word_or_component_sep_c .. "mu" .. stress_c .. "*)(it)", "%1" .. TILDE .. "%2")
-- Palatalize t/d + Ɨ -> affricates in Brazil. Use special unitary symbols, which we later convert to regular affricate
-- symbols, so we can distinguish palatalized d from written dj. We only do Ɨ now so we can delete it; we do another
-- palatalization round towards the end after raising e -> i.
local palatalize_td = {["t"] = "ʧ", ["d"] = "ʤ"}
if brazil then
text = rsub(text, "([td])(" .. word_or_component_sep_c .. "*Ɨ)",
function(td, high_vocalic) return palatalize_td[td] .. high_vocalic end)
-- Now delete the symbol for deleted epenthetic /i/; it still triggers palatalization of t and d.
text = rsub(text, "Ɨ", "")
end
-- Divide words into syllables.
-- First, change user-specified . into a special character so we won't move it around. We need to keep this
-- going forward until after we place the stress, so we can correctly handle initial i- + vowel, as in [[ia]],
-- [[iate]] and [[Iaundé]]. We need to divide [[ia]] as 'i.a' but [[iate]] as 'ia.te' and [[Iaundé]] as 'Ia.un.dé'.
-- In the former case, the stress goes on i but in the latter cases not; so we always divide <ia> as 'i.a',
-- and then after stress assignment remove the syllable divider if the <i> isn't stressed. The tricky thing is
-- that we want to allow the user to override this by explicitly adding a . between the <i> and <a>. So we need
-- to keep the distinction between user-specified . and auto-determined . until after stress assignment.
text = rsub(text, "%.", SYLDIV)
-- We have various characters indicating divisions between word components where we want to treat the components
-- more or less like separate words (e.g. -mente, -zinho/-zinha). Some such "characters" are digraphs, which we
-- convert internally to single characters to simplify the code. Here, -- separates off -mente/-zinho/-zinha and
-- ++ separates off prefixes. We want to ignore at least + and ++ (converted to *) for syllabification purposes.
text = rsub(text, "%-%-", "@")
text = rsub(text, "%+%+", "*")
-- Respell [[homenzinho]] as 'homemzinho' so it is stressed correctly.
text = rsub(text, "n(" .. SYLDIV .. "?ziɲos?" .. word_or_component_sep_c .. ")", "m%1")
-- Divide before the last consonant (possibly followed by a glide). We then move the syllable division marker
-- leftwards over clusters that can form onsets. Note that syllable-transparent component separators will always
-- be (and will continue to be) to the left of syllable dividers rather than to the right, so we don't need to
-- check for the latter situation.
text = rsub_repeatedly(text, "(" .. V .. accent_c .. "*" .. C_OR_SYL_TRANSP .. "-)(" .. C .. H_GLIDE_OR_SYL_TRANSP .. "*" .. V .. ")", "%1.%2")
text = rsub(text, "([pbtdkgfv]" .. H_OR_SYL_TRANSP .. "*)%.([lr])", ".%1%2")
if portugal then
-- "Improper" clusters of non-sibiliant-obstruent + obstruent (pt, bt, bd, dk, kt; ps, bs, bv, bʒ, tz, dv, ks;
-- ft), non-sibiliant-obstruent + nasal (pn, bn, tm, tn, dm, dn, gm, gn), nasal + nasal (mn) are syllabified in
-- Portugal as .pt, .bv, .mn, etc. Note ʃ.t, ʃ.p, ʃ.k, etc. But in Brazil, all of these divide between the
-- consonants (p.t, b.v, ʃ.t, s.p, etc.). Particular case: [[ab-rogação]] divides as a.brr in Portugal but ab.rr
-- in Brazil.
text = rsub(text, "([pbtdkgfv]" .. H_OR_SYL_TRANSP .. "*)%.([pbtdkgfvsSçzʃʒjmMnNɲʎʁ])", ".%1%2")
text = rsub(text, "([mM]" .. H_OR_SYL_TRANSP .. "*)%.([nN])", ".%1%2")
else
-- /tʃ/, /dʒ/ are normally single sounds, but adj- in [[adjetivo]], [[adjunto]] etc. should be 'ad.j'
text = rsub(text, "(t" .. STC .. ")%.(ʃ)", ".%1%2")
text = rsub(text, "(d" .. STC .. ")%.(j)", ".%1%2")
text = rsub(text, "(" .. word_or_component_sep_c .. "a" .. STC .. ")%.(d" .. STC .. ")(j)", "%1%2.%3")
end
-- All vowels should be separated from adjacent vowels by a syllable division except
-- (1) aeo + unstressed i/u, ([[saiba]], [[peixe]], [[noite]], [[Paulo]], [[deusa]], [[ouro]]), except when
-- followed by nh or m/n/r/l + (non-vowel or word end), e.g. Bom.ba.im, ra.i.nha, Co.im.bra, sa.ir, but Jai.me,
-- a.mai.nar, bai.le, ai.ro.so, quei.mar, bei.ra;
-- (2) iu(s), ui(s) at end of word, e.g. fui, Rui, a.zuis, pa.riu, viu, sa.iu;
-- (3) ão, ãe, õe.
--
-- The easiest way to handle this is to put a special symbol between vowels that should not have a syllable
-- division between them.
--
-- First, put a syllable divider between [aeo].[iu][mnlr], as in [[Bombaim]], [[Coimbra]], [[saindo]], [[sair]],
-- [[Iaundé]], [[Raul]]. Note that in cases like [[Jaime]], [[queimar]], [[fauna]], [[baile]], [[Paulo]], [[beira]],
-- where a vowel follows the m/n/l/r, there will already be a syllable division between i.m, u.n, etc., which will
-- block the following substitution.
text = rsub(text, "([aeo]" .. accent_c .. "*" .. STC .. ")([iu]" .. STC .. "[mnlr])", "%1.%2")
-- Also put a syllable divider between [aeo].[iu].ɲ coming from 'nh' ([[rainha]], [[moinho]]).
text = rsub(text, "([aeo]" .. accent_c .. "*" .. STC .. ")([iu]" .. STC .. "%.ɲ)", "%1.%2")
-- Prevent syllable division between final -ui(s), -iu(s). This should precede the following rule that prevents
-- syllable division between ai etc., so that [[saiu]] "he left" gets divided as sa.iu.
-- It doesn't make sense to have STC in the middle of a diphthong here.
text = rsub(text, "(u" .. accent_c .. "*)(is?" .. word_or_component_sep_c .. ")", "%1" .. TEMP1 .. "%2")
text = rsub(text, "(i" .. accent_c .. "*)(us?" .. word_or_component_sep_c .. ")", "%1" .. TEMP1 .. "%2")
-- Prevent syllable division between ai, ou, etc. unless either the second vowel is accented [[saído]]) or there's
-- a TEMP1 marker already after the second vowel (which will occur e.g. in [[saiu]] divided as 'sa.iu').
text = rsub_repeatedly(text, "([aeo]" .. accent_c .. "*)([iu][^" .. accent .. TEMP1 .. "])", "%1" .. TEMP1 .. "%2")
text = rsub_repeatedly(text, "(u" .. accent_c .. "*)(i[^" .. accent .. TEMP1 .. "])", "%1" .. TEMP1 .. "%2")
text = rsub_repeatedly(text, "(i" .. accent_c .. "*)(u[^" .. accent .. TEMP1 .. "])", "%1" .. TEMP1 .. "%2")
-- Prevent syllable division between nasal diphthongs unless somehow the second vowel is accented.
text = rsub_repeatedly(text, "(a" .. accent_c .. "*" .. TILDE .. ")([eo][^" .. accent .. "])", "%1" .. TEMP1 .. "%2")
text = rsub_repeatedly(text, "(o" .. accent_c .. "*" .. TILDE .. ")(e[^" .. accent .. "])", "%1" .. TEMP1 .. "%2")
text = rsub_repeatedly(text, "(u" .. accent_c .. "*" .. TILDE .. ")(i[^" .. accent .. "])", "%1" .. TEMP1 .. "%2")
-- All other sequences of vowels get divided.
text = rsub_repeatedly(text, "(" .. V .. accent_c .. "*" .. STC .. ")(" .. V .. ")", "%1.%2")
-- Remove the marker preventing syllable division.
text = rsub(text, TEMP1, "")
-- An acute or circumflex not followed by a stress marker has primary stress, so indicate it.
text = rsub_repeatedly(text, "(" .. V .. quality_c .. ")([^" .. stress .. "])", "%1ˈ%2")
-- Line-under indicates secondary stress.
text = rsub(text, LINEUNDER, "ˌ")
-- Add primary stress to the word if not already present.
local function accent_word(word)
-- Check if stress already marked. We check first for primary stress before checking for tilde in case both
-- primary stress and tilde occur, e.g. [[bênção]], [[órgão]], [[hétmã]], [[connosco]] respelled 'cõnôsco'.
if rfind(word, "ˈ") then
return word
end
-- Preserve the syllable divider, which may be auto-added or user-specified.
local syllables = m_strutils.capturing_split(word, "([." .. SYLDIV .. "])")
-- Check for nasal vowel marked with tilde and without non-primary stress; assign stress to the last such
-- syllable in case there's more than one tilde, e.g. [[pãozão]]. Note, this can happen in the part before
-- -mente, cf. [[anticristãmente]], and before -zinho, cf. [[coraçãozinho]].
for i = #syllables, 1, -2 do -- -2 because of the syllable dividers; see above.
local changed
syllables[i], changed = rsubb(syllables[i], "(" .. V .. quality_c .. "*)" .. TILDE, "%1ˈ" .. TILDE)
if changed then
return table.concat(syllables)
end
end
-- Apply the default stress rule.
local sylno
-- Prefixes ending in a vowel such as pseudo- have a PSEUDOCONS after the final vowel, but we don't want that to
-- interfere in the stress-assignment algorithm.
if #syllables > 1 and (rfind(word, "[aeo][s" .. PSEUDOCONS .. "]?$") or rfind(word, "[ae]m$") or rfind(word, "[ae]ns$")) then
-- Stress the last syllable but one. The -2 is because of the syllable dividers; see above.
sylno = #syllables - 2
else
sylno = #syllables
end
-- Don't put stress on epenthetic i; instead, we stress the preceding syllable, as if epenthetic i weren't
-- there.
while sylno > 1 and rfind(syllables[sylno], "I") do
sylno = sylno - 2
end
-- It is (vaguely) possible that we have a one-syllable word beginning with a complex cluster such as gn-
-- followed by a normally unstressed ending such as -em. In this case, we want the ending to be stressed.
while sylno < #syllables and rfind(syllables[sylno], "I") do
sylno = syno + 2
end
-- If we are on a syllable without a vowel (can happen if it's the last syllable in a non-final component of a
-- word, when using a component separator that is transparent to stress, such as in [[rapazinho]] respelled
-- 'rapaz+inho'), stress the syllable to the left.
while sylno > 1 and not rfind(syllables[sylno], V) do
sylno = sylno - 2
end
if rfind(syllables[sylno], stress_c) then
-- Don't do anything if stress mark already present. (Since we check for primary stress above, this check
-- specifically affects non-primary stress.)
return word
end
-- Add stress mark after first vowel (and any quality mark).
syllables[sylno] = rsub(syllables[sylno], "^(.-" .. V .. quality_c .. "*)", "%1ˈ")
return table.concat(syllables)
end
-- Split the text into words and the words into components so we can correctly add stress to components without it.
local words = rsplit(text, " ")
for j, word_with_boundary_markers in ipairs(words) do
-- Prefixes have a PREFIX_MARKER after the # at the end of the prefix; split it off.
local begin_marker, word, end_marker = rmatch(word_with_boundary_markers, "^(#*)(.-)([#" .. PREFIX_MARKER .. "]*)$")
-- Words ends in -mente, -zinho(s) or -zinha(s); add primary stress to the preceding portion as if stressed
-- (e.g. [[agitadamente]] -> 'agitádamente') unless already stressed (e.g. [[rapidamente]] respelled
-- 'rápidamente'). The primary stress will be converted to secondary stress further below. Essentially, we
-- rip the word apart into two words ('mente'/'zinho' and the preceding portion) and
-- stress each one independently. Note that the effect of adding a primary stress will also be to cause
-- an error if stressed 'e' or 'o' is not properly marked as é/ê or ó/ô; cf. [[certamente]], which must
-- be respelled 'cértamente', and [[posteriormente]], which must be respelled 'posteriôrmente', just as
-- with [[certa]] and [[posterior]]. To prevent this happening, you can add an accent to -mente or
-- -zinho, e.g. [[dormente]] respelled 'dormênte', [[vizinho]] respelled 'vizínho'.
if rfind(word, syldiv_c .. "men%.te$") then
word = rsub(word, syldiv_c .. "(men%.te)$", "@%1")
else
word = rsub(word, syldiv_c .. "(zi%.ɲ[oa]s?)$", "@%1")
end
-- Split on components; preserve the component divider.
local components = m_strutils.capturing_split(word, "(" .. component_sep_c .. syldiv_c .. "*)")
for k = 1, #components, 2 do -- 2 because of the component dividers.
-- Don't add stress to components followed by ++ (converted to *).
if k == #components or not rfind(components[k + 1], "%*") then
components[k] = accent_word(components[k])
end
end
-- Reconstruct the word.
words[j] = begin_marker .. table.concat(components, "") .. end_marker
end
-- Reconstruct the text from the words.
text = table.concat(words, " ")
-- Add word boundaries around component separators. We add them on both sides of - and -- (converted to @), which
-- behave mostly like a true word separator, but only on the right side of other component separators (which
-- corresponds to the beginning of the word following the separator). Note that some component separators (+ and ++
-- [converted to *]) are transparent to syllable boundaries, meaning that there may be a syllable divider directly
-- to the right of the component separator. To simplify the code below, we put the word boundary marker on the outside
-- of the syllable boundary marker.
text = rsub(text, "([%-@]" .. syldiv_c .. "?)", "#%1#")
text = rsub(text, "([+:*]" .. syldiv_c .. "?)", "%1#")
-- I has served its purpose (not considered when accenting).
text = rsub(text, "I", "i")
-- Remove hiatus between initial <i> and following vowel ([[Iasmim]]) unless the <i> is stressed ([[ia]]) or the
-- user explicitly added a . (converted to SYLDIV above).
text = rsub(text, "#i%.(" .. V .. ")", "#y%1")
if brazil then
-- In Brazil, hiatuses involving i. or u. have two possibilities (full vowel or glide); represent using Ì. and Ù.,
-- which we later convert appropriately. Do this before eliminating SYLDIV so the user can force a hiatus using a
-- period.
local hiatus_to_optional_glide = {["i"] = "Ì", ["u"] = "Ù"}
text = rsub(text, "(" .. C_OR_WORD_BOUNDARY .. ")([iu])(%." .. V .. ")",
function(before, hiatus, after) return before .. hiatus_to_optional_glide[hiatus] .. after end)
-- In Brazil, hiatuses of the form í.o (e.g. [[rio]] "river", [[vazio]]; but not [[rio]] "I laugh") have two
-- possibilities (i.u or iw); represent using Ú, which we later convert appropriately. Do this before eliminating
-- SYLDIV so the user can force a hiatus using a period, as in [[rio]] "I laugh" respelled 'ri.o'.
text = rsub(text, "(i" .. ipa_stress_c .. "%.)o(s?#)", "%1Ú%2")
else
-- Outside of Brazil, e.i -> a.i, e.g. [[ateísta]], [[proteína]], [[proteinúrio]] respelled 'prote.inúrio'. But seems
-- not to happen in rei- ([[reincidente]], [[reiniciar]], [[reidratar]], etc.). Note, it does occur in [[reídeo]],
-- which needs respelling.
text = rsub(text, "(#re" .. syldiv_c .. ")(i)", "%1" .. TEMP1 .. "%2")
text = rsub(text, "e(" .. syldiv_c .. "i)", "a%1")
text = rsub(text, TEMP1, "")
-- Outside of Brazil, hiatuses involving 'e./i.' or 'o./u.' after obstruent + l/r preceding a vowel have two
-- possibilities (full vowel or glide), as in [[criança]], [[altruista]], etc. Represent using Ì. and Ù., which
-- we later convert appropriately. Do this before eliminating SYLDIV so the user can force a hiatus using a
-- period.
local hiatus_to_optional_glide = {["e"] = "Ì", ["i"] = "Ì", ["o"] = "Ù", ["u"] = "Ù"}
text = rsub(text, "([pbtdkgfv]" .. H_OR_SYL_TRANSP .. "*[lr])([eiou])(%." .. V .. ")",
function(before, hiatus, after) return before .. hiatus_to_optional_glide[hiatus] .. after end)
-- Outside of Brazil, remove hiatus more generally whenever 'e./i.' or 'o./u.' precedes a vowel. Do this before
-- eliminating SYLDIV so the user can force hiatus using a period.
local hiatus_to_glide = {["e."] = "y", ["i."] = "y", ["o."] = "w", ["u."] = "w"}
text = rsub(text, "(" .. C_OR_WORD_BOUNDARY .. ")([eiou]%.)(" .. V .. ")",
function(before, hiatus, after) return before .. hiatus_to_glide[hiatus] .. after end)
end
-- Convert user-specified syllable division back to period. See comment above when we add SYLDIV.
text = rsub(text, SYLDIV, ".")
-- Vowel quality handling. First convert all a -> A, e -> E, o -> O. We will then convert A -> a/ɐ, E -> e/ɛ/ɨ,
-- O -> o/ɔ/u depending on accent marks and context. Ultimately all vowels will be one of the nine qualities
-- aɐeɛiɨoɔu and following each vowel will either be nothing (no stress), an IPA primary stress mark (ˈ) or an
-- IPA secondary stress mark (ˌ), in turn possibly followed by a tilde (nasalization). After doing everything
-- that depends on the position of stress, we will move the IPA stress marks to the beginning of the syllable.
text = rsub(text, "[aeo]", {["a"] = "A", ["e"] = "E", ["o"] = "O"})
text = rsub(text, DOTOVER, "") -- eliminate DOTOVER; it served its purpose of preventing stress
-- Nasal vowel handling.
-- Final unstressed -am (in third-person plural verbs) pronounced like unstressed -ão.
text = rsub(text, "Am#", "A" .. TILDE .. "O#")
if portugal then
-- In Portugal, final -n is really /n/, and preceding unstressed e/o are open ([[cólon]], [[crípton]], [[éon]];
-- [[glúten]], [[hífen]], [[pólen]]).
text = rsub(text, "n#", "N#")
text = rsub(text, "([EO])(N#)", "%1" .. AC .. "%2")
end
if brazil then
-- In Brazil, [[põem]] is pronounced like 'põe'.
text = rsub(text, "(Oˈ" .. TILDE .. ")(Em#)", "%1E#")
else
-- In Portugal, circumflex accent on final -em ([[vêm]], [[mantêm]], etc.) indicates a special double nasal diphthong
-- pronunciation.
text = rsub(text, "E" .. CFLEX .. "ˈm#", "E" .. CFLEX .. "ˈ" .. TILDE .. "y" .. TILDE .. ".E" .. CFLEX .. "m#")
-- In Portugal, [[põem]] is pronounced like 'põeem'.
text = rsub(text, "(Oˈ" .. TILDE .. ")(Em#)", "%1E.%2")
end
-- Acute accent on final -em ([[além]], [[também]]) and final -ens ([[parabéns]]) does not indicate an open
-- pronunciation.
text = rsub(text, "E" .. AC .. "(ˈ[mn]s?#)", "E" .. CFLEX .. "%1")
-- Vowel + m/n within a syllable gets converted to tilde.
text = rsub(text, "(" .. V .. quality_c .. "*" .. stress_c .. "*)[mn]", "%1" .. TILDE)
-- Non-high vowel without quality mark + tilde needs to get the circumflex (possibly fed by the previous change).
text = rsub(text, "([AEO])(" .. stress_c .. "*)" .. TILDE, "%1" .. CFLEX .. "%2" .. TILDE)
-- Primary-stressed vowel without quality mark + m/n/nh across syllable boundary gets a circumflex, cf. [[cama]],
-- [[ano]], [[banho]] (excluding Northern Portugal)
-- Make an exception for -ene/-eme in Portugal, where it should be open by default
if style == "npt" then
-- Northern Portugal keeps the open "a" vowels
text = rsub(text, "(A)(ˈ%.[mnɲMN])", "%1" .. AC .. "%2")
end
if portugal then
text = rsub(text, "(E)(ˈ%.[mnMN]E#)", "%1" .. AC .. "%2")
end
text = rsub(text, "(" .. V .. ")(ˈ%.[mnɲMN])", "%1" .. CFLEX .. "%2")
if brazil then
if style ~= "sbr" then -- Seems this happens less or not at all in South Brazil.
-- Primary-stressed vowel + m/n across syllable boundary gets nasalized in Brazil, cf. [[cama]], [[ano]].
text = rsub(text, "(" .. V .. quality_c .. "*)(ˈ%.[mnMN])", "%1" .. TILDE .. "%2")
end
-- All vowels before nh (always across syllable boundary) get circumflexed and nasalized in Brazil,
-- cf. [[ganhar]]. I *think* the circumflexing but not nasalizing happens in South Brazil.
text = rsub(text, "(" .. V .. stress_c .. "*)(%.ɲ)", "%1" .. CFLEX .. "%2")
if style ~= "sbr" then -- I *think* this doesn't apply to South Brazil; need to verify.
text = rsub(text, "(" .. V .. quality_c .. "*" .. stress_c .. "*)(%.ɲ)", "%1" .. TILDE .. "%2")
end
-- Convert initial unstressed em-/en- before consonant to special symbol /Ẽ/, which later on is converted
-- to /e/ (careful pronunciation) or /i/ (natural pronunciation).
text = rsub(text, "(#E" .. CFLEX .. TILDE ..")(%." .. C ..")", "#Ẽ" .. TILDE .. "%2")
-- Same in [[em]] standing alone (which will have a DOTUNDER in it), and in [[em-]].
text = rsub(text, "(#E" .. CFLEX .. DOTUNDER .. "?" .. TILDE ..")(#)", "#Ẽ" .. TILDE .. "%2")
end
-- Nasal diphthongs.
local nasal_termination_to_glide = {["E"] = "y", ["O"] = "w"}
-- In ãe, ão, the second letter represents a glide.
text = rsub(text, "(A" .. CFLEX .. stress_c .. "*" .. TILDE .. ")([EO])",
function(v1, v2) return v1 .. nasal_termination_to_glide[v2] .. TILDE end)
-- Likewise for õe.
text = rsub(text, "(O" .. CFLEX .. stress_c .. "*" .. TILDE .. ")E", "%1y" .. TILDE)
-- Likewise for ũi (generated above from muit-).
text = rsub(text, "(u" .. stress_c .. "*" .. TILDE .. ")i", "%1y" .. TILDE)
-- Final -em and -ens (stressed or not) pronounced /ẽj̃(s)/. (Later converted to /ɐ̃j̃(s)/ in Portugal.)
text = rsub(text, "(E" .. CFLEX .. stress_c .. "*" .. TILDE .. ")(s?#)", "%1y" .. TILDE .. "%2")
-- Oral diphthongs.
-- ei, eu, oi, ou -> êi, êu, ôi, ôu
text = rsub(text, "([EO])(" .. stress_c .. "*[iuywY])", "%1" .. CFLEX .. "%2")
-- ai, au -> ái, áu
text = rsub(text, "(A)(" .. stress_c .. "*[iuywY])", "%1" .. AC .. "%2")
-- Convert A/E/O as appropriate when followed by a secondary or tertiary stress marker. If a quality is given,
-- it takes precedence; otherwise, act as if an acute accent were given.
text = rsub(text, "([AEO])(" .. non_primary_stress_c .. ")", "%1" .. AC .. "%2")
-- Stressed o in -dor, -dor, -sor ([[ganhador]], [[autor]], [[invasor]], [[agressor]], etc.) and feminines and plurals
-- is closed /o/.
text = rsub(text, "([dtsS])O(ˈr#)", "%1o%2")
text = rsub(text, "([dtsS])O(ˈ%.r[EA]s?#)", "%1o%2")
-- Stressed e and o in -el, -ol are open
text = rsub(text, "O(ˈl#)", "ɔ%1")
text = rsub(text, "E(ˈl#)", "ɛ%1")
-- Predictable metaphony:
-- Stressed o in -oso is closed /o/.
text = rsub(text, "O(ˈ%.sO#)", "o%1")
-- Stressed o in -osos, -osa(s) is open /ɔ/.
text = rsub(text, "O(ˈ%.s[OA]s?#)", "ɔ%1")
-- Stressed o in -posto is closed /o/.
text = rsub(text, "pO(ˈs%.tO#)", "po%1")
-- Stressed o in -postos, -posta(s) is open /ɔ/.
text = rsub(text, "pO(ˈs%.t[OA]s?#)", "pɔ%1")
-- Unstressed syllables.
-- Before final <x>, unstressed a/e/o are open, e.g. [[clímax]], [[córtex]], [[xérox]].
text = rsub(text, "([AEO])(X)", "%1" .. AC .. "%2")
-- Capital X has served its purpose, so replace it.
text = rsub(text, "X", "kç")
if brazil then
if style ~= "sbr" then
-- Final unstressed -e(s), -o(s) -> /i/ /u/ (including before -mente)
local brazil_final_vowel = {["E"] = "i", ["O"] = "u"}
text = rsub(text, "([EO])(s?#)", function(v, after) return brazil_final_vowel[v] .. after end)
-- Word-final unstressed -a(s) -> /ɐ/ (not before -mente)
text = rsub(text, "A(s?#[^@])", function(after) return "ɐ" .. after end)
-- Word-final unstressed -ar -> /ɐr/ (e.g. [[açúcar]])
text = rsub(text, "A(r#)", function(after) return "ɐ" .. after end)
end
-- Initial unmarked unstressed non-nasal e- + -sC- -> /i/ or /e/ ([[estar]], [[esmeralda]]). To defeat this,
-- explicitly mark the <e> e.g. as <ệ> or <eh>. We reuse the special symbol /I/ for this purpose, which later
-- on is converted to /i/ or /e/. In South Brazil, however, the raised /i/ variant doesn't seem to exist.
if not rfind(text, "#Es.ç") then
text = rsub(text, "#E(s" .. C .. "*%.)", style == "sbr" and "#e%1" or "#I%1")
end
-- Remaining unstressed a, e, o without quality mark -> /a/ /e/ /o/.
local brazil_unstressed_vowel = {["A"] = "a", ["E"] = "e", ["O"] = "o"}
text = rsub(text, "([AEO])([^" .. accent .. "])",
function(v, after) return brazil_unstressed_vowel[v] .. after end)
end
if portugal then
-- In Portugal, final unstressed -r opens preceding a/e/o ([[dólar]], [[líder]], [[júnior]], [[inter-]]
-- respelled 'ínter:...').
text = rsub(text, "([AEO])(r" .. word_or_component_sep_c .. ")", "%1" .. AC .. "%2")
-- In Portugal, unstressed a/e/o before coda l takes on an open quality. Note that any /l/ directly after a
-- vowel must be a coda /l/ because otherwise there would be a syllable boundary marker.
text = rsub(text, "([AEO])l", function(v)
-- The symbol Ɔ is later converted to /o/ or /ɔ/.
local vowel_to_before_l = {["A"] = "a", ["E"] = "ɛ", ["O"] = "Ɔ"}
return vowel_to_before_l[v] .. "l"
end)
-- Unstressed 'ie' -> /jɛ/
text = rsub(text, "yE([^" .. accent .. "])", "yɛ%1")
-- Initial unmarked unstressed non-nasal e- + -sC- (seemingly also after des-, see Infopédia [[desestagnar]]) ->
-- temporary symbol I (later changed to /(i)/, except after a vowel, in which case it is deleted). Note that /s/
-- directly after a vowel must be a coda /s/ because otherwise there would be a syllable boundary marker.
text = rsub(text, "#Es", "#Is")
-- Initial unmarked unstressed non-nasal e- -> /i/, including after des-.
text = rsub(text, "#E([^" .. accent .. "])", "#i%1")
-- Initial unmarked unstressed non-nasal o- -> /ɔ/ if another vowel follows (not 'o', 'os' by themselves).
text = rsub(text, "(#O)(.-#)", function(o, rest)
if rfind(rest, "^[^" .. accent .. "]") and rfind(rest, V) then
return "#ɔ" .. rest
else
return o .. rest
end
end)
-- All other unmarked unstressed non-nasal e, o, a -> /ɨ/ /u/ /ɐ/
local portugal_unstressed_vowel = {["A"] = "ɐ", ["E"] = "ɨ", ["O"] = "u"}
text = rsub(text, "([AEO])([^" .. accent .. "])",
function(v, after) return portugal_unstressed_vowel[v] .. after end)
end
-- Remaining vowels.
-- All remaining a -> /a/ (should always be stressed).
text = rsub(text, "A([^" .. quality .. "])", "a%1")
-- Ignore quality markers on i, u; only one quality.
text = rsub(text, "([iu])" .. quality_c, "%1")
-- Convert a/e/o + quality marker appropriately.
local vowel_quality = {
["A" .. AC] = "a", ["A" .. CFLEX] = "ɐ",
["E" .. AC] = "ɛ", ["E" .. CFLEX] = "e",
["O" .. AC] = "ɔ", ["O" .. CFLEX] = "o",
}
text = rsub(text, "([AEO]" .. quality_c .. ")", vowel_quality)
-- Stressed o in hiatus ([[voo]], [[boa]], [[perdoe]], etc.) is closed /o/.
text = rsub(text, "O(ˈ%." .. V .. ")", "o%1")
-- Stressed closed /o/ in Northern Portugal has a following optional /w/.
if style=="npt" then
text = rsub(text, "o(ˈ%." .. V .. ")", "o(w)%1")
end
-- Any remaining E or O (always without quality marker) is an error.
if rfind(text, "[EO]") then
err("Stressed e or o not occurring nasalized or in a diphthong must be marked for quality using é/ê or ó/ô")
end
-- Finally, eliminate DOTUNDER, now that we have done all vowel reductions.
text = rsub(text, DOTUNDER, "")
if brazil then
-- Epenthesize /(j)/ in [[faz]], [[mas]], [[três]], [[dez]], [[feroz]], [[luz]], [[Jesus]], etc. Note, this only
-- triggers at actual word boundaries (not before -mente), and not on nasal vowels or diphthongs. To defeat this
-- (e.g. in plurals), respell using 'ss' or 'hs'.
text = rsub(text, "(" .. V .. "ˈ)([sz]#[^@])", "%1Y%2")
-- Also should happen at least before + (cf. [[rapazinho]] respelled 'rapaz+inho', [[vozinha]] respelled
-- 'vóz+inha').
text = rsub(text, "(" .. V .. "ˈ)(%.?[sz]%+)", "%1Y%2")
-- But should not happen after /i/.
text = rsub(text, "iˈY", "iˈ")
end
-- 'S' here represents earlier ss. Word-finally it is used to prevent epenthesis of (j) and should behave
-- like 's'. Elsewhere (between vowels) it should behave like 'ç'.
text = rsub(text, "S#", "s#")
text = rsub(text, "S", "ç")
-- s, z
-- s in trans + V -> z: [[transação]], [[intransigência]]
text = rsub(text, "(trɐ" .. stress_c .. "*" .. TILDE .. ".)s(" .. V .. ")", "%1z%2")
-- word final z -> s
text = rsub(text, "z#", "s#")
-- s is voiced between vowels (not nasalized) or between vowel and voiced consonant, including across word
-- boundaries; may be fed by previous rule. We have to split this into two rules before /s/ should not be voiced
-- between nasal vowel and another vowel ([[cansar]]) but should be voiced between nasal vowel and a voiced
-- consonant ([[transgredir]]). Note that almost all occurrences of nasal vowel + s + voiced consonant are in
-- trans- which potentially could be handled above, but there may be others, e.g. [[Flensburg]].
text = rsub(text, "(" .. V .. stress_c .. "*Y?%.?)s(" .. wordsep_c .. "*h?[" .. vowel .. glide .. "])", "%1z%2")
text = rsub(text, "(" .. V .. accent_c .. "*Y?%.?)s(" .. wordsep_c .. "*h?[" .. voiced_cons .. "])", "%1z%2")
-- z before voiceless consonant, e.g. [[Nazca]]; c and q already removed
text = rsub(text, "z(" .. wordsep_c .. "*[çfkpsʃt])", "s%1")
-- Coda /s,z/
if portugal or style == "rio" then
-- In General Portugal and Rio de Janeiro; s/z before consonant (including across word boundaries) or end of utterance -> ʃ/ʒ;
-- but not word-initially (e.g. [[stressado]]).
local sibilant = {["s"] = "ʃ", ["z"] = "j"}
text = rsub(text, "([sz])(##)", function(sz, after) return sibilant[sz] .. after end)
-- s/z are maintained word-initially. To implement this, insert TEMP1 directly before the s/z we want to preserve, then check for this
-- TEMP1 not being present when converting to shibilant, then remove TEMP1.
text = rsub(text, "([# %-]#)([sz])", "%1" .. TEMP1 .. "%2")
text = rsub_repeatedly(text, "([^" .. TEMP1 .. "])([sz])(" .. wordsep_c .. "*" .. C_NOT_H_OR_GLIDE .. ")",
function(before, sz, after) return before .. sibilant[sz] .. after end)
text = rsub(text, TEMP1, "")
end
text = rsub(text, "ç", "s")
text = rsub(text, "j", "ʒ")
-- Reduce identical sibilants, including across word boundaries.
text = rsub(text, "([szʃʒ])(" .. wordsep_c .. "*)(%1)", "%2%1")
if style == "rio" then
-- Also reduce sibilant ([[descer]], [[as]] [[zonas]]); not in Portugal, but in Portugal we later
-- generate two outputs in this case, either /ʃs/ and /ʒz/ (careful pronunciation) or /ʃ/ and /ʒ/ (natural
-- pronunciation). Note that the reduction of /ʃs/ to /ʃ/ in Portugal is different from the reduction of the
-- same to /s/ in Brazil (though it shouldn't be)
text = rsub(text, "ʃ(" .. wordsep_c .. "*s)", "%1")
text = rsub(text, "ʒ(" .. wordsep_c .. "*z)", "%1")
end
-- N/M from double n/m
text = rsub(text, "[NM]", {["N"] = "n", ["M"] = "m"})
if portugal then
--Drop unneeded 'h' in 'rh' respellings for European Portuguese
text = rsub(text, "rh","r")
if style=="spt" then
--Paragoge of i in word-final r/l in Southern Portugal
text = rsub(text, "ˈr#", "ˈ.ri#")
text = rsub(text, "ˈl#", "ˈ.li#")
end
end
-- r
-- Double rr -> ʁ already handled above.
-- Initial r or l/n/s/z + r -> strong r (ʁ).
text = rsub(text, "([#" .. TILDE .. "lszʃʒ]%.?)r", "%1ʁ")
if brazil then
-- Word-final r before vowel in verbs is /(ɾ)/.
text = rsub(text, "([aɛei]ˈ)r(#" .. wordsep_c .. "*h?" .. V .. ")", "%1(ɾ)%2")
-- Coda r before vowel is /ɾ/.
text = rsub(text, "r([.#]" .. wordsep_c .. "*h?" .. V .. ")", "ɾ%1")
end
-- Word-final r in Brazil in verbs (not [[pôr]]) is usually dropped. Use a spelling like 'marh' for [[mar]]
-- to prevent this. Make sure not to do this before -mente/-zinho ([[polegarzinha]], [[popularmente]]).
if brazil then
text = rsub(text, "([aɛei]ˈ)r(#[^@])",
"%1(" .. (style == "sp" and "ɾ" or style == "cpr" and "ɻ" or "ʁ") .. ")%2")
if style ~= "sp" then
-- Coda r in Southern Brazil is [ɻ], otherwise outside of São Paulo is /ʁ/.
text = rsub(text, "r(" .. C .. "*[.#])", (style == "cpr" and "ɻ" or "ʁ") .. "%1")
end
end
-- All other r -> /ɾ/.
text = rsub(text, "r", "ɾ")
if brazil and phonetic then
-- "Strong" ʁ before voiced consonant is [ɦ] in much of Brazil, [ʁ] in Rio. Use R as a temporary symbol.
text = rsub(text, "ʁ(" .. wordsep_c .. "*[" .. voiced_cons .. "])", style == "rio" and "R%1" or "ɦ%1")
-- Other "strong" ʁ is [h] in much of Brazil, [χ] in Rio. Use H because later we remove all <h>.
text = rsub(text, "ʁ", style == "rio" and "χ" or "H")
text = rsub(text, "R", "ʁ")
end
-- Nasal Diphthong <ẽi> and <ɛi>
if portugal then
-- In Portugal, always lower e -> ɐ before j when nasalized.
text = rsub(text, "e(" .. accent_c .. TILDE .. "*%.?y)", "ɐ%1")
-- In Portugal, lower ɛ -> e before i in <ɛi> (the open pronunciation is dated)
text = rsub(text, "ɛ(" .. accent_c .. "*i)", "e%1")
end
-- Diphthong <ei> (if unchanged, it shall yield /ej/; this should be the case for African pronunciations)
if brazil then
-- In Brazil, add optional /j/ in <eir>, <eij>, <eig> and <eix> (as in [[cadeira]], [[beijo]], [[manteiga]] and
-- [[peixe]]).
text = rsub(text, "(e" .. accent_c .. "*)i(%.[ɾʒgʃ])", "%1(j)%2")
-- [In Brazil, add optional /j/ in <aix> (as in [[caixa]] and [[baixo]]).] -- This was added by an IP, see
-- [[Special:Contributions/186.212.6.138]]; this seems non-standard to me. If we are to include it, it should
-- not be done this way, but as two separate outputs with the one lacking the /j/ marked with a qualifier such
-- as "non-standard"; compare the way the initial enC- is handled (near the end of export.IPA()), where there
-- are two outputs, with /ẽC-/ marked as "careful pronunciation" and /ĩC-/ marked as "natural pronunciation".
-- (Benwing2)
-- text = rsub(text, "(a" .. accent_c .. "*)i(%.ʃ)", "%1(j)%2")
elseif style == "spt" then
-- In Southern Portugal, <ei> monophthongizes to <e>
text = rsub(text, "(e" .. accent_c .. "*)i", "%1")
elseif style == "gpt" then
-- In general Portugal, lower e -> ɐ before i in <ei>.
text = rsub(text, "e(" .. accent_c .. "*i)", "ɐ%1")
-- In general Portugal, lower e -> ɐ before j
text = rsub(text, "e(" .. accent_c .. "*%.?y)", "ɐ%1")
-- In general Portugal, lower e -> ɐ(j) before other palatals.
text = rsub(text, "e(" .. stress_c .. "*)(%.?[ʒʃɲʎ](" .. V .. "))", "ɐ%1(j)%2")
end
-- Diphthong <ou> (if unchanged, it shall yield /o(w)/)
if style == "spt" then
-- In Southern Portugal, <ou> always monophthongizes to <o>
text = rsub(text, "(o" .. accent_c .. "*)u", "%1")
elseif style == "npt" then
-- In Northern Portugal (and Galicia), <ou> is kept
text = rsub(text, "(o" .. accent_c .. "*)u", "%1w")
end
-- Else optional /w/ in <ou>
text = rsub(text, "(o" .. accent_c .. "*)u", "%1(w)")
-- Stop consonants.
if brazil then
-- Palatalize t/d + i/y -> affricates in Brazil.
text = rsub(text, "([td])(" .. word_or_component_sep_c .. "*[" .. high_front_vocalic .. "])",
function(td, high_vocalic) return palatalize_td[td] .. high_vocalic end)
elseif portugal and phonetic then
-- Fricativize voiced stops in Portugal when not utterance-initial or after a nasal; also not in /ld/.
-- Easiest way to do this is to convert all voiced stops to fricative and then back to stop in the
-- appropriate contexts.
local fricativize_stop = { ["b"] = "β", ["d"] = "ð", ["g"] = "ɣ" }
local occlude_fricative = { ["β"] = "b", ["ð"] = "d", ["ɣ"] = "g" }
text = rsub(text, "[bdg]", fricativize_stop)
text = rsub(text, "##([βðɣ])", function(bdg) return "##" .. occlude_fricative[bdg] end)
text = rsub(text, "(" .. TILDE .. wordsep_c .. "*)([βðɣ])", function(before, bdg) return before .. occlude_fricative[bdg] end)
text = rsub(text, "(l" .. wordsep_c .. "*)ð", "%1d")
end
-- Glides and l. ou -> o(w) must precede coda l -> w in Brazil, because <ol> /ow/ cannot be reduced to /o/.
-- ou -> o(w) before conversion of remaining diphthongs to vowel-glide combinations so <ow> can be used to
-- indicate a non-reducible glide.
-- Handle coda /l/.
if brazil then
-- Coda l -> /w/ in Brazil.
text = rsub(text, "l(" .. C .. "*[.#])", "w%1")
elseif phonetic then
-- Coda l -> [ɫ] in Portugal (and Rio Grande do Sul, according to Cunha-Cintra)
text = rsub(text, "l(" .. C .. "*[.#])", "ɫ%1")
end
text = rsub(text, "y", "j")
if brazil then
text = rsub(text, "Y", "(j)") -- epenthesized in [[faz]], [[três]], etc.
else
-- 'I' in Portugal represents word-initial (i) before sC, except after /i/ (e.g. [[antiestático]]), in which
-- case it is elided. In the latter case, we need to elide the word/component separators, otherwise we end up
-- with an extra syllable divider: /ˌɐ̃.ti.ʃˈta.ti.ku/ instead of correct /ˌɐ̃.tiʃˈta.ti.ku/.
text = rsub(text, "(i" .. accent_c .. "*)" .. word_or_component_sep_c .. "*#I", "%1")
text = rsub(text, "I", "(i)")
end
local vowel_termination_to_glide = brazil and phonetic and
{["i"] = "ɪ̯", ["j"] = "ɪ̯", ["u"] = "ʊ̯", ["w"] = "ʊ̯"} or
{["i"] = "j", ["j"] = "j", ["u"] = "w", ["w"] = "w"}
-- i/u as second part of diphthong becomes glide.
text = rsub(text, "(" .. V .. accent_c .. "*" .. "%(?)([ijuw])",
function(v1, v2) return v1 .. vowel_termination_to_glide[v2] end)
-- nh
if brazil and phonetic and style ~= "sbr" then
-- [[unha]] pronounced [ˈũ.j̃ɐ]; nasalization of previous vowel handled above. But initial nh- e.g. [[nhaca]],
-- [[nheengatu]], [[nhoque]] is [ɲ]. I *think* this doesn't happen in South Brazil. We do have the phonetic
-- representation [ẽj̃.pũˈj̃aɾ] given for [[empunhar]], but this is the only such case and may be a mistake.
text = rsub(text, "([^#])ɲ", "%1j" .. TILDE)
end
if portugal then
-- Suppress final -ɨ before a vowel
text = rsub(text, "ɨ#[ %-]#(" .. V .. ")", "‿%1")
--Make optional utterance-finally
-- text = rsub(text, "ɨ##", "(ɨ)##")
-- (ɨ) after l when suppressed should convert to coda ɫ, so split it later into two pronuns.
-- text = rsub(text, "l%(ɨ%)##", "L##")
-- (ɨ) after r when suppressed should also convert to coda
-- text = rsub(text, "ɾ%(ɨ%)##", "R##")
end
text = rsub(text, "g", "ɡ") -- U+0261 LATIN SMALL LETTER SCRIPT G
text = rsub(text, "[ʧʤ]", {["ʧ"] = "t͡ʃ", ["ʤ"] = "d͡ʒ"})
text = rsub(text, "tʃ", "t͡ʃ")
text = rsub(text, "dʒ", "d͡ʒ")
text = rsub(text, "h", "")
text = rsub(text, "H", "h")
return text
end
-- Generate the IPA for a single term respelling `text` in the specified `style` ('gbr', 'rio', etc.; see
-- all_style_descs above). Return value is a list of objects of the following form:
-- { phonemic = STRING, phonetic = STRING, qualifiers = {STRING, ...} }
-- Note that the returned qualifiers are only those generated automatically as a result of certain characteristics of
-- the respelling, e.g. in Brazil initial em-/en- + consonant has two outputs, one labeled "careful pronunciation" and
-- the other "natural pronunciation". User-specified qualifiers are added at the end by the caller of IPA(), and
-- prepended to the auto-generated qualifiers.
function export.IPA(text, style)
local brazil = m_table.contains(export.all_style_groups.br, style) and true or false
local portugal = m_table.contains(export.all_style_groups.pt, style) and true or false
local origtext = text
local function err(msg)
error(msg .. ": " .. origtext)
end
text = ulower(text)
-- decompose everything but ç and ü
text = mw.ustring.toNFD(text)
text = rsub(text, ".[" .. CEDILLA .. DIA .. "]", {
["c" .. CEDILLA] = "ç",
["u" .. DIA] = "ü",
})
text = reorder_accents(text, err)
-- convert commas and en/en dashes to IPA foot boundaries
text = rsub(text, "%s*[,–—]%s*", " | ")
-- question mark or exclamation point in the middle of a sentence -> IPA foot boundary
text = rsub(text, "([^%s])%s*[!?]%s*([^%s])", "%1 | %2")
-- canonicalize multiple spaces and remove leading and trailing spaces
local function canon_spaces(text)
text = rsub(text, "%s+", " ")
text = rsub(text, "^ ", "")
text = rsub(text, " $", "")
return text
end
text = canon_spaces(text)
local words = m_strutils.capturing_split(text, "([ %-]+)")
local function word_is_prefix(i)
-- Check for prefixes, either a final prefix (followed by "-" separator, then a blank word, then no more
-- words) or a non-final prefix (followed by "- " separator).
return i == #words - 2 and words[i + 1] == "-" and words[i + 2] == "" or i < #words and words[i + 1] == "- "
end
for i = 1, #words, 2 do
local word = words[i]
-- Make prefixes unstressed with vowel reduction unless they have an explicit stress marker;
-- likewise for certain monosyllabic words (e.g. [[o]], [[se]], [[de]], etc.; also [[a]], [[das]], etc.
-- in Portugal) without stress marks.
if word_is_prefix(i) and not rfind(words[i], accent_c) or unstressed_words[word] or
portugal and unstressed_full_vowel_words_brazil[word] then
-- add DOTOVER to the last vowel not the first one, or we will mess up 'que' by
-- adding the DOTOVER after the 'u'
word = rsub(word, "^(.*" .. V .. quality_c .. "*)", "%1" .. DOTOVER)
end
-- Make certain monosyllabic words (e.g. [[meu]], [[com]]; also [[a]], [[das]], etc. in Brazil)
-- without stress marks be unstressed without vowel reduction.
if unstressed_full_vowel_words[word] or brazil and unstressed_full_vowel_words_brazil[word] then
-- add DOTUNDER to the first vowel not the last one, or we will mess up 'meu' by
-- adding the DOTUNDER after the 'u'; add after a quality marker for à, às
word = rsub(word, "^(.-" .. V .. quality_c .. "*)", "%1" .. DOTUNDER)
end
-- Some unstressed words need special pronunciation.
word = unstressed_pronunciation_substitution[word] or word
words[i] = word
end
text = table.concat(words)
-- Now eliminate word-final question mark and exclamation point (converted to foot boundary above when word-medial).
text = rsub(text, "[!?]", "")
-- Apostrophe becomes tie (e.g. in [[barriga d'agua]]).
text = rsub(text, "'", "‿")
-- User-specified # as in i# (= i. or y) and u# (= u. or w) becomes TEMP1 so we can add # for word boundaries.
text = rsub(text, "#", TEMP1)
-- Put # at word beginning and end and double ## at text/foot boundary beginning/end.
text = rsub(text, " | ", "# | #")
text = "##" .. rsub(text, " ", "# #") .. "##"
-- Eliminate hyphens indicating prefixes/suffixes; but preserve a marker indicating prefixes, so we can later
-- convert primary to secondary stress.
text = rsub(text, "(" .. V .. charsep_c .. "*)(%-#)", "%1" .. PSEUDOCONS .. "%2")
text = rsub(text, "%-#", "#" .. PREFIX_MARKER)
text = rsub(text, "#%-(" .. V .. ")", "#" .. PSEUDOCONS .. "%1")
text = rsub(text, "#%-", "#")
local variants
-- Map over each element in `variants`. If `from` is found in the element, replace the element with two elements, one
-- obtained by replacing `from` with `to1` and the other by replacing `from` with `to2`. If `to2` is nil, only one
-- element replaces the original element.
local function flatmap_and_sub_pre(from, to1, qual1, to2, qual2)
variants = flatmap(variants, function(item)
if rfind(item.respelling, from) then
local retval = {
{
respelling = rsub(item.respelling, from, to1),
qualifiers = combine_qualifiers(item.qualifiers, qual1),
}
}
if to2 then
table.insert(retval,
{
respelling = rsub(item.respelling, from, to2),
qualifiers = combine_qualifiers(item.qualifiers, qual2),
}
)
end
return retval
else
return {item}
end
end)
end
if brazil then
-- Remove grave accents and macrons, which have special meaning only for Portugal. Do this before handling o^
-- and similar so we can write áutò^:... and have it correctly give 'autò-' in Portugal but 'áutu-,áuto-' in
-- Brazil.
text = rsub(text, "[" .. GR .. MACRON .. "]", "")
elseif portugal then
-- Convert grave accents and macrons to explicit dot-under + quality marker.
local grave_macron_to_quality = {
[GR] = AC,
[MACRON] = CFLEX,
}
text = rsub(text, "[" .. GR .. MACRON .. "]", function(acc) return grave_macron_to_quality[acc] .. DOTUNDER end)
-- ê*/ô* -> é/ó and é*/ó* -> ê/ô (reverse accents)
text = rsub(text, "([eo])([" .. AC .. CFLEX .. "])%*", function(eo, acc)
return eo .. (acc == CFLEX and AC or CFLEX) end)
-- Treat vowel after des- as word-initial, as in Brazil.
text = rsub(text, "(" .. word_or_component_sep_c .. ")des%^+", "%1des++")
-- Remove i*, i^ and i^^ not followed by a vowel (i.e. Brazilian epenthetic i), but not i^ and i^^ followed or
-- preceded by a vowel (which has a totally different meaning, i.e. i or y in Brazil).
-- Also remove all remaining ^.
text = rsub(text, "i%^+(" .. V .. ")", "i%1")
text = rsub(text, "(" .. V .. ")i%^+", "%1i")
text = rsub(text, "i?[*%^]+", "")
end
variants = {{respelling = text}}
if brazil then
-- Handle i^ and i^^ before a vowel = /i/ or /j/.
flatmap_and_sub_pre("i%^%^(" .. V .. ")", "y%1", nil, "i.%1", nil)
flatmap_and_sub_pre("i%^(" .. V .. ")", "i.%1", nil, "y%1", nil)
-- Handle i^ and i^^ after a vowel = /i/ or /j/; mostly useful for ui^
flatmap_and_sub_pre("(" .. V .. ")i%^%^", "%1y", nil, "%1.i", nil)
flatmap_and_sub_pre("(" .. V .. ")i%^", "%1.i", nil, "%1y", nil)
-- Handle i^ and i^^ not before a vowel = optional epenthetic /i/.
if style == "sbr" then
-- Epenthetic /i/ seems less common in South Brazil. Make i^^ not epenthesize (but still palatalize /t/ and /d/),
-- and i^ epenthesize but not as the first option.
flatmap_and_sub_pre("i%^%^(" .. NV_NOT_SPACING_CFLEX .. ")", "Ɨ%1", nil)
flatmap_and_sub_pre("i%^(" .. NV_NOT_SPACING_CFLEX .. ")", "Ɨ%1", nil, "I%1", nil)
else
flatmap_and_sub_pre("i%^%^(" .. NV_NOT_SPACING_CFLEX .. ")", "Ɨ%1", nil, "I%1", nil)
flatmap_and_sub_pre("i%^(" .. NV_NOT_SPACING_CFLEX .. ")", "I%1", nil, "Ɨ%1", nil)
end
-- Handle i* = epenthetic /i/.
flatmap_and_sub_pre("i%*", "I", nil)
-- Handle u^ and u^^ = /u/ or /w/.
flatmap_and_sub_pre("u%^%^", "w", nil, "u.", nil)
flatmap_and_sub_pre("u%^", "u.", nil, "w", nil)
if style == "sbr" then
-- The raised variant apparently does not occur in South Brazil.
flatmap_and_sub_pre("([eo])%^+", "%1", nil)
else
-- Handle e^ and e^^ = /e/ or /i/; handle o^ and o^^ = /o/ or /u/.
-- Do e^ and o^ together so we get only two outputs, not four, if they cooccur.
-- Likewise for e^^ and o^^.
flatmap_and_sub_pre("([eo])%^%^",
function(eo) return eo == "e" and "i" or "u" end, nil,
"%1", nil)
flatmap_and_sub_pre("([eo])%^",
"%1", nil,
function(eo) return eo == "e" and "i" or "u" end, nil)
end
-- Handle ê*/ô*/é*/ó* = same as without asterisk.
flatmap_and_sub_pre("([eo][" .. AC .. CFLEX .. "])%*", "%1", nil)
-- Handle des^ at beginning of word or component = des++ or dis++, and des^^ = opposite order. But apparently
-- not in South Brazil, where the raised variant doesn't occur.
if style == "sbr" then
flatmap_and_sub_pre("(" .. word_or_component_sep_c .. ")des%^+", "%1des++", nil)
else
flatmap_and_sub_pre("(" .. word_or_component_sep_c .. ")des%^%^", "%1dis++", nil, "%1des++", nil)
flatmap_and_sub_pre("(" .. word_or_component_sep_c .. ")des%^", "%1des++", nil, "%1dis++", nil)
end
for _, variant in ipairs(variants) do
if rfind(variant.respelling, "[*%^]") then
err(("* or ^ remains after applying all known replacements involving these characters (result is '%s')")
:format(variant.respelling))
end
end
end
-- Replace i# and u# sequences (above we replaced # with TEMP1).
flatmap_and_sub_pre("i" .. TEMP1, "i.", nil, "y", {"faster pronunciation"})
flatmap_and_sub_pre("u" .. TEMP1, "u.", nil, "w", {"faster pronunciation"})
-- Given a single variant element representing a preprocessed respelling along with any qualifiers resulting from the
-- preprocessing, generate the phonemic and phonetic representations using one_term_ipa() and postprocess to get the
-- final IPA. The postprocessing is there in general to handle cases where a single respelling produces multiple
-- outputs, such as Brazil -io producing either /i.u/ or /iw/. Note that user-specified qualifiers are not yet present
-- at any stage of this IPA generation; they are added at the end by the caller of IPA().
local function call_one_term_ipa(variant)
local result = {{
phonemic = one_term_ipa(variant.respelling, style, false, err),
phonetic = one_term_ipa(variant.respelling, style, true, err),
qualifiers = variant.qualifiers,
}}
local function unpack_if_list(obj)
if type(obj) == "table" and #obj == 2 and obj[1] then
return unpack(obj)
else
return obj, obj
end
end
-- Map over each element in `result`. If `from` is found in the element, replace the element with two elements, one
-- obtained by replacing `from` with `to1` in both the phonemic and phonetic representations of the existing element,
-- and the other similarly by replacing `from` with `to2` in both the phonemic and phonetic representations. If `to2`
-- is nil, only one element replaces the original element. `qual1`, if non-nil, is a list of qualifiers to be added to
-- the new element associated with `to1` (appended to any existing qualifiers). Similarly, `qual2` is a list of
-- qualifiers to be added to the new element associated with `to2`. Normally, `to1` and `to2` can be anything that can
-- be used as the replacement argument to the Lua gsub() function, i.e. a string, a function or a table. However, if
-- `to1` or `to2` is a two-element list, it is unpacked into two separate substitution objects, respectively for the
-- phonemic and phonetic representations of the element being substituted. This is used, for example, when handling
-- Ú resulting from stressed final '-io(s)', so different phonemic vs. phonetic replacements can be used (/w/ vs [ʊ̯]).
local function flatmap_and_sub_post(from, to1, qual1, to2, qual2)
result = flatmap(result, function(item)
if rfind(item.phonemic, from) or rfind(item.phonetic, from) then
local to1_phonemic, to1_phonetic = unpack_if_list(to1)
local retval = {
{
phonemic = rsub(item.phonemic, from, to1_phonemic),
phonetic = rsub(item.phonetic, from, to1_phonetic),
qualifiers = combine_qualifiers(item.qualifiers, qual1),
}
}
if to2 then
local to2_phonemic, to2_phonetic = unpack_if_list(to2)
table.insert(retval,
{
phonemic = rsub(item.phonemic, from, to2_phonemic),
phonetic = rsub(item.phonetic, from, to2_phonetic),
qualifiers = combine_qualifiers(item.qualifiers, qual2),
}
)
end
return retval
else
return {item}
end
end)
end
if brazil then
-- Convert Ẽ from initial [[em]] as a word by itself to either /ẽj̃/ and /ĩ/.
flatmap_and_sub_post("Ẽ" .. TILDE .. "#", "e" .. TILDE .. "j" .. TILDE .. "#", {"careful pronunciation"},
"i" .. TILDE .. "#", {"natural pronunciation"})
-- Convert Ẽ from initial em-/en- + consonant to either /ẽ/ and /ĩ/.
flatmap_and_sub_post("Ẽ", "e", {"careful pronunciation"}, "i", {"natural pronunciation"})
flatmap_and_sub_post("I", "i", nil, "e", nil)
-- Convert Ú resulting from stressed final '-io(s)'.
flatmap_and_sub_post("%.Ú", ".u", nil, {"w", "ʊ̯"}, nil)
elseif portugal then
flatmap_and_sub_post("ʃ(" .. wordsep_c .. "*)s",
"ʃ%1s", {"careful pronunciation"}, "%1ʃ", nil)
flatmap_and_sub_post("ʒ(" .. wordsep_c .. "*)z",
"ʒ%1z", {"careful pronunciation"}, "%1ʒ", nil)
flatmap_and_sub_post("Ɔ", "o", nil, "ɔ", nil)
-- Split (ɨ) after l or r into two pronuns, one with ɨ and the other without it (with one fewer syllables and coda).
--flatmap_and_sub_post("%.([^.# ]-)L#", ".%1lɨ#", nil, {"%1l#", "%1ɫ#"}, nil)
--flatmap_and_sub_post("%.([^.# ]-)R#", ".%1ɾɨ#", nil, {"%1ɾ#", "%1ɾ#"}, nil)
end
flatmap_and_sub_post("([ÌÙ])%.",
function(iu) return iu == "Ì" and "i." or "u." end, nil,
function(iu) return iu == "Ì" and "j" or "w" end, {"faster pronunciation"})
return result
end
-- Final changes to the generated IPA to produce what's shown to the user. We used to do this at the end of
-- one_term_ipa() but the stuff below needs to happen after the expansion of Ì. and Ù. in Brazil to either i./u.
-- or j/w, because the latter transformation involves removing a syllable boundary, which will cause a stress mark
-- on the following syllable to retract to the beginning of the newly combined syllable. To avoid lots of hassle,
-- we postpone this stress mark movement till now.
local function finalize_ipa(text, phonetic)
-- Convert Brazil i/u in hiatus to ɪ/ʊ in the phonetic representation. This needs to happen after handling of
-- Ì. and Ù., which feeds this change.
if brazil and phonetic then
local phonetic_hiatus_iu_to_actual = {["i"] = "ɪ", ["u"] = "ʊ"}
text = rsub(text, "([iu])(%." .. V .. ")", function(iu, after) return phonetic_hiatus_iu_to_actual[iu] .. after end)
end
-- Stress marks and syllable dividers.
-- Component separators that aren't transparent to syllabification need to be made into syllable dividers.
text = rsub(text, non_syl_transp_component_sep_c, ".")
-- IPA stress marks in components followed by + should be removed.
text = rsub(text, ipa_stress_c .. "([^" .. word_divider .. component_sep .. "]*%+)", "%1")
-- Component separators that are transparent to syllabification need to be removed now, before moving IPA stress marks
-- to the beginning of the syllable, so they don't interfere in this process.
text = rsub(text, syl_transp_component_sep_c .. "#?", "")
-- Move IPA stress marks to the beginning of the syllable.
text = rsub_repeatedly(text, "([#.])([^#.]*)(" .. ipa_stress_c .. ")", "%1%3%2")
-- Suppress syllable divider before IPA stress indicator.
text = rsub(text, "%.(#?" .. ipa_stress_c .. ")", "%1")
-- Make all primary stresses but the last one in a given word be secondary. May be fed by the first rule above.
text = rsub_repeatedly(text, "ˈ([^ ]+)ˈ", "ˌ%1ˈ")
-- Make primary stresses in prefixes become secondary.
text = rsub_repeatedly(text, "ˈ([^#]*#" .. PREFIX_MARKER .. ")", "ˌ%1")
-- Remove # symbols at word/text boundaries, as well as _ (which forces separate interpretation), pseudo-consonant
-- markers (at edges of some prefixes/suffixes), and prefix markers, and recompose.
text = rsub(text, "[#_" .. PSEUDOCONS .. PREFIX_MARKER .. "]", "")
text = mw.ustring.toNFC(text)
return text
end
variants = flatmap(variants, call_one_term_ipa)
for i, variant in ipairs(variants) do
variants[i].phonemic = finalize_ipa(variants[i].phonemic, false)
variants[i].phonetic = finalize_ipa(variants[i].phonetic, true)
end
return variants
end
-- For bot usage; {{#invoke:pt-pronunc|IPA_json|SPELLING|style=STYLE}}
-- where
--
-- 1. SPELLING is the word or respelling to generate pronunciation for;
-- 2. required parameter style= indicates the pronunciation style to generate
-- (e.g. "rio" for Rio/Carioca pronunciation, "lisbon" for Lisbon pronunciation;
-- see the comment above export.IPA() above for the full list);
-- 3. phonetic=1 specifies to generate the phonetic rather than phonemic pronunciation;
function export.IPA_json(frame)
local iparams = {
[1] = {},
["style"] = {required = true},
}
local iargs = require("Module:parameters").process(frame.args, iparams)
local pronuns = export.IPA(iargs[1], iargs.style)
return require("Module:JSON").toJSON(pronuns)
end
-- "Canonicalize" a single respelling (after splitting multiple respellings on comma and parsing off inline
-- modifiers). This currently handles '+' and substitution notation.
function export.canonicalize_respelling(text, pagename)
if not text or text == "+" then
text = pagename
end
-- No such substitutions currently.
-- text = rsub(text, "%[([hHxXjJ])%]", function(sound)
-- return explicit_sound_to_substitution[ulower(sound)]
-- end)
-- Implement substitution notation.
if rfind(text, "^%[.*%]$") then
local subs = rsplit(rmatch(text, "^%[(.*)%]$"), ";")
text = pagename
for _, sub in ipairs(subs) do
local fromto = rsplit(sub, ":")
if #fromto < 2 then
error("Bad substitution spec " .. sub .. " in {{pt-IPA}}, should have a colon in it")
end
local from, to
if #fromto == 2 then
from, to = fromto[1], fromto[2]
else
from = fromto[1]
table.remove(fromto, 1)
to = table.concat(fromto, ":")
end
local newtext = text
if rfind(from, "^%^") then
-- whole-word match
from = rmatch(from, "^%^(.*)$")
newtext = rsub(text, "%f[%a]" .. require("Module:string utilities").pattern_escape(from) .. "%f[%A]", to)
else
newtext = rsub(text, require("Module:string utilities").pattern_escape(from), to)
end
if from ~= to and newtext == text then
error("Substitution spec " .. sub .. " didn't match respelling '" .. text .. "'")
end
text = newtext
end
end
return text
end
function export.express_styles(inputs, args_style, pagename)
local pronuns_by_style = {}
local expressed_styles = {}
local function dostyle(style)
pronuns_by_style[style] = {}
for _, val in ipairs(inputs[style].terms) do
local respelling = val.term
respelling = export.canonicalize_respelling(respelling, pagename)
local refs
if #val.ref == 0 then
refs = nil
else
refs = {}
for _, refspec in ipairs(val.ref) do
local this_refs = require("Module:references").parse_references(refspec)
for _, this_ref in ipairs(this_refs) do
table.insert(refs, this_ref)
end
end
end
local pronuns = export.IPA(respelling, style)
for _, pronun in ipairs(pronuns) do
local qualifiers = m_table.deepCopy(val.q)
if pronun.qualifiers then
for _, qual in ipairs(pronun.qualifiers) do
m_table.insertIfNot(qualifiers, qual)
end
end
pronun.qualifiers = #qualifiers > 0 and qualifiers or nil
pronun.refs = refs
m_table.insertIfNot(pronuns_by_style[style], pronun)
end
end
end
local function all_available(styles)
local available_styles = {}
for _, style in ipairs(styles) do
if pronuns_by_style[style] then
table.insert(available_styles, style)
end
end
return available_styles
end
local function express_style(styles, indent)
local hidden_tag, tag
indent = indent or 1
if type(styles) == "string" then
styles = {styles}
tag = export.all_style_descs[styles[1]]
hidden_tag = export.all_style_descs[style_to_style_group[styles[1]]]
else
tag = false
hidden_tag = false
end
styles = all_available(styles)
if #styles == 0 then
return
end
local style = styles[1]
-- If style specified, make sure it matches the requested style.
local style_matches
if not args_style then
style_matches = true
else
local or_styles = rsplit(args_style, "%s*,%s*")
for _, or_style in ipairs(or_styles) do
local and_styles = rsplit(or_style, "%s*%+%s*")
local and_matches = true
for _, and_style in ipairs(and_styles) do
local negate
if and_style:find("^%-") then
and_style = and_style:gsub("^%-", "")
negate = true
end
local this_style_matches = false
for _, part in ipairs(styles) do
if part == and_style then
this_style_matches = true
break
end
end
if negate then
this_style_matches = not this_style_matches
end
if not this_style_matches then
and_matches = false
end
end
if and_matches then
style_matches = true
break
end
end
end
if not style_matches then
return
end
local new_style = {
tag = tag,
represented_styles = styles,
pronuns = pronuns_by_style[style],
indent = indent,
bullets = inputs[style].bullets,
pre = inputs[style].pre,
post = inputs[style].post,
}
for _, hidden_tag_style in ipairs(expressed_styles) do
if hidden_tag_style.tag == hidden_tag then
table.insert(hidden_tag_style.styles, new_style)
return
end
end
table.insert(expressed_styles, {
tag = hidden_tag,
styles = {new_style},
})
end
for style, _ in pairs(inputs) do
dostyle(style)
end
local function diff(style1, style2)
if not pronuns_by_style[style1] or not pronuns_by_style[style2] then
return true
end
return not m_table.deepEquals(pronuns_by_style[style1], pronuns_by_style[style2])
end
local gbr_sp_different = diff("gbr", "sp")
local gbr_rio_different = diff("gbr", "rio")
local gbr_cpr_different = diff("gbr", "cpr")
local gbr_sbr_different = diff("gbr", "sbr")
local gpt_cpt_different = diff("gpt", "cpt")
local gpt_spt_different = diff("gpt", "spt")
local gpt_npt_different = diff("gpt", "npt")
local gbr_gpt_different = diff("gbr", "gpt") -- general differences between BP and EP
if not gbr_sp_different and not gbr_rio_different and gbr_cpr_different and
not gbr_sbr_different and not gpt_cpt_different and
not gpt_spt_different and not gpt_npt_different and
not gbr_gpt_different then
-- All the same
express_style(export.all_styles)
else
-- Within Brazil
express_style("gbr")
if gbr_sp_different then
express_style("sp", 2)
end
if gbr_rio_different then
express_style("rio", 2)
end
if gbr_cpr_different then
express_style("cpr", 2)
end
if gbr_sbr_different then
express_style("sbr", 2)
end
-- Within Portugal
express_style("gpt")
if gpt_npt_different then
express_style("npt", 2)
end
if gpt_cpt_different then
express_style("cpt", 2)
end
if gpt_spt_different then
express_style("spt", 2)
end
end
return expressed_styles
end
function export.show(frame)
-- Create parameter specs
local params = {
[1] = {}, -- this replaces style group 'all'
["style"] = {},
["pagename"] = {},
}
for group, _ in pairs(export.all_style_groups) do
if group ~= "all" then
params[group] = {}
end
end
for _, style in ipairs(export.all_styles) do
params[style] = {}
end
-- Parse arguments
local parargs = frame:getParent().args
local args = require("Module:parameters").process(parargs, params)
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
-- Set inputs
local inputs = {}
-- If 1= specified, do all styles.
if args[1] then
for _, style in ipairs(export.all_styles) do
inputs[style] = args[1]
end
end
-- Then do remaining style groups other than 'all', overriding 1= if given.
for group, styles in pairs(export.all_style_groups) do
if group ~= "all" and args[group] then
for _, style in ipairs(styles) do
inputs[style] = args[group]
end
end
end
-- Then do individual style settings.
for _, style in ipairs(export.all_styles) do
if args[style] then
inputs[style] = args[style]
end
end
-- If no inputs given, set all styles based on current pagename.
if not next(inputs) then
for _, style in ipairs(export.all_styles) do
inputs[style] = "+"
end
end
-- Parse the arguments.
local put
for style, input in pairs(inputs) do
if input:find("[<%[]") then
local function parse_err(msg)
error(msg .. ": " .. style .. "=" .. input)
end
if not put then
put = require("Module:parse utilities")
end
-- We don't want to split off a comma followed by a space, as in [[rei morto, rei posto]], so replace
-- comma+space with a special character that we later undo.
input = rsub(input, ", ", TEMP1)
-- Parse balanced segment runs involving either [...] (substitution notation) or <...> (inline modifiers). We do this
-- because we don't want commas 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. For example,
-- if we are given "a[x]a<q:learned>,[vol:vôl;ei:éi,ei]<q:nonstandard>", after calling
-- parse_multi_delimiter_balanced_segment_run() we get the following output:
--
-- {"a", "[x]", "a", "<q:learned>", ",", "[vol:vôl;ei:éi,ei]", "", "<q:nonstandard>", ""}
--
-- After calling split_alternating_runs(), we get the following:
--
-- {{"a", "[x]", "a", "<q:learned>", ""}, {"", "[vol:vôl;ei:éi,ei]", "", "<q:nonstandard>", ""}}
--
-- We need to rejoin stuff on either side of the square-bracketed portions.
local segments = put.parse_multi_delimiter_balanced_segment_run(input, {{"<", ">"}, {"[", "]"}})
-- Not with spaces around the comma; see above for why we don't want to split off comma followed by space.
local comma_separated_groups = put.split_alternating_runs(segments, ",")
local parsed = {terms = {}}
for i, group in ipairs(comma_separated_groups) do
-- Rejoin bracketed segments with nearby ones, as described above.
local j = 2
while j <= #group do
if group[j]:find("^%[") then
group[j - 1] = group[j - 1] .. group[j] .. group[j + 1]
table.remove(group, j)
table.remove(group, j)
else
j = j + 2
end
end
for j, segment in ipairs(group) do
group[j] = rsub(segment, TEMP1, ", ")
end
local term = {term = group[1], ref = {}, q = {}}
for j = 2, #group - 1, 2 do
if group[j + 1] ~= "" then
parse_err("Extraneous text '" .. group[j + 1] .. "' after modifier")
end
local modtext = group[j]:match("^<(.*)>$")
if not modtext then
parse_err("Internal error: Modifier '" .. group[j] .. "' isn't surrounded by angle brackets")
end
local prefix, arg = modtext:match("^([a-z]+):(.*)$")
if not prefix then
parse_err("Modifier " .. group[j] .. " lacks a prefix, should begin with one of " ..
"'pre:', 'post:', 'ref:', 'bullets:' or 'q:'")
end
if prefix == "ref" or prefix == "q" then
table.insert(term[prefix], arg)
elseif prefix == "pre" or prefix == "post" or prefix == "bullets" then
if i < #comma_separated_groups then
parse_err("Modifier '" .. prefix .. "' should occur after the last comma-separated term")
end
if parsed[prefix] then
parse_err("Modifier '" .. prefix .. "' occurs twice, second occurrence " .. group[j])
end
if prefix == "bullets" then
if not arg:find("^[0-9]+$") then
parse_err("Modifier 'bullets' should have a number as argument")
end
parsed.bullets = tonumber(arg)
else
parsed[prefix] = arg
end
else
parse_err("Unrecognized prefix '" .. prefix .. "' in modifier " .. group[j]
.. ", should be one of 'pre', 'post', 'ref', 'bullets' or 'q'")
end
end
table.insert(parsed.terms, term)
end
if not parsed.bullets then
parsed.bullets = 1
end
inputs[style] = parsed
else
local terms = {}
-- We don't want to split on comma+space, which should become a foot boundary as in
-- [[rei morto, rei posto]].
local subbed_input = rsub(input, ", ", TEMP1)
for _, term in ipairs(rsplit(subbed_input, ",")) do
term = rsub(term, TEMP1, ", ")
table.insert(terms, {term = term, ref = {}, q = {}})
end
inputs[style] = {
terms = terms,
bullets = 1,
}
end
end
local expressed_styles = export.express_styles(inputs, args.style, pagename)
local lines = {}
local function format_style(tag, expressed_style, is_first)
local pronunciations = {}
local formatted_pronuns = {}
-- Loop through each pronunciation. For each one, add the phonemic and (if different) phonetic versions to
-- `pronunciations`, for formatting by [[Module:IPA]], and also create an approximation of the formatted
-- version so that we can compute the appropriate width of the HTML switcher div box that holds the different
-- per-dialect variants.
for i, pronun in ipairs(expressed_style.pronuns) do
table.insert(pronunciations, {
pron = "/" .. pronun.phonemic .. "/",
qualifiers = pronun.qualifiers,
separator = i > 1 and ", " or nil,
})
local formatted_phonemic = "/" .. pronun.phonemic .. "/"
if pronun.qualifiers then
formatted_phonemic = "(" .. table.concat(pronun.qualifiers, ", ") .. ") " .. formatted_phonemic
end
if i > 1 then
formatted_phonemic = ", " .. formatted_phonemic
end
table.insert(formatted_pronuns, formatted_phonemic)
-- Check if phonetic and phonemic are the same. If so, we skip displaying the phonetic version; but in this
-- case, we need to attach any references to the phonemic version.
if pronun.phonetic == pronun.phonemic then
pronunciations[#pronunciations].refs = pronun.refs
else
table.insert(pronunciations, {
pron = "[" .. pronun.phonetic .. "]",
refs = pronun.refs,
separator = " ",
})
local reftext = ""
if pronun.refs then
reftext = string.rep("[1]", #pronun.refs)
end
table.insert(formatted_pronuns, " [" .. pronun.phonetic .. "]" .. reftext)
end
end
-- Number of bullets: When indent = 1, we want the number of bullets given by `expressed_style.bullets`,
-- and when indent = 2, we want `expressed_style.bullets + 1`, hence we subtract 1.
local bullet = string.rep("*", expressed_style.bullets + expressed_style.indent - 1) .. " "
-- Here we construct the formatted line in `formatted`, and also try to construct the equivalent without HTML
-- and wiki markup in `formatted_for_len`, so we can compute the approximate textual length for use in sizing
-- the toggle box with the "more" button on the right.
local pre = is_first and expressed_style.pre and expressed_style.pre .. " " or ""
local pre_for_len = pre .. (tag and "(" .. tag .. ") " or "")
pre = pre .. (tag and m_qual.format_qualifier(tag) .. " " or "")
local post = is_first and (expressed_style.post and " " .. expressed_style.post or "") or ""
local formatted = bullet .. pre .. m_IPA.format_IPA_full { lang = lang, items = pronunciations, separator = "" } .. post
local formatted_for_len = bullet .. pre .. "IPA(key): " .. table.concat(formatted_pronuns) .. post
return formatted, formatted_for_len
end
for i, style_group in ipairs(expressed_styles) do
if #style_group.styles == 1 then
style_group.formatted, style_group.formatted_for_len =
format_style(style_group.styles[1].tag, style_group.styles[1], i == 1)
else
style_group.formatted, style_group.formatted_for_len =
format_style(style_group.tag, style_group.styles[1], i == 1)
for j, style in ipairs(style_group.styles) do
style.formatted, style.formatted_for_len =
format_style(style.tag, style, i == 1 and j == 1)
end
end
end
-- Remove any HTML from the formatted text, since it doesn't contribute to the textual length, and return the
-- resulting length in characters.
local function textual_len(text)
text = rsub(text, "<.->", "")
return ulen(text)
end
local maxlen = 0
for i, style_group in ipairs(expressed_styles) do
local this_len = textual_len(style_group.formatted_for_len)
if #style_group.styles > 1 then
for _, style in ipairs(style_group.styles) do
this_len = math.max(this_len, textual_len(style.formatted_for_len))
end
end
maxlen = math.max(maxlen, this_len)
end
for i, style_group in ipairs(expressed_styles) do
if #style_group.styles == 1 then
table.insert(lines, "<div>\n" .. style_group.formatted .. "</div>")
else
local inline = '\n<div class="vsShow" style="display:none">\n' .. style_group.formatted .. "</div>"
local full_prons = {}
for _, style in ipairs(style_group.styles) do
table.insert(full_prons, style.formatted)
end
local full = '\n<div class="vsHide">\n' .. table.concat(full_prons, "\n") .. "</div>"
local em_length = math.floor(maxlen * 0.68) -- from [[Module:grc-pronunciation]]
table.insert(lines, '<div class="vsSwitcher" data-toggle-category="pronunciations" style="width: ' .. em_length .. 'em; max-width:100%;"><span class="vsToggleElement" style="float: right;"> </span>' .. inline .. full .. "</div>")
end
end
-- major hack to get bullets working on the next line
return table.concat(lines, "\n") .. "\n<span></span>"
end
return export
thegmkrexm616w4yn9wthrdbvtyfpz4
ထာမ်ပလိက်:vi-adj
10
25964
385811
36547
2026-04-07T08:03:33Z
咽頭べさ
33
385811
wikitext
text/x-wiki
{{head|vi|နာမဝိသေသန<!--
-->|head={{{head|}}}<!--
-->|tr={{#if:{{{1|}}}|{{l|vi|{{{1}}}}}{{#if:{{{2|}}}| {{{2}}}}}}}<!--
-->|{{#switch:{{{rdp|}}}|aug=ပရေၚ်မထပ်ကၠောန်ဗီုပြၚ်ချူဗပေၚ်စုတ်|{{#if:{{{rdp|}}}{{{avar|}}}|{{#switch:<!--
-->{{{type|{{#ifeq:{{{rdp|}}}|y|{{#invoke:vi-adj|rdp_type|{{#invoke:vi-adj|rdp_one}}}}}}{{#if:{{{rdp|}}}||{{#if:{{{avar|}}}|aug}}}}}}}<!--
-->|dim=ပရေၚ်မထပ်ကၠောန်ဗီုပြၚ်မလဟုတ်စှ်ေ|aug=ပရေၚ်မထပ်ကၠောန်''‑a'' |ပရေၚ်မထပ်ကၠောန်<includeonly>[[ကဏ္ဍ:အခေါၚ်လုပ်ဗဳယေတ်နာမ်မနွံကဵုပရေၚ်မထပ်ကၠောန်နကဵုဇကုဇကုဂမၠိုၚ်]]</includeonly>}}|}}}}<!--
-->|{{#switch:{{{rdp|}}}|y|aug={{#switch:{{{type|{{#switch:{{{rdp|}}}|y|aug={{#invoke:vi-adj|rdp_type|{{#invoke:vi-adj|rdp_one}}}}}}}}}|dim={{#invoke:vi-adj|rdp_one}}|aug={{#invoke:vi-adj|rdp_two}}}}|{{{rdp|}}}}}<!--
-->|{{#if:{{{rdp|}}}|{{#if:{{{avar|}}}|or}}}}<!--
-->|{{#ifeq:{{{avar|}}}|y|{{#invoke:vi-adj|rdp_two_var}}|{{{avar|}}}}}<!--
-->|{{#if:{{{AABB|}}}|ပရေၚ်မထပ်ကၠောန် AABB}}<!--
-->|{{#ifeq:{{{AABB|}}}|y|{{#invoke:vi-adj|rdp_AABB}}|{{{AABB|}}}<includeonly>[[ကဏ္ဍ:အခေါၚ်လုပ်ဗဳယေတ်နာမ်မနွံကဵုပရေၚ်မထပ်ကၠောန်နကဵုဇကုဇကုဂမၠိုၚ်]]</includeonly>}}<!--
-->}}<!--
-->{{#ifeq:{{{sc|}}}<!--
-->|<!--
-->ဟာန်<!--
-->|<!--
-->[[ကဏ္ဍ:နာမဝိသေသနဗဳယေတ်နာမ်ပ္ဍဲအက္ခရ်ဟာန်ဂမၠိုၚ်]]<!--
-->}}<!--
--><noinclude>{{documentation}}</noinclude>
mshrkja4icmy5ojwuvay154koerfaqx
ထာမ်ပလိက်:tyz-IPA
10
33651
385853
159050
2026-04-07T10:00:24Z
咽頭べさ
33
385853
wikitext
text/x-wiki
<includeonly>{{#invoke:tyz-pron|ipa}}[[ကဏ္ဍ:ဝေါဟာထာၚ်ပ္တိတ်ရမျာၚ် IPA ဂမၠိုၚ်]]</includeonly><noinclude>{{documentation}}</noinclude>
kb8o8wo2dytk16yw5bwtfqdnqasi6rc
ကဏ္ဍ:ဝေါဟာဗဳယေတ်နာမ်လွဳလဝ် နူဝေါဟာကြုက်ဂမၠိုၚ်
14
47611
385810
172708
2026-04-07T07:43:40Z
咽頭べさ
33
咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[ကဏ္ဍ:ဝေါဟာဗဳယေတ်နာမ်လွဳလဝ် နူဝေါဟာ ကြုက်ဂမၠိုၚ်]] ဇရေင် [[ကဏ္ဍ:ဝေါဟာဗဳယေတ်နာမ်လွဳလဝ် နူဝေါဟာကြုက်ဂမၠိုၚ်]] သီုကဵု ဟွံဂွံ ဂိုင်စွံလဝ် မကလေင်ပညုင်
62654
wikitext
text/x-wiki
[[ကဏ္ဍ:ဘာသာဗဳယေတ်နာမ်]]
htonmb6eo8mzrq9845v5i73jf8oc8u6
ကဏ္ဍ:ထာမ်ပလိက်လာၚ်က္ဍိုပ်မအရေဝ်ဗဳယေတ်နာမ်ဂမၠိုၚ်
14
52575
385812
165855
2026-04-07T08:04:11Z
咽頭べさ
33
咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[ကဏ္ဍ:ထာမ်ပလိက်ဗဳယေတ်နာမ်လေန်မနွံကဵုပၟိက်ဂမၠိုၚ်]] ဇရေင် [[ကဏ္ဍ:ထာမ်ပလိက်လာၚ်က္ဍိုပ်မအရေဝ်ဗဳယေတ်နာမ်ဂမၠိုၚ်]] သီုကဵု ဟွံဂွံ ဂိုင်စွံလဝ် မကလေင်ပညုင်
162909
wikitext
text/x-wiki
[[ကဏ္ဍ:ထာမ်ပလိက်ဗဳယေတ်နာမ်ဂမၠိုၚ်]]
185jlxky2mf5ov2dguncay9oen6k764
မဝ်ဂျူ:module categorization
828
58227
385815
384991
2026-04-07T08:14:29Z
咽頭べさ
33
385815
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type, module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
icczzqwu0ybizgz1xmfifw86unz7pr3
385816
385815
2026-04-07T08:15:54Z
咽頭べさ
33
ကလေင်ပလီု မူတၟိ[[Special:Diff/385815|385815]]နကု[[Special:Contributions/咽頭べさ|咽頭べさ]] ([[User talk:咽頭べさ|ဓရီုကျာ]])
385816
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
ohv2l4nit5h7tfsqnj1if9jo0a79m7w
385817
385816
2026-04-07T08:16:55Z
咽頭べさ
33
385817
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
0ccpmgzwsqfoijuy1ryddfzpjy1ot3r
385818
385817
2026-04-07T08:18:02Z
咽頭べさ
33
ကလေင်ပလီု မူတၟိ[[Special:Diff/385817|385817]]နကု[[Special:Contributions/咽頭べさ|咽頭べさ]] ([[User talk:咽頭べさ|ဓရီုကျာ]])
385818
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
ohv2l4nit5h7tfsqnj1if9jo0a79m7w
385819
385818
2026-04-07T08:19:05Z
咽頭べさ
33
385819
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName())
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
p63sn27u7fg7het3ut0ncax99dlvo5i
385820
385819
2026-04-07T08:20:30Z
咽頭べさ
33
ကလေင်ပလီု မူတၟိ[[Special:Diff/385819|385819]]နကု[[Special:Contributions/咽頭べさ|咽頭べさ]] ([[User talk:咽頭べさ|ဓရီုကျာ]])
385820
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
ohv2l4nit5h7tfsqnj1if9jo0a79m7w
385821
385820
2026-04-07T08:23:21Z
咽頭べさ
33
385821
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" or "doc" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
tkmy1vumigwrdj5bag1pzmv10e4zhci
385822
385821
2026-04-07T08:24:50Z
咽頭べさ
33
385822
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" or "doc" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type)))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
qdjehvc9t4difr3yyf4i3e0jag7nnac
385823
385822
2026-04-07T08:25:43Z
咽頭べさ
33
ကလေင်ပလီု မူတၟိ[[Special:Diff/385822|385822]]နကု[[Special:Contributions/咽頭べさ|咽頭べさ]] ([[User talk:咽頭べさ|ဓရီုကျာ]])
385823
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" or "doc" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
tkmy1vumigwrdj5bag1pzmv10e4zhci
385824
385823
2026-04-07T08:27:12Z
咽頭べさ
33
385824
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
ohv2l4nit5h7tfsqnj1if9jo0a79m7w
385825
385824
2026-04-07T08:28:13Z
咽頭べさ
33
385825
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
" "))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
svn90i9syut4gpnyh050nnfmfachcuo
385826
385825
2026-04-07T08:29:34Z
咽頭べさ
33
ကလေင်ပလီု မူတၟိ[[Special:Diff/385825|385825]]နကု[[Special:Contributions/咽頭べさ|咽頭べさ]] ([[User talk:咽頭べさ|ဓရီုကျာ]])
385826
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
ohv2l4nit5h7tfsqnj1if9jo0a79m7w
385827
385826
2026-04-07T08:34:45Z
咽頭べさ
33
385827
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName())
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat(construct_lang_or_sc_cat("မဝ်ဂျူ" .. obj, mw.getContentLanguage():lcfirst(module_type.type)))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
cb9pn1logaxqaqjxhe99pgrmcciqh5s
385828
385827
2026-04-07T08:35:44Z
咽頭べさ
33
ကလေင်ပလီု မူတၟိ[[Special:Diff/385827|385827]]နကု[[Special:Contributions/咽頭べさ|咽頭べさ]] ([[User talk:咽頭べさ|ဓရီုကျာ]])
385828
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("Module:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getCategoryName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName() .. "ဂမၠိုၚ်")
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type) ..
"ဂမၠိုၚ်"))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
ohv2l4nit5h7tfsqnj1if9jo0a79m7w
385829
385828
2026-04-07T08:47:19Z
咽頭べさ
33
385829
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("မဝ်ဂျူ:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getFullName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName())
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type)))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "ဂမၠိုၚ်]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
9x5w9fw2nlttdamlhi7tli3iy826lbo
385830
385829
2026-04-07T08:49:11Z
咽頭べさ
33
385830
Scribunto
text/plain
local export = {}
local put_module = "Module:parse utilities"
local rsplit = mw.text.split
local rfind = mw.ustring.find
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local keyword_to_module_type = {
common = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
utilities = "အရေဝ်ဘာသာလုပ်ကေၚ်ကာမချိုတ်ပၠိုတ်",
headword = "လာၚ်က္ဍိုပ်မအရေဝ်",
translit = "ပွမကၠာဲမအခဝ်",
infl = "ပွမပြံၚ်လှာဲ",
inflection = "ပွမပြံၚ်လှာဲ",
decl = "ပွမပြံၚ်လှာဲ",
declension = "ပွမပြံၚ်လှာဲ",
adecl = "ပွမပြံၚ်လှာဲ",
conj = "ပွမပြံၚ်လှာဲ",
conjugation = "ပွမပြံၚ်လှာဲ",
noun = "ပွမပြံၚ်လှာဲ",
nouns = "ပွမပြံၚ်လှာဲ",
pronoun = "ပွမပြံၚ်လှာဲ",
pronouns = "ပွမပြံၚ်လှာဲ",
verb = "ပွမပြံၚ်လှာဲ",
verbs = "ပွမပြံၚ်လှာဲ",
adjective = "ပွမပြံၚ်လှာဲ",
adjectives = "ပွမပြံၚ်လှာဲ",
adj = "ပွမပြံၚ်လှာဲ",
nominal = "ပွမပြံၚ်လှာဲ",
nominals = "ပွမပြံၚ်လှာဲ",
pron = "ပတိတ်ရမျာၚ်",
pronun = "ပတိတ်ရမျာၚ်",
pronunc = "ပတိတ်ရမျာၚ်",
pronunciation = "ပတိတ်ရမျာၚ်",
IPA = "ပတိတ်ရမျာၚ်",
stripdiacritics = "ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်",
sortkey = "ပွမကၠောန်ပ္တိတ်ဂကူကဳ",
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]].
local module_type_generates_lang_specific_cat = {
["ပွမပြံၚ်လှာဲ"] = true,
["ဒေတာ"] = true,
["မစမ်ၜတ်"] = true,
}
-- If a module type is here, we will generate a lang-specific module-type category such as
-- [[:Category:Pali inflection modules]]. The value is a module that returns a function that fetches all the
-- languages that use a given module for transliteration/diacritic-stripping/sortkey generation.
local languages_from_module_name = {
["ပွမကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["မစမ်ၜတ်ပရေၚ်ကၠာဲမအခဝ်"] = "Module:languages/byTranslitModule",
["ပွမကၠောန်ပ္တိတ်ယၟုပၞော်လုပ်"] = "Module:languages/byStripDiacriticsModule",
["ပွမကၠောန်ပ္တိတ်ဂကူကဳ"] = "Module:languages/bySortkeyModule",
}
local module_type_patterns = {
{"/data%f[-/%z]", "ဒေတာ"},
{"/testcases%f[-/%z]", function(typ)
if typ == "ပတိတ်ရမျာၚ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
elseif typ == "ပွမကၠာဲမအခဝ်" then
return "မစမ်ၜတ်ပရေၚ်ပ္တိတ်ရမျာၚ်"
else
return "မစမ်ၜတ်"
end
end},
}
-- Split an argument on comma, but not comma followed by whitespace.
local function split_on_comma(val)
if val:find(",%s") then
return require(put_module).split_on_comma(val)
else
return rsplit(val, ",")
end
end
local function get_lang_or_script(code)
return code == "-" and code or
require("Module:languages").getByCode(code, nil, "allow etym") or
require("Module:languages").getByCode(code .. "-pro", nil, "allow etym") or
require("Module:scripts").getByCode(code)
end
local function obj_code(obj)
if obj == "-" then
return obj
end
return obj:getCode()
end
local function infer_lang_or_script_code(name)
local hyphen_parts = rsplit(name, "%-")
for i = #hyphen_parts - 1, 1, -1 do
local code = table.concat(hyphen_parts, "-", 1, i)
local obj = get_lang_or_script(code)
if obj then
local rest = table.concat(hyphen_parts, "-", i + 1)
return obj, rest
end
end
return nil, nil
end
local function infer_lang_and_script_codes(name)
local objs = {}
while true do
local obj, rest = infer_lang_or_script_code(name)
if not obj then
return objs, name
end
if #objs > 0 and obj:getCode() == "to" then
-- skip 'to' in e.g. [[Module:ks-Arab-to-Deva-translit]]; it's not Tongan
else
table.insert(objs, obj)
end
name = rest
end
end
--[==[
Main entry point. Can be called from Lua or another module.
`return_raw` set to true makes function return a table of categories with {"[[Category:"} and {"]]"}
stripped away. It is used by [[Module:documentation]].
]==]
function export.categorize(frame, return_raw, noerror)
local categories = {}
local function insert_cat(cat, sortkey)
for _, existing_cat in ipairs(categories) do
if existing_cat.name == cat then
return
end
end
table.insert(categories, {name = cat, sort = sortkey})
end
local pagename
if frame.args[1] then
pagename = frame.args[1]
end
local args
if frame.args.is_template then
local params = {
[1] = {}, -- comma-separated list of languages; by default, inferred from module name
["type"] = {},
[2] = {alias_of = "type"},
["pagename"] = {}, -- for testing
["return_cats"] = {type = "boolean"}, -- for testing
}
local parent_args = frame:getParent().args
args = require("Module:parameters").process(parent_args, params)
else
args = {}
end
pagename = pagename or args.pagename
local title
if pagename then
title = mw.title.new(pagename, 'မဝ်ဂျူ')
else
title = mw.title.getCurrentTitle()
-- Fuckme, sometimes this function is called with a faked frame and a title with the namespace already chopped out,
-- so this test cannot be done in that case.
if title.nsText ~= "မဝ်ဂျူ" then
error(("This template should only be used in the Module namespace, not on page '%s'."):format(title.fullText))
end
pagename = title.fullText
end
local subpage = title.subpageText
local null_return_value = return_raw and {} or ""
-- To ensure no categories are added on documentation pages.
if subpage == "documentation" then
return null_return_value
end
local root_pagename
if subpage ~= pagename then
root_pagename = title.rootText
else
root_pagename = pagename
end
root_pagename = root_pagename:gsub("^မဝ်ဂျူ:", "")
-- Take the module type(s) from type= if given, or infer from the pagename.
local module_types
if args.type then
module_types = {}
local module_type_specs = split_on_comma(args.type)
for _, spec in ipairs(module_type_specs) do
local modtype, sortkey = spec:match("^(.-):(.*)$")
modtype = modtype or spec
sortkey = sortkey and sortkey:gsub("_", " ") or nil
table.insert(module_types, {type = modtype, sort = sortkey})
end
else
local module_type_keyword = root_pagename:match("[-%a]+[- ]([^/]+)%f[/%z]")
if not module_type_keyword then
if noerror then
return null_return_value
else
error(("Could not extract module type from root pagename '%s'"):format(root_pagename))
end
end
local module_type = keyword_to_module_type[module_type_keyword]
if not module_type then
if noerror then
return null_return_value
else
error(("Did not recognize inferred module-type keyword '%s' from root pagename '%s'"):format(
module_type_keyword, root_pagename))
end
end
module_types = {{type = module_type}}
end
-- Look for additional module type(s) inferred by pattern.
for _, pattern_spec in ipairs(module_type_patterns) do
local pattern, inferred_type = unpack(pattern_spec)
if rfind(pagename, pattern) then
local function insert_module_type(typ)
require("Module:table").insertIfNot(module_types, typ, {key = function(obj) return obj.type end})
end
if type(inferred_type) == "string" then
insert_module_type({type = inferred_type})
else
local addl_types = {}
for _, typ in ipairs(module_types) do
table.insert(addl_types, {type = inferred_type(typ.type), sort = typ.sort})
end
for _, typ in ipairs(addl_types) do
insert_module_type(typ)
end
end
end
end
-- If 1= specified, take the languages/scripts directly from there. Otherwise, (a) try to extract one or more
-- languages/scripts from the pagename (e.g. [[Module:uk-be-headword]] -> Ukrainian and Belarusian (languages);
-- [[Module:bho-Kthi-translit]] -> Bhojpuri (language) and Kaithi (script); [[Module:Deva-Kthi-translit]] ->
-- Devanagari and Kaithi (scripts)); and (b) if the specified or inferred module type(s) contain a type listed in
-- languages_from_module_name[], use the function referenced there to extract additional languages (i.e. all the
-- languages that use the module we are processing).
local inferred_objs
if args[1] then
inferred_objs = {}
for _, code in ipairs(rsplit(args[1], ",")) do
-- We need to have an indicator of families because we allow bare family codes to stand for proto-languages.
if code:find("^fam:") then
code = code:gsub("^fam:", "")
local family = require("မဝ်ဂျူ:families").getByCode(code) or
error(("Unrecognized family code '%s' in [[Module:module categorization]]"):format(code))
local descendants = family:getDescendantCodes()
for _, desc in ipairs(descendants) do
local obj = get_lang_or_script(desc)
if obj then
-- make sure we skip families without proto-languages
table.insert(inferred_objs, obj)
end
end
else
local obj = get_lang_or_script(code)
if not obj then
error(("Unrecognized language or script code '%s'"):format(code))
end
table.insert(inferred_objs, obj)
end
end
else
inferred_objs = infer_lang_and_script_codes(root_pagename)
for _, module_type in ipairs(module_types) do
local languages_extractor = languages_from_module_name[module_type.type]
if languages_extractor then
local langs = require(languages_extractor)(root_pagename)
if langs then
for _, obj in ipairs(langs) do
require("Module:table").insertIfNot(inferred_objs, obj, {key = obj_code})
end
end
end
end
if #inferred_objs == 0 then
if noerror then
return null_return_value
else
error(("Could not infer any languages or scripts from root pagename '%s'"):format(root_pagename))
end
end
end
if pagename:find("^မဝ်ဂျူ:User:") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳညးလွပ်ဂမၠိုၚ်")
elseif pagename:find("/sandbox") then
insert_cat("မဝ်ဂျူကဠာဗ္တဳဂမၠိုၚ်")
else
for _, module_type in ipairs(module_types) do
for _, obj in ipairs(inferred_objs) do
local function insert_overall_module_type_cat(sortkey)
if module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဂမၠိုၚ်", module_type.sort or sortkey)
end
end
if obj == "-" then
insert_overall_module_type_cat()
else
if obj:hasType("script") and module_type.type ~= "-" then
insert_cat("မဝ်ဂျူ" .. module_type.type .. "ဗက်အလိုက်အက္ခရ်", obj:getCanonicalName() .. "ဂမၠိုၚ်")
end
local function construct_lang_or_sc_cat(obj, suffix)
local prefix
if obj:hasType("language") then
prefix = obj:getFullName()
else
prefix = obj:getCategoryName()
end
return suffix .. prefix .. "ဂမၠိုၚ်"
end
insert_cat(construct_lang_or_sc_cat(obj, "မဝ်ဂျူ"), module_type.type)
insert_overall_module_type_cat(obj:getCanonicalName())
if module_type_generates_lang_specific_cat[module_type.type] then
insert_cat("မဝ်ဂျူ" .. construct_lang_or_sc_cat(obj, mw.getContentLanguage():lcfirst(module_type.type)))
end
end
end
end
end
for i, catspec in ipairs(categories) do
if catspec.sort then
categories[i] = ("%s|%s"):format(catspec.name, catspec.sort)
else
categories[i] = catspec.name
end
end
if args.return_cats then
return table.concat(categories, ",")
elseif return_raw then
return categories
else
for i, cat in ipairs(categories) do
categories[i] = "[[ကဏ္ဍ:" .. cat .. "]]"
end
return table.concat(categories)
end
end
--[==[Table used in the documentation to {{tl|module cat}}.]==]
function export.keyword_to_module_type_table()
local parts = {}
local function ins(text)
table.insert(parts, text)
end
ins('{|class="wikitable"')
ins("! Keyword !! Inferred module type")
local keywords = {}
for k, v in pairs(keyword_to_module_type) do
table.insert(keywords, k)
end
table.sort(keywords)
for _, keyword in ipairs(keywords) do
ins("|-")
ins(("| <code>%s</code> || <code>%s</code>"):format(keyword, keyword_to_module_type[keyword]))
end
ins("|}")
return table.concat(parts, "\n")
end
return export
mjv7h84lmhprscuh5mpf3yyyufprnvx
မဝ်ဂျူ:documentation/sortkey
828
110864
385835
155636
2026-04-07T09:08:44Z
咽頭べさ
33
385835
Scribunto
text/plain
local export = {}
local function fake_frame(args, parent_args)
return {
args = args,
getParent = function()
return {
args = parent_args,
}
end
}
end
function get_by_code(code)
return require "မဝ်ဂျူ:languages".getByCode(code, nil, false, true) or require "မဝ်ဂျူ:scripts".getByCode(code)
end
local function get_code_from_title_without_namespace(title_without_namespace)
local prefix = title_without_namespace:match("^(.+)%-sortkey%f[/%z]")
if not prefix then
error("Base segment of title should end in -sortkey: " .. title_without_namespace)
end
local code = prefix
local lang_or_family_or_script = get_by_code(code)
return code, lang_or_family_or_script
end
function export.documentation(title_without_namespace, explanation)
local code, lang_or_family_or_script = get_code_from_title_without_namespace(title_without_namespace)
return export.documentation_from_code(code, explanation, title_without_namespace)
end
function export.documentation_from_code(code, explanation, title_without_namespace)
local lang_or_family_or_script = get_by_code(code)
if not lang_or_family_or_script then
return "ကုဒ်အရေဝ်ဘာသာပ္ဍဲယၟုမုက်လိက် (<code>" .. code .. "</code>)ဟွံဂွံဒုၚ်လဝ်တဲပရေၚ်စိုပ်တရဴဏီ။"
end
local category_name = lang_or_family_or_script:getCategoryName()
local sortkey_input
if lang_or_family_or_script:hasType("script") then
sortkey_input = "မလိက်ပ္ဍဲဆေၚ်စပ်ကဵုဘာသာ[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
elseif lang_or_family_or_script:hasType("family") then
sortkey_input = "မလိက်မွဲသာ်ပ္ဍဲဆေၚ်စပ်ကဵုဘာသာ[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
else -- language
sortkey_input = "မလိက်[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
end
return "This module will sort " .. sortkey_input
.. (explanation and " " .. explanation or "")
.. ". "
.. require "မဝ်ဂျူ:documentation".sortkeyModuleLangList({args = { [1] = title_without_namespace:gsub("/documentation$", "") }})
.. [=[
The module should preferably not be called directly from templates or other modules.
To use it from a template, use <code>{{[[Template:sortkey|sortkey]]}}</code>.
Within a module, use [[Module:languages#Language:makeSortKey]].
For testcases, see [[မဝ်ဂျူ:]=] .. title_without_namespace:gsub("/documentation$", "") .. [=[/testcases]].
== Functions ==
; <code>makeSortKey(text, lang, sc)</code>
: Generates a sortkey for a given piece of <code>text</code> written in the script specified by the code <code>sc</code>, and language specified by the code <code>lang</code>.
: When the sort fails, returns <code>nil</code>.]=]
.. require "မဝ်ဂျူ:module categorization".categorize(fake_frame({
is_template = "1",
[1] = title_without_namespace,
}, {
[1] = code,
}))
end
function export.documentation_template(frame)
-- Parameters to {{sortkey module documentation}}:
-- |code|description
-- Ignore code because we get it from the page name.
local pagename = mw.title.getCurrentTitle().text
local args = frame:getParent().args
if args[1] and get_code_from_title_without_namespace(pagename) ~= args[1] then
-- [[Special:WhatLinksHere/Wiktionary:Tracking/sortkey/input different from title]]
require("မဝ်ဂျူ:debug").track("sortkey/input different from title")
end
if args[1] then
return export.documentation_from_code(args[1], args[2], pagename)
else
return export.documentation(pagename, args[2])
end
end
return export
jbqtl0yae27voguyw5hhujmcu68ra17
385836
385835
2026-04-07T09:14:17Z
咽頭べさ
33
385836
Scribunto
text/plain
local export = {}
local function fake_frame(args, parent_args)
return {
args = args,
getParent = function()
return {
args = parent_args,
}
end
}
end
function get_by_code(code)
return require "မဝ်ဂျူ:languages".getByCode(code, nil, false, true) or require "မဝ်ဂျူ:scripts".getByCode(code)
end
local function get_code_from_title_without_namespace(title_without_namespace)
local prefix = title_without_namespace:match("^(.+)%-sortkey%f[/%z]")
if not prefix then
error("Base segment of title should end in -sortkey: " .. title_without_namespace)
end
local code = prefix
local lang_or_family_or_script = get_by_code(code)
return code, lang_or_family_or_script
end
function export.documentation(title_without_namespace, explanation)
local code, lang_or_family_or_script = get_code_from_title_without_namespace(title_without_namespace)
return export.documentation_from_code(code, explanation, title_without_namespace)
end
function export.documentation_from_code(code, explanation, title_without_namespace)
local lang_or_family_or_script = get_by_code(code)
if not lang_or_family_or_script then
return "ကုဒ်အရေဝ်ဘာသာပ္ဍဲယၟုမုက်လိက် (<code>" .. code .. "</code>)ဟွံဂွံဒုၚ်လဝ်တဲပရေၚ်စိုပ်တရဴဏီ။"
end
local category_name = "ဘာသာ" .. lang_or_family_or_script:getCategoryName()
local sortkey_input
if lang_or_family_or_script:hasType("script") then
sortkey_input = "မလိက်ပ္ဍဲဆေၚ်စပ်ကဵုဘာသာ[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
elseif lang_or_family_or_script:hasType("family") then
sortkey_input = "မလိက်မွဲသာ်ပ္ဍဲဆေၚ်စပ်ကဵုဘာသာ[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
else -- language
sortkey_input = "မလိက်[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
end
return "မဝ်ဂျူအဇာတဏအ်ဝွံမနွံကဵု " .. sortkey_input
.. (explanation and " " .. explanation or "")
.. ". "
.. require "မဝ်ဂျူ:documentation".sortkeyModuleLangList({args = { [1] = title_without_namespace:gsub("/documentation$", "") }})
.. [=[
The module should preferably not be called directly from templates or other modules.
To use it from a template, use <code>{{[[Template:sortkey|sortkey]]}}</code>.
Within a module, use [[Module:languages#Language:makeSortKey]].
For testcases, see [[မဝ်ဂျူ:]=] .. title_without_namespace:gsub("/documentation$", "") .. [=[/testcases]].
== Functions ==
; <code>makeSortKey(text, lang, sc)</code>
: Generates a sortkey for a given piece of <code>text</code> written in the script specified by the code <code>sc</code>, and language specified by the code <code>lang</code>.
: When the sort fails, returns <code>nil</code>.]=]
.. require "မဝ်ဂျူ:module categorization".categorize(fake_frame({
is_template = "1",
[1] = title_without_namespace,
}, {
[1] = code,
}))
end
function export.documentation_template(frame)
-- Parameters to {{sortkey module documentation}}:
-- |code|description
-- Ignore code because we get it from the page name.
local pagename = mw.title.getCurrentTitle().text
local args = frame:getParent().args
if args[1] and get_code_from_title_without_namespace(pagename) ~= args[1] then
-- [[Special:WhatLinksHere/Wiktionary:Tracking/sortkey/input different from title]]
require("မဝ်ဂျူ:debug").track("sortkey/input different from title")
end
if args[1] then
return export.documentation_from_code(args[1], args[2], pagename)
else
return export.documentation(pagename, args[2])
end
end
return export
mqn46m0siqcxegs2d9pkowpg17hqt6x
385837
385836
2026-04-07T09:17:01Z
咽頭べさ
33
385837
Scribunto
text/plain
local export = {}
local function fake_frame(args, parent_args)
return {
args = args,
getParent = function()
return {
args = parent_args,
}
end
}
end
function get_by_code(code)
return require "မဝ်ဂျူ:languages".getByCode(code, nil, false, true) or require "မဝ်ဂျူ:scripts".getByCode(code)
end
local function get_code_from_title_without_namespace(title_without_namespace)
local prefix = title_without_namespace:match("^(.+)%-sortkey%f[/%z]")
if not prefix then
error("Base segment of title should end in -sortkey: " .. title_without_namespace)
end
local code = prefix
local lang_or_family_or_script = get_by_code(code)
return code, lang_or_family_or_script
end
function export.documentation(title_without_namespace, explanation)
local code, lang_or_family_or_script = get_code_from_title_without_namespace(title_without_namespace)
return export.documentation_from_code(code, explanation, title_without_namespace)
end
function export.documentation_from_code(code, explanation, title_without_namespace)
local lang_or_family_or_script = get_by_code(code)
if not lang_or_family_or_script then
return "ကုဒ်အရေဝ်ဘာသာပ္ဍဲယၟုမုက်လိက် (<code>" .. code .. "</code>)ဟွံဂွံဒုၚ်လဝ်တဲပရေၚ်စိုပ်တရဴဏီ။"
end
local category_name = lang_or_family_or_script:getCategoryName()
local sortkey_input
if lang_or_family_or_script:hasType("script") then
sortkey_input = "မလိက်ပ္ဍဲဆေၚ်စပ်ကဵုဘာသာ[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
elseif lang_or_family_or_script:hasType("family") then
sortkey_input = "မလိက်မွဲသာ်ပ္ဍဲဆေၚ်စပ်ကဵုဘာသာ[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
else -- language
sortkey_input = "မလိက်[[:ကဏ္ဍ:ဘာသာ" .. category_name .. "|" .. category_name .. "]]"
end
return "မဝ်ဂျူအဇာတဏအ်ဝွံမနွံကဵု " .. sortkey_input
.. (explanation and " " .. explanation or "")
.. ". "
.. require "မဝ်ဂျူ:documentation".sortkeyModuleLangList({args = { [1] = title_without_namespace:gsub("/documentation$", "") }})
.. [=[
The module should preferably not be called directly from templates or other modules.
To use it from a template, use <code>{{[[Template:sortkey|sortkey]]}}</code>.
Within a module, use [[Module:languages#Language:makeSortKey]].
For testcases, see [[မဝ်ဂျူ:]=] .. title_without_namespace:gsub("/documentation$", "") .. [=[/testcases]].
== Functions ==
; <code>makeSortKey(text, lang, sc)</code>
: Generates a sortkey for a given piece of <code>text</code> written in the script specified by the code <code>sc</code>, and language specified by the code <code>lang</code>.
: When the sort fails, returns <code>nil</code>.]=]
.. require "မဝ်ဂျူ:module categorization".categorize(fake_frame({
is_template = "1",
[1] = title_without_namespace,
}, {
[1] = code,
}))
end
function export.documentation_template(frame)
-- Parameters to {{sortkey module documentation}}:
-- |code|description
-- Ignore code because we get it from the page name.
local pagename = mw.title.getCurrentTitle().text
local args = frame:getParent().args
if args[1] and get_code_from_title_without_namespace(pagename) ~= args[1] then
-- [[Special:WhatLinksHere/Wiktionary:Tracking/sortkey/input different from title]]
require("မဝ်ဂျူ:debug").track("sortkey/input different from title")
end
if args[1] then
return export.documentation_from_code(args[1], args[2], pagename)
else
return export.documentation(pagename, args[2])
end
end
return export
scm1pqbyu06hin16q2i1c49kt9ztu0e
မိမ
0
286109
385804
2026-04-06T12:05:15Z
Aue Nai
29
ခၞံကၠောန်လဝ် မုက်လိက် နကု " == ဘာသာမန် == === ဗွဟ်ရမ္သာင် === * IPA(key): /mɛ̤ʔ mɛ̤ʔ/ * ရမ္သာင် (ဍုင်မန်): (file) === နာမ် === [[မိမ]] (mɛ̤ʔ mɛ̤ʔ) # [[ဒဒှ်]] မဒှ် [[အရာ]] [[မွဲ]] မရပ်စပ် သွက်ဂွံထ္ၜး [[ညး]] မကၠောန် ကမၠောန် ဂှ် ကလေင်ရပ်..."
385804
wikitext
text/x-wiki
== ဘာသာမန် ==
=== ဗွဟ်ရမ္သာင် ===
* IPA(key): /mɛ̤ʔ mɛ̤ʔ/
* ရမ္သာင် (ဍုင်မန်): (file)
=== နာမ် ===
[[မိမ]] (mɛ̤ʔ mɛ̤ʔ)
# [[ဒဒှ်]] မဒှ် [[အရာ]] [[မွဲ]] မရပ်စပ် သွက်ဂွံထ္ၜး [[ညး]] မကၠောန် ကမၠောန် ဂှ် ကလေင်ရပ်စပ် ကုညးဂှ် [[အလဵုဇကု]]။
# [[အလဵုဇကု]]၊ [[ဇကုဓဝ်]]၊ [[ကာယဓဝ်]]။
==== ပွံက်အဓိပ္ပါယ် ====
* [[အလဵုဇကု]] (ə ləw cɛ̀ʔ kɛ̀ʔ) – oneself
* [[ဇကုဓဝ်]] (cɛ̀ʔ kɛ̀ʔ thɔ̀) – self
* [[ကာယဓဝ်]] (kā ya thɔ̀) – one's own self
==== ဝေါဟာရဆက်စပ် ====
* [[မိ]] (miʔ) – mother (not to be confused)
* [[အဲ]] (ʔɔa) – I, me
* [[ဇကု]] (cɛ̀ʔ kɛ̀ʔ) – body, self
* [[ညး]] (ɲɛ̀a) – he, she, they
==== လညာတ်ဗီုပြင်ရပ်စပ် ====
<pre>
အဲမိမ ကၠောန်။ – I myself do it.
ညးမိမ ဟီု။ – He himself said.
</pre>
==== မတြာဲ ====
* အင်္ဂလိက်: [[self#English|self]], [[oneself]]
* ဗၟာ: [[ကိုယ်တိုင်]] (kuiytuing), [[မိမိ]] (mi.mi.)
* သေံ: [[ตัวเอง]] (dtua-eeng)
6mtqmjlizh5ehnhfjh40v9691zphaa7
kì
0
286110
385808
2026-04-07T07:38:55Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|Appendix:ဗီုပြၚ်နာနာသာ်မဆေၚ်စပ်ကဵု "ki"}} ==ဟောတ်ကဳယာန်== {{zh-see|記|poj}} =={{=vi=}}== ===ပွံၚ်နဲတၞဟ်=== * {{alt|vi|kỳ|q=ပါဲနူနာမ်ဂမၠိုၚ်}} ===ဗွဟ်ရမ္သာၚ်=== {{vi-IPA}} * {{audio|vi|LL-Q9199 (vie)-Penn Zero MSSJ-kì.wav|a=Hanoi}} ====ကြိယာ==== {{v..."
385808
wikitext
text/x-wiki
{{also|Appendix:ဗီုပြၚ်နာနာသာ်မဆေၚ်စပ်ကဵု "ki"}}
==ဟောတ်ကဳယာန်==
{{zh-see|記|poj}}
=={{=vi=}}==
===ပွံၚ်နဲတၞဟ်===
* {{alt|vi|kỳ|q=ပါဲနူနာမ်ဂမၠိုၚ်}}
===ဗွဟ်ရမ္သာၚ်===
{{vi-IPA}}
* {{audio|vi|LL-Q9199 (vie)-Penn Zero MSSJ-kì.wav|a=Hanoi}}
====ကြိယာ====
{{vi-verb|[[淇]], [[其]]}}
# သကဵုသိတ်၊ သကဵုဇွိတ်ပ္တိတ်။
===နာမ်===
{{vi-noun}}
# အခိၚ်ကာလ၊ အခိၚ်။
====နာမဝိသေသန====
{{vi-adj|rdp=y}}
# ဟွံကေၚ်ဆဵု၊ မဂၠိုၚ်ဒၟံၚ်ညိည။
# မဍုတ်ဍေဲ ဝါ မတက်စုတ်ဗၞာ်ဓမြိုတ်။
====သမ္ဗန္ဓ====
{{vi-conj}}
# စဵုကဵု၊ စဵု။
===ဗီုအက္ခရ်ရောမ===
{{head|vi|romanization}}
# {{sino-vietnamese reading of|其}}
===နာမ် ၂===
{{vi-noun}}
# ဍုၚ်ရာဇဌာနဳ ဝါ ဒပ်ယာစဵုဒၞာဍုၚ်။
# အပ္ဍဲဒေသဆေၚ်စပ်ကဵုတိဍာ်မကိတ်ညဳနကဵု ၁၀၀၀ {{m|vi|dặm}} (တိုၚ်ဂမၠိုၚ် ဝါ ဂါဝုတ်ဂမၠိုၚ်)
===ဗီုအက္ခရ်ရောမ ၂ ===
{{head|vi|romanization}}
# {{sino-vietnamese reading of|旗}}
===ဗီုအက္ခရ်ရောမ ၃ ===
{{head|vi|romanization}}
# {{sino-vietnamese reading of|棋}}
jrtea4g1ugm6lfw2pde63bst3g12bx9
ထာမ်ပလိက်:vi-adj/documentation
10
286111
385809
2026-04-07T07:40:54Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation subpage}} Headword-line template for Vietnamese adjectives. ===Usage=== <nowiki>{{vi-adj}}</nowiki> *''(Optional)'' The first parameter (<code>head</code>) is the bolded headword. It is set to the page name by default. *''(Optional)'' If the headword is monosyllabic and a diminutive reduplication ({{m|vi|đo đỏ}} type) exists, put {{para|rdp|y}} to automatically generate it. If the reduplication..."
385809
wikitext
text/x-wiki
{{documentation subpage}}
Headword-line template for Vietnamese adjectives.
===Usage===
<nowiki>{{vi-adj}}</nowiki>
*''(Optional)'' The first parameter (<code>head</code>) is the bolded headword. It is set to the page name by default.
*''(Optional)'' If the headword is monosyllabic and a diminutive reduplication ({{m|vi|đo đỏ}} type) exists, put {{para|rdp|y}} to automatically generate it. If the reduplication is augmentative, put {{para|rdp|aug}} instead. If the headword is disyllabic and an augmentative reduplication ({{m|vi|lung ta lung tung}} type) exists, put {{para|rdp|y}} to automatically generate it.
*''(Optional)'' If the headword is disyllabic and an augmentative reduplication of variant type ({{m|vi|tùm lum tà la}} type) exists, put {{para|avar|y}} to automatically generate it.
Explicitly giving reduplicated forms will put the page in the [[:en:Category:Vietnamese entries with manual reduplication]].
{{hwcat}}
k5fz8dmjm45i9j3l7b8ad1ybqrqf3qb
မဝ်ဂျူ:vi-adj
828
286112
385813
2026-04-07T08:07:50Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "local p = {} local m_links = require("Module:links") local m_utils = require("Module:utilities") local lang = require("Module:languages").getByCode("vi") local tone_diacritics = { ["̀"] = "̀", ["́"] = "", ["̉"] = "", ["̃"] = "̀", ["̣"] = "̀" } local checked_finals = { ["p$"] = "m", ["t$"] = "n", ["ch$"] = "nh", ["c$"] = "ng" } function p.rdp_one(frame) local lemma = frame.args[1] or mw.loadData("Module:he..."
385813
Scribunto
text/plain
local p = {}
local m_links = require("Module:links")
local m_utils = require("Module:utilities")
local lang = require("Module:languages").getByCode("vi")
local tone_diacritics = { ["̀"] = "̀", ["́"] = "", ["̉"] = "", ["̃"] = "̀", ["̣"] = "̀" }
local checked_finals = { ["p$"] = "m", ["t$"] = "n", ["ch$"] = "nh", ["c$"] = "ng" }
function p.rdp_one(frame)
local lemma = frame.args[1] or mw.loadData("Module:headword/data").pagename
local rdp_syll_normed = mw.ustring.toNFD(lemma)
rdp_syll_normed = mw.ustring.gsub(rdp_syll_normed, "̣̂", "̂̀") -- dot-below is put before circumflex, which causes problems later on
rdp_syll_normed = mw.ustring.gsub(rdp_syll_normed, "̣̆", "̆̀") -- same with breve
for orig, modif in pairs(tone_diacritics) do
rdp_syll_normed = mw.ustring.gsub(rdp_syll_normed, orig, modif)
end
for orig, modif in pairs(checked_finals) do
rdp_syll_normed = mw.ustring.gsub(rdp_syll_normed, orig, modif)
end
return mw.ustring.toNFC(rdp_syll_normed) .. " " .. lemma
end
local function a_rdp(syllable)
local syllable_normed = mw.ustring.toNFD(syllable)
local a_with_tone = "a"
if mw.ustring.find(syllable_normed, "[̣̀̃]") ~= nil then
a_with_tone = "à"
end
local initial = mw.ustring.match(syllable_normed, "([^aăâeêioôơuưyAĂÂEÊIOÔƠUƯY]+)")
if mw.ustring.find(syllable_normed, "([aăâeêioôơuưyAĂÂEÊIOÔƠUƯY]+)")==1 then initial = "" end -- in case the syllable starts with a vowel
if initial == "gh" then initial = "g" end -- in case the syllable was ghi, ghê, ghe
if initial == "k" then initial = "c" end -- in case the syllable was ki, kê, ke
if initial == "ngh" then initial = "ng" end -- in case the syllable was nghi, nghê, nghe
return mw.ustring.toNFC(initial .. a_with_tone)
end
function p.rdp_two(frame)
local lemma = frame.args[1] or mw.loadData("Module:headword/data").pagename
local syllables = {}
for w in string.gmatch(lemma, "([^ ]+)") do
table.insert(syllables, w)
end
return syllables[1] .. " " .. a_rdp(syllables[2]) .. " " .. lemma
end
function p.rdp_two_var(frame)
local lemma = frame.args[1] or mw.loadData("Module:headword/data").pagename
local syllables = {}
for w in string.gmatch(lemma, "([^ ]+)") do
table.insert(syllables, w)
end
return lemma .. " " .. a_rdp(syllables[1]) .. " " .. a_rdp(syllables[2])
end
function p.rdp_AABB(frame)
local lemma = frame.args[1] or mw.loadData("Module:headword/data").pagename
local syllables = {}
for w in string.gmatch(lemma, "([^ ]+)") do
table.insert(syllables, w)
end
return syllables[1] .. " " .. syllables[1] .. " " .. syllables[2] .. " " .. syllables[2]
end
function p.rdp_type(frame)
local type_of_rdp = {[1] = "dim", [3] = "aug"}
local lemma = frame.args[1]
local s, number_of_spaces = string.gsub(lemma," "," ")
return type_of_rdp[number_of_spaces]
end
return p
lae0w5k7acuqx15zveb9797bdz3lsk2
မဝ်ဂျူ:vi-adj/doc
828
286113
385814
2026-04-07T08:09:14Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|vi}} </includeonly>"
385814
wikitext
text/x-wiki
{{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. -->
<includeonly>
{{module cat|vi}}
</includeonly>
nk357hvc53ayu24pmdkateevdvr5dom
ကဏ္ဍ:မဝ်ဂျူပွမပြံၚ်လှာဲဗဳယေတ်နာမ်ဂမၠိုၚ်
14
286114
385831
2026-04-07T08:51:38Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:မဝ်ဂျူဗဳယေတ်နာမ်ဂမၠိုၚ်]][[ကဏ္ဍ:မဝ်ဂျူဗီုအပြံၚ်အလှာဲဝေါဟာဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ဗ]]"
385831
wikitext
text/x-wiki
[[ကဏ္ဍ:မဝ်ဂျူဗဳယေတ်နာမ်ဂမၠိုၚ်]][[ကဏ္ဍ:မဝ်ဂျူဗီုအပြံၚ်အလှာဲဝေါဟာဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ဗ]]
epgovm812o9bnx3kdad3xhutk70b0do
မဝ်ဂျူ:vi-sortkey/doc
828
286115
385833
2026-04-07T08:54:27Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{sortkey module documentation}} Alphabetic order: {{lang|vi|a ă â b c d đ e ê g h i k l m n o ô ơ p q r s t u ư v x y|face=term}}. Order of tonal diacritics: currently {{lang|vi|a, à, ả, ã, á, ạ|face=term}}; alternative, {{lang|vi|a, á, à, ả, ã, ạ|face=term}}. See the discussion [[Wiktionary:Beer parlour/2017/July#Sorting Vietnamese|in the Beer Parlour]]. ==Examples== {{#invoke:vi-sortkey|sho..."
385833
wikitext
text/x-wiki
{{sortkey module documentation}}
Alphabetic order: {{lang|vi|a ă â b c d đ e ê g h i k l m n o ô ơ p q r s t u ư v x y|face=term}}.
Order of tonal diacritics: currently {{lang|vi|a, à, ả, ã, á, ạ|face=term}}; alternative, {{lang|vi|a, á, à, ả, ã, ạ|face=term}}.
See the discussion [[Wiktionary:Beer parlour/2017/July#Sorting Vietnamese|in the Beer Parlour]].
==Examples==
{{#invoke:vi-sortkey|showSortkey|Tuyên ngôn toàn thế giới về nhân quyền của Liên Hợp Quốc|công bằng|Đại|Ác-si-mét|tâm lý}}
{{#invoke:vi-sortkey|showSorting|ngôn|ngon|ngoy|ngón|ngôn|ngôi|ngọn|nghệ|nghề}}
{{top5}}
{{#invoke:vi-sortkey|showSorting|à|àc|àn|ằ|ằc|ằn|ầ|ầc|ần|è|èc|èn|ề|ềc|ền|ì|ìc|ìn|ò|òc|òn|ồ|ồc|ồn|ờ|ờc|ờn|ù|ùc|ùn|ừ|ừc|ừn|ỳ|ỳc|ỳn|ả|ảc|ản|ẳ|ẳc|ẳn|ẩ|ẩc|ẩn|ẻ|ẻc|ẻn|ể|ểc|ển|ỉ|ỉc|ỉn|ỏ|ỏc|ỏn|ổ|ổc|ổn|ở|ởc|ởn|ủ|ủc|ủn|ử|ửc|ửn|ỷ|ỷc|ỷn|ã|ãc|ãn|ẵ|ẵc|ẵn|ẫ|ẫc|ẫn|ẽ|ẽc|ẽn|ễ|ễc|ễn|ĩ|ĩc|ĩn|õ|õc|õn|ỗ|ỗc|ỗn|ỡ|ỡc|ỡn|ũ|ũc|ũn|ữ|ữc|ữn|ỹ|ỹc|ỹn|á|ác|án|ắ|ắc|ắn|ấ|ấc|ấn|é|éc|én|ế|ếc|ến|í|íc|ín|ó|óc|ón|ố|ốc|ốn|ớ|ớc|ớn|ú|úc|ún|ứ|ức|ứn|ý|ýc|ýn|ạ|ạc|ạn|ặ|ặc|ặn|ậ|ậc|ận|ẹ|ẹc|ẹn|ệ|ệc|ện|ị|ịc|ịn|ọ|ọc|ọn|ộ|ộc|ộn|ợ|ợc|ợn|ụ|ục|ụn|ự|ực|ựn|ỵ|ỵc|ỵn|a|ac|an|ă|ăc|ăn|â|âc|ân|b|bc|bn|c|cc|cn|d|dc|dn|đ|đc|đn|e|ec|en|ê|êc|ên|g|gc|gn|h|hc|hn|i|ic|in|k|kc|kn|l|lc|ln|m|mc|mn|n|nc|nn|o|oc|on|ô|ôc|ôn|ơ|ơc|ơn|p|pc|pn|q|qc|qn|r|rc|rn|s|sc|sn|t|tc|tn|u|uc|un|ư|ưc|ưn|v|vc|vn|x|xc|xn|y|yc|yn}}
{{bottom}}
p54y22c20nyj79fo8js4j3jgnkezeye
ကဏ္ဍ:ဝေါဟာစှ်နကဵုဘာသာဗဳယေတ်နာမ်ဂမၠိုၚ်
14
286116
385842
2026-04-07T09:37:16Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာဗဳယေတ်နာမ်]]"
385842
wikitext
text/x-wiki
[[ကဏ္ဍ:ဘာသာဗဳယေတ်နာမ်]]
htonmb6eo8mzrq9845v5i73jf8oc8u6
ကဏ္ဍ:ဝေါဟာဗဳယေတ်နာမ်နကဵုမပံၚ်ကောံတံရိုဟ်ဂမၠိုၚ်
14
286117
385843
2026-04-07T09:38:13Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာဗဳယေတ်နာမ်]]"
385843
wikitext
text/x-wiki
[[ကဏ္ဍ:ဘာသာဗဳယေတ်နာမ်]]
htonmb6eo8mzrq9845v5i73jf8oc8u6
ကဏ္ဍ:ဂၞန်သၚ်္ချာတိုဝ်ဂမၠိုၚ်
14
286118
385844
2026-04-07T09:44:47Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာတိုဝ်|တိုဝ်]] » :ကဏ္ဍ:ဝေါဟာအ..."
385844
wikitext
text/x-wiki
[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာတိုဝ်|တိုဝ်]] » [[:ကဏ္ဍ:ဝေါဟာအဓိကတိုဝ်ဂမၠိုၚ်|ဝေါဟာတံသ္ဇိုၚ်]] » '''ဂၞန်သၚ်္ချာဂမၠိုၚ်'''
:ဝေါဟာတိုဝ်ပွမပ္ညုၚ်ထ္ၜးနာမ်တော်လျိုၚ်နာမ်ဂွံမာန်ဂမၠိုၚ်။
[[ကဏ္ဍ:ဘာသာတိုဝ်]][[ကဏ္ဍ:ဂၞန်သၚ်္ချာဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|တ]]
48ppn0naml0a015ifb31n9e7p0ie7dp
ကဏ္ဍ:ဘာသာတိုဝ်
14
286119
385845
2026-04-07T09:45:56Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{auto cat|Vietnam|Laos}}"
385845
wikitext
text/x-wiki
{{auto cat|Vietnam|Laos}}
3g4froinqg9dq5xxmkshnuw219q10v0
385846
385845
2026-04-07T09:46:48Z
咽頭べさ
33
385846
wikitext
text/x-wiki
[[ကဏ္ဍ:အရေဝ်ဘာသာ|တ]][[ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|တ]]
d1y0go5s2k9yoag8wikhlz5q3hrcogo
ကဏ္ဍ:ဂၞန်သၚ်္ချာၚောန်ဂမၠိုၚ်
14
286120
385847
2026-04-07T09:48:30Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာၚောန်|ၚောန်]] » :ကဏ္ဍ:ဝေါဟာအ..."
385847
wikitext
text/x-wiki
[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာၚောန်|ၚောန်]] » [[:ကဏ္ဍ:ဝေါဟာအဓိကၚောန်ဂမၠိုၚ်|ဝေါဟာတံသ္ဇိုၚ်]] » '''ဂၞန်သၚ်္ချာဂမၠိုၚ်'''
:ဝေါဟာခရိပွမပ္ညုၚ်ထ္ၜးနာမ်တော်လျိုၚ်နာမ်ဂွံမာန်ဂမၠိုၚ်။
[[ကဏ္ဍ:ဘာသာၚောန်]][[ကဏ္ဍ:ဂၞန်သၚ်္ချာဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ၚ]]
r9oi4v9qot0qaykxkhl1pc6g31vojdi
ကဏ္ဍ:ဘာသာၚောန်
14
286121
385848
2026-04-07T09:49:38Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:အရေဝ်ဘာသာ|ၚ]][[ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|ၚ]]"
385848
wikitext
text/x-wiki
[[ကဏ္ဍ:အရေဝ်ဘာသာ|ၚ]][[ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|ၚ]]
a6b6dtwxsugmwt19yjm4tmi6o4smms3
ကဏ္ဍ:ဝေါဟာအဓိကတိုဝ်ဂမၠိုၚ်
14
286122
385849
2026-04-07T09:51:25Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာတိုဝ်|တိုဝ်]] » '''ဝေါဟာတံသ္ဇ..."
385849
wikitext
text/x-wiki
[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာတိုဝ်|တိုဝ်]] » '''ဝေါဟာတံသ္ဇိုၚ်ဂမၠိုၚ်'''
:ဝေါဟာတံသ္ဇိုၚ်ဘာသာတိုဝ်၊ ကဏ္ဍနူကဵုမပါ်ပရံဒကုတ်မဆေၚ်စပ်ကဵုမအရေဝ်ဝေါဟာ။
[[ကဏ္ဍ:ဘာသာတိုဝ်]][[ကဏ္ဍ:ဝေါဟာအဓိကဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|တ]]
2f7aqgm3qgfnx860k248515wdwiij1m
ကဏ္ဍ:ဝေါဟာအဓိကၚောန်ဂမၠိုၚ်
14
286123
385850
2026-04-07T09:53:10Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာၚောန်|ၚောန်]] » '''ဝေါဟာတံသ္ဇ..."
385850
wikitext
text/x-wiki
[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာၚောန်|ၚောန်]] » '''ဝေါဟာတံသ္ဇိုၚ်ဂမၠိုၚ်'''
:ဝေါဟာတံသ္ဇိုၚ်ဘာသာၚောန်၊ ကဏ္ဍနူကဵုမပါ်ပရံဒကုတ်မဆေၚ်စပ်ကဵုမအရေဝ်ဝေါဟာ။
[[ကဏ္ဍ:ဘာသာၚောန်]][[ကဏ္ဍ:ဝေါဟာအဓိကဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ၚ]]
pwl5dbnys30d3l9a7muxjs6jedsd4p6
ကဏ္ဍ:ဝေါဟာတိုဝ်ပ္တိတ်ရမျာၚ် IPA ဂမၠိုၚ်
14
286124
385851
2026-04-07T09:54:57Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာတိုဝ်|တိုဝ်]] » '''{{PAGENAME}}''' :ဝေါဟ..."
385851
wikitext
text/x-wiki
[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာတိုဝ်|တိုဝ်]] » '''{{PAGENAME}}'''
:ဝေါဟာတိုဝ်လုပ်အဝေါၚ်မဆေၚ်စပ်မပ္တိတ်ရမျာၚ်ပ္ဍဲနကဵုဗီုပြၚ် IPA။
သွက်မအာတ်မိက်ဆေၚ်စပ်ကဵုကဏ္ဍတဏအ်၊ ဗဵုရံၚ် ကဏ္ဍ:မအာတ်မိက်သွက်ရမျာၚ်ပ္ဍဲစရၚ်တိုဝ်ဂမၠိုၚ်။
[[ကဏ္ဍ:ဘာသာတိုဝ်]][[ကဏ္ဍ:ဝေါဟာမနွံကဵုမပတိတ်ရမျာၚ် IPA ဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|တ]]
98ex7yc60yr8m1e7u28v2e8xeba7x2v
ကဏ္ဍ:ဝေါဟာၚောန်ပ္တိတ်ရမျာၚ် IPA ဂမၠိုၚ်
14
286125
385852
2026-04-07T09:56:39Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာၚောန်|ၚောန်]] » '''{{PAGENAME}}''' :ဝေါဟ..."
385852
wikitext
text/x-wiki
[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာၚောန်|ၚောန်]] » '''{{PAGENAME}}'''
:ဝေါဟာၚောန်လုပ်အဝေါၚ်မဆေၚ်စပ်မပ္တိတ်ရမျာၚ်ပ္ဍဲနကဵုဗီုပြၚ် IPA။
သွက်မအာတ်မိက်ဆေၚ်စပ်ကဵုကဏ္ဍတဏအ်၊ ဗဵုရံၚ် ကဏ္ဍ:မအာတ်မိက်သွက်ရမျာၚ်ပ္ဍဲစရၚ်ၚောန်ဂမၠိုၚ်။
[[ကဏ္ဍ:ဘာသာၚောန်]][[ကဏ္ဍ:ဝေါဟာမနွံကဵုမပတိတ်ရမျာၚ် IPA ဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ၚ]]
ga5vtt4pktf15d6p4zt7rpjs9kv4zpd
ထာမ်ပလိက်:tyz-IPA/documentation
10
286126
385854
2026-04-07T10:01:20Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation subpage}} {{documentation needed}}<!-- Replace this with a short description of the purpose of the template, and how to use it. --> <includeonly> {{tcat}} </includeonly>"
385854
wikitext
text/x-wiki
{{documentation subpage}}
{{documentation needed}}<!-- Replace this with a short description of the purpose of the template, and how to use it. -->
<includeonly>
{{tcat}}
</includeonly>
2qm0jly3lhaf3nnrnt7fmzxa5nkzn7x
ကဏ္ဍ:ထာမ်ပလိက်မပ္တိတ်ရမျာၚ်ထာၚ်ဂမၠိုၚ်
14
286127
385855
2026-04-07T10:02:16Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ထာမ်ပလိက်ထာၚ်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်ပ္တိတ်ရမျာၚ်ဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ထ]]"
385855
wikitext
text/x-wiki
[[ကဏ္ဍ:ထာမ်ပလိက်ထာၚ်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်ပ္တိတ်ရမျာၚ်ဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ထ]]
rf2ge5pkkafs7zxdkgljzrarcs71wkg
ကဏ္ဍ:ဝေါဟာတိုဝ်ကၠုၚ်နူဝေါဟာဗဳယေတ်ဒါသ်-အခိုက်ကၞာဂမၠိုၚ်
14
286128
385856
2026-04-07T10:03:32Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာတိုဝ်]]"
385856
wikitext
text/x-wiki
[[ကဏ္ဍ:ဘာသာတိုဝ်]]
9dk4n0oxrygrmdzdk3ov8r9s1o19wuh
ကဏ္ဍ:ဝေါဟာတိုဝ်ဂွံလဝ်အာဲကၟာဲနူဝေါဟာဗဳယေတ်ဒါသ်-အခိုက်ကၞာဂမၠိုၚ်
14
286129
385857
2026-04-07T10:04:37Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာတိုဝ်]]"
385857
wikitext
text/x-wiki
[[ကဏ္ဍ:ဘာသာတိုဝ်]]
9dk4n0oxrygrmdzdk3ov8r9s1o19wuh
ကဏ္ဍ:ဝေါဟာၚောန်ကၠုၚ်နူဝေါဟာဗဳယေတ်ဒါသ်-အခိုက်ကၞာဂမၠိုၚ်
14
286130
385858
2026-04-07T10:05:43Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာၚောန်]]"
385858
wikitext
text/x-wiki
[[ကဏ္ဍ:ဘာသာၚောန်]]
qchg3qizi9005tsa0l3wqyd8ssgjke6
ကဏ္ဍ:ဝေါဟာၚောန်ဂွံလဝ်အာဲကၟာဲနူဝေါဟာဗဳယေတ်ဒါသ်-အခိုက်ကၞာဂမၠိုၚ်
14
286131
385859
2026-04-07T10:06:41Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာၚောန်]]"
385859
wikitext
text/x-wiki
[[ကဏ္ဍ:ဘာသာၚောန်]]
qchg3qizi9005tsa0l3wqyd8ssgjke6
ဗီုပြၚ်သိုၚ်တၟိ:ဗဳယေတ်ဒါသ်-အခိုက်ကၞာ/maːl
118
286132
385860
2026-04-07T10:10:35Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{reconstruction}} ==ဗဳယေတ်ဒါသ်-အခိုက်ကၞာ== ===ဂၞန်သၚ်္ချာ=== {{head|mkh-vie-pro|numeral}} # [[စှ်]]။"
385860
wikitext
text/x-wiki
{{reconstruction}}
==ဗဳယေတ်ဒါသ်-အခိုက်ကၞာ==
===ဂၞန်သၚ်္ချာ===
{{head|mkh-vie-pro|numeral}}
# [[စှ်]]။
2r9wlfeizswh717o3aj1o9f4cl9c9ow
muồi
0
286133
385861
2026-04-07T10:24:41Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|muoi|muối|muôi|muỗi|mười|muội|mươi}} ==ထာၚ်== ===ဗွဟ်ရမ္သာၚ်=== * {{tyz-IPA}} ===နာမ်=== {{tyz-noun}} # ပ္ကဴအာက်ပရဳခွတ်ဂမၠိုၚ်။ =={{=vi=}}== {{was wotd|၂၀၂၆|ဨပြဳ|၈}} ===ဗွဟ်ရမ္သာၚ်=== {{vi-IPA}} * {{audio|vi|LL-Q9199 (vie)-Penn Zero MSSJ-muồi.wav|a=Hanoi}} ====နာမ..."
385861
wikitext
text/x-wiki
{{also|muoi|muối|muôi|muỗi|mười|muội|mươi}}
==ထာၚ်==
===ဗွဟ်ရမ္သာၚ်===
* {{tyz-IPA}}
===နာမ်===
{{tyz-noun}}
# ပ္ကဴအာက်ပရဳခွတ်ဂမၠိုၚ်။
=={{=vi=}}==
{{was wotd|၂၀၂၆|ဨပြဳ|၈}}
===ဗွဟ်ရမ္သာၚ်===
{{vi-IPA}}
* {{audio|vi|LL-Q9199 (vie)-Penn Zero MSSJ-muồi.wav|a=Hanoi}}
====နာမဝိသေသန====
{{vi-adj|[[迷]], [[枚]], [[煤]]}}
# မဍုဟ်၊ မဍုန်ဗစိန်လဝ်တၟိုဟ်တိုန်၊ မကဵုသၠုဲဒတုဲနကဵုသ္ပပြဘိုက်။
# မဍိုက်ပေၚ်တဴသၟူရှ်သာ၊ အကာဲအရာဗွဲမခိုဟ်တဴ။
# မသ္ဇိုဟ်နက်၊ သၠာံၜိုတ်။
rbcaeaz7s9uaefv0uyqdp0wd2q2k4cm
ဝိက်ရှေန်နရဳ:မအရေဝ်သွက်တ္ၚဲဏအ်/၂၀၂၆/ဨပြဳ ၈
4
286134
385862
2026-04-07T10:26:43Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{WOTD|muồi|နာမဝိသေသန| မဍုဟ်၊ မဍုန်ဗစိန်လဝ်တၟိုဟ်တိုန်၊ မကဵုသၠုဲဒတုဲနကဵုသ္ပပြဘိုက်။ # မဍိုက်ပေၚ်တဴသၟူရှ်သာ၊ အကာဲအရာဗွဲမခိုဟ်တဴ။ # မသ္ဇိုဟ်နက်၊ သၠာံၜိုတ်။|audio=L..."
385862
wikitext
text/x-wiki
{{WOTD|muồi|နာမဝိသေသန| မဍုဟ်၊ မဍုန်ဗစိန်လဝ်တၟိုဟ်တိုန်၊ မကဵုသၠုဲဒတုဲနကဵုသ္ပပြဘိုက်။
# မဍိုက်ပေၚ်တဴသၟူရှ်သာ၊ အကာဲအရာဗွဲမခိုဟ်တဴ။
# မသ္ဇိုဟ်နက်၊ သၠာံၜိုတ်။|audio=LL-Q9199 (vie)-Penn Zero MSSJ-muồi.wav|ဨပြဳ|၈}}
l0343v03tzymg9iz2sr0q1wiowh8uat
muoi
0
286135
385863
2026-04-07T10:36:30Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|muối|muôi|muỗi|mười|muội|mươi|muồi}} ==ဗက်ခ်== ===နာမ်=== {{eu-noun|in}} # ကၞာတ်ဓာတ်[[muon|မျူအောန်]]။"
385863
wikitext
text/x-wiki
{{also|muối|muôi|muỗi|mười|muội|mươi|muồi}}
==ဗက်ခ်==
===နာမ်===
{{eu-noun|in}}
# ကၞာတ်ဓာတ်[[muon|မျူအောန်]]။
lxzlsjz8yh9jawz2o9clb8susd2nnxn
muon
0
286136
385864
2026-04-07T10:41:59Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|muón|múon|muôn|muốn|mướn|muộn|mượn}} =={{=en=}}== ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|en|/ˈmjuːɒn/}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-muon.wav|a=Southern England}} * {{rhymes|en|uːɒn|s=2}} ===နာမ်=== {{en-noun}} # ကၞာတ်ဓာတ်မျူအောန်။ # ဓာတ်ကၞာတ်အမှိက်မဆဵုညာတ်ကဵုမတ်ဟွံ..."
385864
wikitext
text/x-wiki
{{also|muón|múon|muôn|muốn|mướn|muộn|mượn}}
=={{=en=}}==
===ဗွဟ်ရမ္သာၚ်===
* {{IPA|en|/ˈmjuːɒn/}}
* {{audio|en|LL-Q1860 (eng)-Vealhurl-muon.wav|a=Southern England}}
* {{rhymes|en|uːɒn|s=2}}
===နာမ်===
{{en-noun}}
# ကၞာတ်ဓာတ်မျူအောန်။
# ဓာတ်ကၞာတ်အမှိက်မဆဵုညာတ်ကဵုမတ်ဟွံဂွံမာန်အပ္ဍဲဆေၚ်စပ်ကဵုဝေါၚ်သဂကူလေပ်တာန်ဂမၠိုၚ်။
qbn9p0x6zy4qqw101p17iww9gcdowxv
muons
0
286137
385865
2026-04-07T10:42:59Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|múons}} =={{=en=}}== ===နာမ်=== {{head|en|noun form}} # {{plural of|en|muon}} ===ဝေါဟာလွာ=== * {{anagrams|en|a=mnosu|Osmun|smuon|sumon}}"
385865
wikitext
text/x-wiki
{{also|múons}}
=={{=en=}}==
===နာမ်===
{{head|en|noun form}}
# {{plural of|en|muon}}
===ဝေါဟာလွာ===
* {{anagrams|en|a=mnosu|Osmun|smuon|sumon}}
a0ra7kajkpid6rskph2vmqh9qtgzkjm
múons
0
286138
385866
2026-04-07T10:43:52Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|muons}} ==ပဝ်တူဂြဳ== ===နာမ်=== {{head|pt|noun form|g=m}} # {{plural of|pt|múon}}"
385866
wikitext
text/x-wiki
{{also|muons}}
==ပဝ်တူဂြဳ==
===နာမ်===
{{head|pt|noun form|g=m}}
# {{plural of|pt|múon}}
eofoz6bbj5i0xs1fizxe8kl41w6ce6v
múon
0
286139
385867
2026-04-07T10:44:45Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|muon|muón|muôn|muốn|mướn|muộn|mượn}} ==ပဝ်တူဂြဳ== ===ဗွဟ်ရမ္သာၚ်=== {{pt-IPA}} * {{hyphenation|pt|mú|on}} ===နာမ်=== {{pt-noun|m|#s,#es}} # {{standard form of|pt|muão|from=Brazilian Portuguese form}}"
385867
wikitext
text/x-wiki
{{also|muon|muón|muôn|muốn|mướn|muộn|mượn}}
==ပဝ်တူဂြဳ==
===ဗွဟ်ရမ္သာၚ်===
{{pt-IPA}}
* {{hyphenation|pt|mú|on}}
===နာမ်===
{{pt-noun|m|#s,#es}}
# {{standard form of|pt|muão|from=Brazilian Portuguese form}}
75nd1vasb7kicoqxzbh2acze0q7c98d
385870
385867
2026-04-07T10:50:08Z
咽頭べさ
33
385870
wikitext
text/x-wiki
{{also|muon|muón|muôn|muốn|mướn|muộn|mượn}}
==ပဝ်တူဂြဳ==
===ဗွဟ်ရမ္သာၚ်===
{{pt-IPA}}
* {{hyphenation|pt|mú|on}}
===နာမ်===
{{pt-noun|m|#s,#es}}
# {{standard form of|pt|muão}}
57txqmxsu44cdix99vscnatklklmch3
múones
0
286140
385869
2026-04-07T10:49:27Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ပဝ်တူဂြဳ== ===နာမ်=== {{head|pt|noun form|g=m}} # {{plural of|pt|múon}}"
385869
wikitext
text/x-wiki
==ပဝ်တူဂြဳ==
===နာမ်===
{{head|pt|noun form|g=m}}
# {{plural of|pt|múon}}
35bx6k98mwihmpqc85me7d1m4d8h0qs
muão
0
286141
385871
2026-04-07T10:52:23Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ပဝ်တူဂြဳ== ===ပွံၚ်နဲတၞဟ်=== * {{alt|pt|múon||Brazil}} ===နိရုတ်=== {{bor+|pt|en|muon}} ===ဗွဟ်ရမ္သာၚ်=== {{pt-IPA}} * {{rhymes|pt|ɐ̃w̃|s=2}} * {{hyphenation|pt|mu|ão}} ===နာမ်=== {{pt-noun|m}} # ကၞာတ်ဓာတ်[[muon|မျူအောန်]]။ #: {{syn|pt|mu}}"
385871
wikitext
text/x-wiki
==ပဝ်တူဂြဳ==
===ပွံၚ်နဲတၞဟ်===
* {{alt|pt|múon||Brazil}}
===နိရုတ်===
{{bor+|pt|en|muon}}
===ဗွဟ်ရမ္သာၚ်===
{{pt-IPA}}
* {{rhymes|pt|ɐ̃w̃|s=2}}
* {{hyphenation|pt|mu|ão}}
===နာမ်===
{{pt-noun|m}}
# ကၞာတ်ဓာတ်[[muon|မျူအောန်]]။
#: {{syn|pt|mu}}
bk471xlz9nrdoqebzno3pl1pi1kydq8
muões
0
286142
385872
2026-04-07T10:53:11Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ပဝ်တူဂြဳ== ===နာမ်=== {{head|pt|noun form|g=m}} # {{plural of|pt|muão}}"
385872
wikitext
text/x-wiki
==ပဝ်တူဂြဳ==
===နာမ်===
{{head|pt|noun form|g=m}}
# {{plural of|pt|muão}}
apshbzkn1kcfr6medrrbeb8uipb2hte
ကဏ္ဍ:ကာရန်:ပဝ်တူဂြဳ/ɐ̃w̃
14
286143
385873
2026-04-07T10:54:55Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာပဝ်တူဂြဳ|ပဝ်တူဂြဳ]]မနွံကာရန် [[ကာရန်:ပဝ်တူဂြဳ/ɐ̃w̃|-ɐ̃w̃]] ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:ပဝ်တူဂြဳ|ɐ̃w̃]]"
385873
wikitext
text/x-wiki
စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာပဝ်တူဂြဳ|ပဝ်တူဂြဳ]]မနွံကာရန် [[ကာရန်:ပဝ်တူဂြဳ/ɐ̃w̃|-ɐ̃w̃]] ဂမၠိုၚ်။
[[ကဏ္ဍ:ကာရန်:ပဝ်တူဂြဳ|ɐ̃w̃]]
skfowsi53w6olw8bxhnh34iv127c9qp
mượn
0
286144
385874
2026-04-07T10:58:53Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|muon|muón|múon|muôn|muốn|mướn|muộn}} =={{=vi=}}== ===ပွံၚ်နဲတၞဟ်=== * {{alt|vi|mạn|q=North Central Vietnam|pos=no diphthongization}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{inh|vi|mkh-vie-pro|*maːɲʔ}} ===ဗွဟ်ရမ္သာၚ်=== {{vi-IPA}} ====ကြိယာ==== {{vi-verb|[[摱]], [[𠼦]], [[慢]]}} # သကဵုဂၠေံကေ..."
385874
wikitext
text/x-wiki
{{also|muon|muón|múon|muôn|muốn|mướn|muộn}}
=={{=vi=}}==
===ပွံၚ်နဲတၞဟ်===
* {{alt|vi|mạn|q=North Central Vietnam|pos=no diphthongization}}
===နိရုတ်===
ဝေါဟာကၠုၚ်နူ {{inh|vi|mkh-vie-pro|*maːɲʔ}}
===ဗွဟ်ရမ္သာၚ်===
{{vi-IPA}}
====ကြိယာ====
{{vi-verb|[[摱]], [[𠼦]], [[慢]]}}
# သကဵုဂၠေံကေတ်။
#: {{ant|vi|trả}}
6qwtlgizaynzwc4y9hrgx5w623fo7ek
ဗီုပြၚ်သိုၚ်တၟိ:ဗဳယေတ်ဒါသ်-အခိုက်ကၞာ/maːɲʔ
118
286145
385875
2026-04-07T11:00:05Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{reconstruction}} ==ဗဳယေတ်ဒါသ်-အခိုက်ကၞာ== ====ကြိယာ==== {{head|mkh-vie-pro|ကြိယာ}} # သကဵုဂၠေံကေတ်။"
385875
wikitext
text/x-wiki
{{reconstruction}}
==ဗဳယေတ်ဒါသ်-အခိုက်ကၞာ==
====ကြိယာ====
{{head|mkh-vie-pro|ကြိယာ}}
# သကဵုဂၠေံကေတ်။
d2iun7xqb147i7n9bh9m2hzzqxki42m
muộn
0
286146
385876
2026-04-07T11:08:40Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|muon|muón|múon|muôn|muốn|mướn|mượn}} ==ထာၚ်== ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{inh|tyz|tai-pro|*mwɯːnꟲ|}} ===ဗွဟ်ရမ္သာၚ်=== * {{tyz-IPA}} ====ကြိယာ==== {{tyz-verb}} # သကဵုထၟူတိုန်။ # သကဵုတုတ် ကဵု ထပ်နကဵုပွမစဵုဒၞာပရေၚ်သှ်ဂလ..."
385876
wikitext
text/x-wiki
{{also|muon|muón|múon|muôn|muốn|mướn|mượn}}
==ထာၚ်==
===နိရုတ်===
ဝေါဟာကၠုၚ်နူ {{inh|tyz|tai-pro|*mwɯːnꟲ|}}
===ဗွဟ်ရမ္သာၚ်===
* {{tyz-IPA}}
====ကြိယာ====
{{tyz-verb}}
# သကဵုထၟူတိုန်။
# သကဵုတုတ် ကဵု ထပ်နကဵုပွမစဵုဒၞာပရေၚ်သှ်ဂလိုဟ်ပ္တိတ်။
=={{=vi=}}==
===ဗွဟ်ရမ္သာၚ်===
{{vi-IPA}}
* {{audio|vi|LL-Q9199 (vie)-Jessica Nguyen (Pamputt)-muộn.wav|a=Ho Chi Minh City}}
===နိရုတ်===
ဝေါဟာကၠုၚ်နူ {{der|vi|och|-}} {{och-l|晚|tr={{IPAfont|*m[o][r]ʔ}}}} (B-S) (SV: {{m|vi|vãn}})
====နာမဝိသေသန====
{{vi-adj|[[晚]], [[]], [[]]}}
# လဇုဲ၊ မအိၚ်။
#: {{syn|vi|trễ}}
===ဗီုအက္ခရ်ရောမ===
{{head|vi|romanization}}
# {{sino-vietnamese reading of|悶}}
# {{sino-vietnamese reading of|懣}}
# {{sino-vietnamese reading of|燜}}
ec2slz1jeoinp5kqkmu4ouuvjchuv4m
ဗီုပြၚ်သိုၚ်တၟိ:သေံ-အခိုက်ကၞာ/mwɯːnꟲ
118
286147
385877
2026-04-07T11:09:50Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{reconstruction}} ==သေံ-အခိုက်ကၞာ== ===ကြိယာ=== {{head|tai-pro|ကြိယာ}} # သကဵုထၟူတိုန်။"
385877
wikitext
text/x-wiki
{{reconstruction}}
==သေံ-အခိုက်ကၞာ==
===ကြိယာ===
{{head|tai-pro|ကြိယာ}}
# သကဵုထၟူတိုန်။
hoecbx8womqv0xo9d1yttexzy0b054d
mướn
0
286148
385878
2026-04-07T11:12:49Z
咽頭べさ
33
ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|muon|múon|muón|muôn|muốn|muộn|mượn}} =={{=vi=}}== ===ဗွဟ်ရမ္သာၚ်=== {{vi-IPA}} ====ကြိယာ==== {{vi-verb|[[𠼦]], [[摱]]}} # သကဵုလိၚ်နကဵုသြန်လိၚ်ခၟာၚ်၊ သကဵုလိၚ်ဖျေံ။ #: {{syn|vi|thuê}}"
385878
wikitext
text/x-wiki
{{also|muon|múon|muón|muôn|muốn|muộn|mượn}}
=={{=vi=}}==
===ဗွဟ်ရမ္သာၚ်===
{{vi-IPA}}
====ကြိယာ====
{{vi-verb|[[𠼦]], [[摱]]}}
# သကဵုလိၚ်နကဵုသြန်လိၚ်ခၟာၚ်၊ သကဵုလိၚ်ဖျေံ။
#: {{syn|vi|thuê}}
grl1sofnvmvhrxrijukgznqqwdk3iau