Module:head/languages: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 2: Line 2:


function export.get_args(args, params, inflection_params)
function export.get_args(args, params, inflection_params)
for k, _ in pairs(inflection_params) do
if inflection_params then
params[k] = {list = true}
for k, _ in pairs(inflection_params) do
params[k] = {list = true}
end
end
end
local p = require("Module:parameters").process(args, params)
local p = require("Module:parameters").process(args, params)
local inflections = {}
local inflections = {}
for k, v in pairs(inflection_params) do
if inflection_params then
local inflection = p[k]
for k, v in pairs(inflection_params) do
inflection["label"] = v["label"]
local inflection = p[k]
inflection["glossary"] = v["glossary"]
inflection["label"] = v["label"]
table.insert(inflections, inflection)
inflection["glossary"] = v["glossary"]
table.insert(inflections, inflection)
end
end
end
return p, inflections
return p, inflections