Module:taln-conj: Difference between revisions

Nehster9 (talk | contribs)
mNo edit summary
m Sware moved page Module:tln-conj to Module:taln-conj without leaving a redirect
 
(9 intermediate revisions by one other user not shown)
Line 98: Line 98:
}
}


local function get_group_stem(args, group)
----------------------------------------------------------------
-- IRREGULAR VERBS
----------------------------------------------------------------
 
local irregulars = {
 
    ["ᠢᠷᠡ"] = {


    if args[group .. "_lexeme"] and args[group .. "_lexeme"] ~= "" then
        pres_1s = "ᠸᠣ",
         return args[group .. "_lexeme"]
        pres_2s = "ᠸᠠᠢᠰ",
     end
        pres_3s = "ᠸᠠᠢᠲ",
        pres_1p = "ᠸᠠᠢᠨᠤᠰ",
        pres_2p = "ᠸᠠᠢᠰ",
        pres_3p = "ᠸᠣᠨ",
        past_1s = "ᠣᠯᠠᠢ",
        past_2s = "ᠣᠯᠠᠢᠰᠲᠢ",
        past_3s = "ᠣᠯᠠᠢᠲ",
        past_1p = "ᠣᠯᠠᠢᠨᠤᠰ",
        past_2p = "ᠣᠯᠠᠢᠰᠲᠢᠰ",
         past_3p = "ᠣᠯᠡᠷᠤᠨ"
 
     }


    return nil
}
end


----------------------------------------------------------------
----------------------------------------------------------------
Line 255: Line 271:


     if args[slot] and args[slot] ~= "" then
     if args[slot] and args[slot] ~= "" then
         forms[slot] = args[slot]
         forms[slot] = args[slot]


     else
     elseif irregulars[title]
        local slot_stem = get_slot_stem(args, slot)
      and irregulars[title][slot] then
        local group = mw.ustring.match(slot, "^(.-)_")


local group_stem = get_group_stem(args, group)
        forms[slot] = irregulars[title][slot]


local base_stem = group_stem or get_slot_stem(args, slot) or stem
    else


forms[slot] = combine(base_stem, ending)
        forms[slot] = combine(stem, ending)


     end
     end