Jump to content

Module:documentation/functions/Quotation

Wiktionary වෙතින්


return function (title, cats, lang_code, data_suffix)
	local lang = require("Module:languages").getByCode(lang_code)
	if not lang then
		return "This module has an invalid language code in the title: <code>" .. lang_code .. "</code>."
	end
	local error_message = ""
	if not require("Module:Quotations").hasData[lang_code] then
		error_message = ' <code class="error">The language code ' .. lang_code
			.. " needs to be added to the <code>hasData</code> table in [[Module:Quotations]].</code>"
	end
	-- Modules where data_suffix == "" could be put in "language modules" categories
	-- instead of "language data modules".
	cats:insert("Quotation data modules|" .. lang_code)
	cats:insert(lang:getCanonicalName() .. " දත්ත මොඩියුල|Quotations")
	return "This module contains data for works in "
		.. lang:makeCategoryLink()
		.. " and is used to format the parameters of <code>{{[[Template:Q|Q]]|" .. lang_code .. "|...}}</code>."
		.. error_message
end
"https://si.wiktionary.org/w/index.php?title=Module:documentation/functions/Quotation&oldid=59433" වෙතින් සම්ප්‍රවේශනය කෙරිණි