Module:rad-stem/templates: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 257: Line 257:
local gender = args['gender'] or args['g'] or "in"
local gender = args['gender'] or args['g'] or "in"
local definite = args['definite'] ~= nil or args['def'] ~= nil
local definite = args['definite'] ~= nil or args['def'] ~= nil or false
local adj = args['adj']
local adj = args['adj']
Line 265: Line 265:
if adj then
if adj then
if not mw.ustring.match(adj, "(ș)$") then error("All adjectives must end in -ș") end
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 )") or 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 definite and 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 )") or 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

Navigation menu