Module:yue-pron/hom/list
Appearance
< Module:yue-pron | hom
- The following documentation is located at Module:yue-pron/hom/list/documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
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