Module:head: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 48: Line 48:


local function format_inflections(data)
local function format_inflections(data)
if (not data.inflections) or (#data.inflections < 1) then return nil end
if ((not data.inflections) or (not data.labels)) or (#data.inflections < 1 or #data.labels < 1) then return nil end
local out = {}
local out = {}
for _, inflection in pairs(data.inflections) do
for _, inflection in pairs(data.inflections) do
Line 61: Line 61:
table.insert(out, "''" .. inflection.label .. "'' " .. table.concat(i_forms, ", "))
table.insert(out, "''" .. inflection.label .. "'' " .. table.concat(i_forms, ", "))
end
end
end
for _, label in ipairs(data.labels) do
table.insert(out, "''" .. "[[Appendix:Glossary#" .. label .. "|" .. label .. "]]")
end
end
if #out < 1 then return nil end
if #out < 1 then return nil end

Navigation menu