Modul:pendokumenan/functions/Quotation
Penampilan
- Modul ini kekurangan sublaman pendokumenan. Sila mencipta laman pendokumenan berkaitan.
- Pautan berguna: laman akar • sublaman • pautan • transklusi • kes ujian • kotak pasir
return function (title, cats, lang_code, data_suffix)
local lang = require("Modul: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("Modul: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() .. " data modules|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