Module:rad-stem/templates: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 253: Line 253:
local adj_broken_e = ""
local adj_broken_e = ""
if definite and adj then
if adj then
if not mw.ustring.match(adj, "(ș)$") then error("All adjectives must end in -ș") end
if not (mw.ustring.match(mw.ustring.lower(adj), "^( ?[ui] )") or mw.ustring.match(mw.ustring.lower(adj), "^( ?a [iíỉuúủ])") or mw.ustring.match(mw.ustring.lower(adj), "^( ?a [" .. C .. "])") or mw.ustring.match(adj, "^( ?ag )")) then
if not (mw.ustring.match(mw.ustring.lower(adj), "^( ?[ui] )") or mw.ustring.match(mw.ustring.lower(adj), "^( ?a [iíỉuúủ])") or mw.ustring.match(mw.ustring.lower(adj), "^( ?a [" .. C .. "])") or mw.ustring.match(adj, "^( ?ag )")) then
if gender == "in" then
if gender == "in" then
if mw.ustring.match(mw.ustring.lower(adj), "^([" .. C .. "])") then
if mw.ustring.match(mw.ustring.lower(adj), "^([" .. C .. "])") then
adj = " a " .. adj
adj = "a " .. adj
else
else
adj = " ag " .. adj
adj = "ag " .. adj
end
end
elseif gender == "an" then
elseif gender == "an" then
if mw.ustring.match(mw.ustring.lower(adj), "^([uúủ])") then
if mw.ustring.match(mw.ustring.lower(adj), "^([uúủ])") then
adj = " a " .. adj
adj = "a " .. adj
else
else
adj = " u " .. adj
adj = "u " .. adj
end
end
end
end
end
end
end
if adj then
if not mw.ustring.match(adj, "(ș)$") then error("All adjectives must end in -ș") end
adj_broken = args['adjbreak'] or break_adj(adj)  
adj_broken = args['adjbreak'] or break_adj(adj)  
adj_broken_e = mw.ustring.gsub(adj_broken, "(uș)$", "ûș")
adj_broken_e = mw.ustring.gsub(adj_broken, "(uș)$", "ûș")
Line 326: Line 323:
end
end
-- detect animate --
-- detect animate --
elseif mw.ustring.match(mw.ustring.lower(adj_base), "^( ?[ui] )") or mw.ustring.match(adj_base, "^( ?a [iíỉuúủIÍỈUÚỦ])") then
elseif mw.ustring.match(mw.ustring.lower(adj_base), "^( ?[ui] )") or mw.ustring.match(mw.ustring.lower(adj_base), "^( ?a [iíỉuúủ])") then
definite = true
definite = true
if pl[case] then
if pl[case] then

Navigation menu