Module:taln-conj: Difference between revisions

Nehster9 (talk | contribs)
mNo edit summary
Nehster9 (talk | contribs)
mNo edit summary
Line 194: Line 194:
     local forms = {}
     local forms = {}


     for slot, ending in pairs(endings[class]) do
local function get_slot_stem(slot)
        if args[slot] and args[slot] ~= "" then
 
            forms[slot] = args[slot]
     local prefix = mw.ustring.match(slot, "^(.-)_")
        else
 
            forms[slot] = combine(stem, ending)
    if args[prefix .. "_stem"] and args[prefix .. "_stem"] ~= "" then
        end
        return args[prefix .. "_stem"]
     end
     end
    return stem
end
for slot, ending in pairs(endings[class]) do
    if args[slot] and args[slot] ~= "" then
        forms[slot] = args[slot]
    else
        local slot_stem = get_slot_stem(slot)
        forms[slot] = combine(slot_stem, ending)
    end
end


     local text =
     local text =