10,735
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
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 )")) 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 )") 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 | ||
Line 327: | Line 327: | ||
--adjust definite article -- | --adjust definite article -- | ||
-- detect inanimate -- | -- detect inanimate -- | ||
if mw.ustring.match(mw.ustring.lower(adj_base), "^( ?a [" .. C .. "])") or mw.ustring.match(adj_base, "^( ?ag )") then | if mw.ustring.match(mw.ustring.lower(adj_base), "^( ?a [" .. C .. "])") or mw.ustring.match(adj_base, "^( ?ag )") or mw.ustring.match(mw.ustring.lower(adj_base), "( a [" .. C .. "])") or mw.ustring.match(adj_base, "( ag )") then | ||
definite = true | definite = true | ||
if oblique_pl[case] then | if oblique_pl[case] then | ||
adj_base = mw.ustring.gsub(adj_base, "^( ?)ag ([iíỉIÍỈ])", "%1a' %2") | adj_base = mw.ustring.gsub(adj_base, "^( ?)ag ([iíỉIÍỈ])", "%1a' %2") | ||
adj_base = mw.ustring.gsub(adj_base, "^( ?)ag? ", "%1ai ") | adj_base = mw.ustring.gsub(adj_base, "^( ?)ag? ", "%1ai ") | ||
adj_base = mw.ustring.gsub(adj_base, " ag ([iíỉIÍỈ])", " a' %1") | |||
adj_base = mw.ustring.gsub(adj_base, " ag? ", " ai ") | |||
elseif case == "genpl_short" or case == "gendu_short" then | elseif case == "genpl_short" or case == "gendu_short" then | ||
adj_base = mw.ustring.gsub(adj_base, "^( ?)ag? ", "%1ais ") | adj_base = mw.ustring.gsub(adj_base, "^( ?)ag? ", "%1ais ") | ||
adj_base = mw.ustring.gsub(adj_base, " ag? ", " ais ") | |||
elseif case == "gen_short" then | elseif case == "gen_short" then | ||
adj_base = mw.ustring.gsub(adj_base, "^( ?)ag? ", "%1as ") | adj_base = mw.ustring.gsub(adj_base, "^( ?)ag? ", "%1as ") | ||
adj_base = mw.ustring.gsub(adj_base, " ag? ", " as ") | |||
case = "gen" | case = "gen" | ||
end | end | ||
-- detect animate -- | -- detect animate -- | ||
elseif mw.ustring.match(mw.ustring.lower(adj_base), "^( ?[ui] )") or mw.ustring.match(mw.ustring.lower(adj_base), "^( ?a [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úủ])") or 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 | ||
adj_base = mw.ustring.gsub(adj_base, "^( ?)[au] ([iíỉIÍỈ])", "%1a %2") | adj_base = mw.ustring.gsub(adj_base, "^( ?)[au] ([iíỉIÍỈ])", "%1a %2") | ||
adj_base = mw.ustring.gsub(adj_base, "^( ?)[au] ", "%1i ") | adj_base = mw.ustring.gsub(adj_base, "^( ?)[au] ", "%1i ") | ||
adj_base = mw.ustring.gsub(adj_base, " [au] ([iíỉIÍỈ])", " a %1") | |||
adj_base = mw.ustring.gsub(adj_base, " [au] ", " i ") | |||
elseif case == "genpl_short" or case == "gendu_short" then | elseif case == "genpl_short" or case == "gendu_short" then | ||
adj_base = mw.ustring.gsub(adj_base, "^( ?)[aiu] ", "%1is ") | adj_base = mw.ustring.gsub(adj_base, "^( ?)[aiu] ", "%1is ") | ||
adj_base = mw.ustring.gsub(adj_base, " [aiu] ", " is ") | |||
elseif case == "gen_short" then | elseif case == "gen_short" then | ||
adj_base = mw.ustring.gsub(adj_base, "^( ?)[aiu] ", "%1us ") | adj_base = mw.ustring.gsub(adj_base, "^( ?)[aiu] ", "%1us ") | ||
adj_base = mw.ustring.gsub(adj_base, " [aiu] ", " us ") | |||
case = "gen" | case = "gen" | ||
end | end |