Module:form of: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
No edit summary
Line 5: Line 5:
local m_data = mw.loadData("Module:form of/data")
local m_data = mw.loadData("Module:form of/data")


local function make_labels(inflections)
local function make_labels(inflections, language)
local out = {}
local out = {}
Line 35: Line 35:
local text = l.label or inflection
local text = l.label or inflection
if l.glossary then
if l.glossary then
table.insert(out, "[[Appendix:Glossary#" .. (type(l.glossary) == "string" and l.glossary or text) .. "|" .. text .. "]]")
glosslink = "[[Appendix:Glossary#" .. (type(l.glossary) == "string" and l.glossary or text) .. "|" .. text .. "]]"
if text == "verbal noun" then
glosslink = glosslink .. "[[Category:" .. language.name .. " verbal nouns]]"
end
table.insert(out, glosslink)
else
else
table.insert(out, text)
table.insert(out, text)
Line 53: Line 57:
local link = m_links.full_link(data, "term")
local link = m_links.full_link(data, "term")
if data.inflection then
if data.inflection then
label = make_labels(data.inflection)
label = make_labels(data.inflection, data.language)
else
else
label = m_labels.make_labels(data.language, {[1] = data.form or "alternative form"}, data.nocat, true)
label = m_labels.make_labels(data.language, {[1] = data.form or "alternative form"}, data.nocat, true)
Line 63: Line 67:
local label
local label
if data.inflection then
if data.inflection then
label = make_labels(data.inflection)
label = make_labels(data.inflection, data.language)
else
else
label = data.form or "alternative form"
label = data.form or "alternative form"

Navigation menu