Modul:th-hom

Üdvözlöm, Ön a Modul:th-hom szó jelentését keresi. A DICTIOUS-ban nem csak a Modul:th-hom szó összes szótári jelentését megtalálod, hanem megismerheted az etimológiáját, a jellemzőit és azt is, hogyan kell a Modul:th-hom szót egyes és többes számban mondani. Minden, amit a Modul:th-hom szóról tudni kell, itt található. A Modul:th-hom szó meghatározása segít abban, hogy pontosabban és helyesebben fogalmazz, amikor beszélsz vagy írsz. AModul:th-hom és más szavak definíciójának ismerete gazdagítja a szókincsedet, és több és jobb nyelvi forráshoz juttat.

A modult a Modul:th-hom/doc lapon tudod dokumentálni

local export = {}
local lang = require("Module:languages").getByCode("th")
local PAGENAME = mw.title.getCurrentTitle().text

local function getHomophones(reading)
	
	return require('Module:th-hom/data') or {}
	
end

-- can be called from another module
function export.makeList(reading)
	
	local result = {}
	local categories = {}
	
	local homList = getHomophones(reading)
	if #homList > 1 then
		for _,term in ipairs(homList) do
			-- skip if same word
			if term ~= PAGENAME then
				table.insert(result, require('Module:links').full_link({lang = lang, term = term, tr = '-'}))
			end
		end
		if mw.title.getCurrentTitle().namespace == 0 then
			table.insert(categories, "Thai terms with homophones")
		end
	end
	
	return table.concat(result, ', ')
		.. require('Module:utilities').format_categories(categories, lang)
	
end

function export.show(frame)
	
	local args = frame:getParent().args
	local reading = args or PAGENAME
	local output = export.makeList(reading)
	
	if output ~= '' then
		output = 'Homophones: ' .. output
	end
	return output
	
end

return export