Module:form of: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 4: Line 4:
local m_links = require("Module:links")
local m_links = require("Module:links")
local m_data = mw.loadData("Module:form of/data")
local m_data = mw.loadData("Module:form of/data")
local function pluralize(word)
local ending = mw.ustring.sub(word, -1)
if ending == "h" and mw.ustring.sub(word, -2, -1) == "s" then ending = "sh" end
if ending == "s" or ending == "z" or ending == "x" or ending == "sh" then
return word .. "es"
end
return word .. "s"
end


local function make_labels(inflections, language)
local function make_labels(inflections, language)
Line 38: Line 47:
if text == "verbal noun" then
if text == "verbal noun" then
glosslink = glosslink .. "[[Category:" .. language.name .. " verbal nouns]]"
glosslink = glosslink .. "[[Category:" .. language.name .. " verbal nouns]]"
end
if text == "diminutive" then
glosslink = glosslink .. "[[Category:" .. language.name .. " diminutive nouns]]"
end
if text == "augmentative" then
glosslink = glosslink .. "[[Category:" .. language.name .. " augmentative nouns]]"
end
end
table.insert(out, glosslink)
table.insert(out, glosslink)