Module:yue-pron/hom/list

Wiktionary වෙතින්
This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local export = {}

function export.show(frame)
	local hom = mw.loadData("Module:yue-pron/hom")
	local link = require("Module:zh/link").link
	local text = {}
	for jyutping, homophones in pairs(hom) do
		local append = "\n* " .. jyutping .. ": "
		local hom = {}
		for _, homophone in ipairs(homophones) do
			table.insert(hom, link(nil, nil, { homophone, tr = "-" }))
		end
		append = append .. table.concat(hom, ", ")
		table.insert(text, append)
	end
	table.sort(text)
	return 	"A list of the Cantonese homophones available:" .. table.concat(text)
end

return export
"https://si.wiktionary.org/w/index.php?title=Module:yue-pron/hom/list&oldid=38298" වෙතින් සම්ප්‍රවේශනය කෙරිණි