Modhul:usex/templates
Dhokumèntasi modhul iki bisa digawé ing Modhul:usex/templates/doc
local export = {}
function export.usex_t(frame)
local params = {
[1] = {required = true},
[2] = {},
[3] = {},
["inline"] = {type = "boolean"},
["noenum"] = {type = "boolean"},
["ref"] = {},
["lit"] = {},
["q"] = {list = true},
["qualifier"] = {alias_of = "qual"},
["sc"] = {},
["source"] = {},
["subst"] = {},
["t"] = {alias_of = 3},
["translation"] = {alias_of = 3},
["tr"] = {},
["transliteration"] = {alias_of = "tr"},
["nocat"] = {type = "boolean"},
}
local quote = (frame.args["quote"] or "") ~= ""
local compat = (frame.args["compat"] or "") ~= ""
local template_inline = (frame.args["inline"] or "") ~= ""
if compat then
params["lang"] = {required = true}
params["t"].alias_of = 2
params["translation"].alias_of = 2
table.remove(params, 1)
end
local args = require("Module:parameters").process(frame:getParent().args, params)
local lang = args[compat and "lang" or 1] or "und"
local sc = args["sc"]
lang = require("Module:languages").getByCode(lang) or require("Module:languages").err(lang, ( compat and "lang" ) or 1)
sc = (sc and (require("Module:scripts").getByCode(sc) or error("The script code \"" .. sc .. "\" is not valid.")) or nil)
local usex = args[compat and 1 or 2]
local translation = args[compat and 2 or 3]
local transliteration = args["tr"]
local noenum = args["noenum"]
local inline = args["inline"] or template_inline
local ref = args["ref"]
local lit = args["lit"]
local substs = args["subst"]
local qualifiers = args["q"]
local source = args["source"]
local nocat = args["nocat"]
return require("Module:usex").format_usex(lang, sc, usex, translation, transliteration, noenum, inline, ref, quote, lit, substs, qualifiers, source, nocat)
end
return export