မာတိကာသို့ ခုန်သွားရန်

မဝ်ဂျူ:my-headword

နူ ဝိက်ရှေန်နရဳ

Documentation for this module may be created at မဝ်ဂျူ:my-headword/doc

local export = {}
local pos_functions = {}

local lang = require("Module:languages").getByCode("my")
local script = require("Module:scripts").getByCode("Mymr")
local PAGENAME = mw.title.getCurrentTitle().text

function export.show(frame)

	local args = frame:getParent().args
	local poscat = frame.args[1] or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.")
	
	local head = args["head"] or PAGENAME
	local tr = args["tr"]
	
	local data = {
		lang = lang,
		pos_category = poscat,
		categories = {},
		heads = {head},
		translits = {tr},
		inflections = {}
	}

	if args["cat2"] then
		
	end
	if args["cat3"] then
		
	end

	if pos_functions[poscat] then
		pos_functions[poscat](args, data)
	end

	local content = mw.title.new(PAGENAME):getContent()
	local code = mw.ustring.match(content, "{{my%-IPA[^}]*}}")

	if not code then
		
	end

	return require("Module:headword").full_headword(data)

end

pos_functions["နာမ်"] = function(args, data)

	local classifiers = {label = "နာမ်ပါ်ကၞာတ်"}

	if args[1] then
		for _,par in ipairs(args) do
			if par == "*" then
				table.insert(classifiers, PAGENAME) -- shorthand

				table.insert(data.categories, "နာမ်ဘာသာဗၟာမပါ်ပိုၚ်ခြာအဇာဂကူနူကဵုဝေါဟာ " .. PAGENAME)
			else
				table.insert(classifiers, par)
				table.insert(data.categories, "နာမ်ဘာသာဗၟာမပါ်ပိုၚ်ခြာအဇာဂကူနူကဵုဝေါဟာ " .. par)
			end
		end
		table.insert(data.inflections, classifiers)
	end

end

return export