Difference between revisions 40110 and 40111 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)    end
    return headword .. cat
end

function p.alts(x,y)
-- For use within p.itconj function.
-- Wikifies term, then adds alternate forms with a comma in between.
    
if x ~= "" then x = "[[" .. x .. "]]" end
    if y ~= nil then return x .. "]], [[" .. y end
    return x
end

function p.itconj(frame)
-- This function builds pretty tables for Italian verb conjugation.
-- It is called by other templates/functions for regular verbs, and called directly for some irregular ones.
(contracted; show full)
    conj = conj .. '| colspan="1" | ' .. inf .. '\n'
    conj = conj .. '|-\n'
    conj = conj .. '! colspan="2" style="background:#e2e4c0" | auxiliary verb\n'
    conj = conj .. '| colspan="1" | ' .. aux ..'\n'
    conj = conj .. '! colspan="2" style="background:#e2e4c0" | gerund\n'
    conj = conj .. '| colspan="2" | 
[[' .. ger .. ']]\n'
    conj = conj .. '|-\n! colspan="2" style="background:#e2e4c0" | present participle\n'
    conj = conj .. '| colspan="1" | [[' .. presp .. ']]\n'
    conj = conj .. '! colspan="2" style="background:#e2e4c0" | past participle\n'
    conj = conj .. '| colspan="2" | [[' .. pastp .. ']]\n'
    conj = conj .. '|-\n! colspan="1" rowspan="2" style="background:#C0C0C0" | person\n'
    conj = conj .. '! colspan="3" style="background:#C0C0C0" | singular\n'
    conj = conj .. '! colspan="3" style="background:#C0C0C0" | plural\n'
    conj = conj .. '|-\n! style="background:#C0C0C0;width:12.5%" | first\n'
(contracted; show full)    conj = conj .. '|-\n'    
    
    conj = conj .. '|}</div></div>'
    return conj
    
end

return p