Module:head/languages: Difference between revisions
Jump to navigation
Jump to search
(Created page with "local export = {} function export.get_args(args, params, inflection_params) for k, _ in pairs(inflection_params) do params[k] = {list = true} end local p = require("Module:parameters").process(args, params) local inflections = {} for k, v in pairs(inflection_params) do local inflection = p[k] inflection["label"] = v["label"] inflection["glossary"] = v["glossary"] table.insert(inflections, inflection) end return p, inflections end return export") |
No edit summary |
||
Line 14: | Line 14: | ||
end | end | ||
return p, inflections | return p, inflections | ||
end | |||
function export.get_term() | |||
return mw.title.getCurrentTitle().text | |||
end | end | ||
return export | return export |
Revision as of 20:00, 6 August 2023
Documentation for this module may be created at Module:head/languages/documentation
local export = {}
function export.get_args(args, params, inflection_params)
for k, _ in pairs(inflection_params) do
params[k] = {list = true}
end
local p = require("Module:parameters").process(args, params)
local inflections = {}
for k, v in pairs(inflection_params) do
local inflection = p[k]
inflection["label"] = v["label"]
inflection["glossary"] = v["glossary"]
table.insert(inflections, inflection)
end
return p, inflections
end
function export.get_term()
return mw.title.getCurrentTitle().text
end
return export