Difference between revisions 40007 and 40008 on test2wiki

-- This is a test of scribbling. Using Italian templates from en.wiktionary.
-- Owner SemperBlotto
local p = {}

function p.itadj(frame)
    local pframe = frame:getParent()
    local args = pframe.args
    local stem = args[1] or error("1st parameter (stem of adjective) missing!")
(contracted; show full)
            headword = headword .. stem .. end2 .. "]])"
            return headword
        end
-- 4 ending vowel parameters - specify exactly        
    local end4 = args[5] or error("Either 0, 2 or 4 vowel endings should be supplied!")
    headword = "'''" .. stem .. end1 .. "''' ''m'' (''f'' [[" .. stem .. end2 .. "]], ''m plural
'' [["
    headword = headword .. stem .. end3 .. "]], ''f plural'', [[" .. stem .. end4 .. "]])"
    return headword
    
end

function p.itadv(frame)
    local pframe = frame:getParent()
(contracted; show full)    local cat
    if sort ~= nil then cat = "[[category:Italian nouns|" .. sort .. "]]"
        else cat = "[[category:Italian nouns]]"
    end
    return headword .. cat
end

return p