A modult a Modul:es-conj/table/doc lapon tudod dokumentálni
local paradigms = require('Module:es-conj/data/paradigms')
local export = {}
function export.create(frame, args, forms, combined)
local ending = args
local pattern = args
local stems = args
local ref = args
local ending_data = deepcopy(require("Module:es-conj/data/"..ending))
local pattern_data
if pattern == ending then
-- or pattern_data = ending_data?Module:es-conj/templates/es-conj
pattern_data = deepcopy(require("Module:es-conj/data/"..ending))
else
pattern_data = deepcopy(require("Module:es-conj/data/"..ending.."/"..pattern))
end
local defective = pattern_data.defective
if not defective then
defective = {}
end
local defective_t = {}
for k1,v1 in pairs(defective) do
defective_t = true
end
if (ending ~= pattern) then
local template_name = paradigms
if (mw.ustring.sub(template_name, 1, 3) == ending) then
template_name = mw.ustring.sub(template_name, 5, mw.ustring.len(template_name))
end
if (mw.ustring.sub(template_name, 1, 1) == '(') then
template_name = mw.ustring.sub(template_name, 2, mw.ustring.len(template_name)-1)
end
local footer = frame:expandTemplate({title = "Spanish conjugation type",
args = { = ending, = template_name}})
--forms = "Other verbs with this conjugation: "..footer
else
forms = ""
end
if (defective_t) then
forms = defective_t
end
if (defective_t) then
forms = defective_t
end
if (defective_t) then
forms = defective_t
end
if (defective_t) then
forms = defective_t
end
if (defective_t) then
forms = defective_t
end
if (ending ~= pattern) then
for k1,v1 in pairs(pattern_data.patterns) do
forms = true
end
end
if (ending ~= pattern) then
forms = ending .. '/' .. mw.ustring.gsub(pattern, "%s+", "_")
else
forms = ending
end
local result = frame:expandTemplate({title = "Template:es-conj/templates/es-conj",
args = forms})
if combined then
if ref then
result = result.."\n"..frame:expandTemplate({title = "Template:es-conj/templates/es-conj-combined-refl", args = combined})
else
result = result.."\n"..frame:expandTemplate({title = "Template:es-conj/templates/es-conj-combined", args = combined})
end
end
return result
end
return export