A modult a Modul:es-conj/generate documentation/doc lapon tudod dokumentálni
local paradigms = require('Module:es-conj/data/paradigms')
local es_conj = require('Module:es-conj')
local export = {}
function export.list_paradigms(frame)
local ending = frame.args
frame.args = true
local result = {}
for k,v in pairs(paradigms) do
local subpage = "Module:es-conj/data/" .. ending .. '/' .. k
local tests_link = subpage .. "/testcases"
local success, tests_module = pcall(require, tests_link)
local tests, line
if success then
tests = tests_module.run_tests(frame)
table.insert(
result,
"] <small>(" .. tests .. ", ])</small>"
)
else
table.insert(result, "testcases for ] not found")
end
end
local ending_subpage = "Module:es-conj/data/" .. ending
local ending_subpage_tests_link = ending_subpage .. "/testcases"
local ending_subpage_tests = require(ending_subpage_tests_link).run_tests(frame)
return "'''] <small>(" .. ending_subpage_tests .. ", ])</small>" .. "''': \n* " .. table.concat(result, "\n* ")
end
function export.list_paradigms_without_tests(frame)
local ending = frame.args
local result = {}
for k,v in pairs(paradigms) do
local subpage = "Module:es-conj/data/" .. ending .. '/' .. k
local line = "]"
table.insert(result, line)
end
return '** ' .. table.concat(result, "\n** " )
end
function export.show_table_with_numbers(frame)
frame.args = 'example_pattern'
frame.args = 'example_pattern'
return es_conj.verb_table(frame)
end
return export