Difference between revisions 39991 and 39996 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!") local arg2 = args[2] local arg3 = args[3] local arg4 = args[4] local arg5 = args[5] local headword = "'''" .. stem -- no ending parameters - generate default if arg2 == nil then headword = stem .. "o''' ''m''(''f'' [[" .. stem .. "a]], ''m plural " headword = headword .. "[[" .. stem .."i]], ''f plural'' " .. stem .. "e]])" return headword end end⏎ ⏎ function p.itadv(frame) local pframe = frame:getParent() local config = frame.args local args = pframe.args local head = args["head"] local pagename = head or ("'''" .. config.pagename .. "'''") local sort = args["sort"] local cat if sort ~= nil then cat = "[[category:Italian adverbs|" .. sort .. "]]" else cat = "[[category:Italian adverbs]]" end return pagename .. cat end function p.itnoun(frame) local pframe = frame:getParent() local args = pframe.args local stem = args[1] or error("1st parameter (stem of noun) missing!") local gender = args[2] or error("2nd parameter (gender) missing!") local singular = args[3] or error("3rd parameter (singular ending) missing!") local plural = args[4] or error("4th parameter (plural ending) missing!") local headword = "'''" .. stem .. singular .. "''' ''" .. gender .. "'' (''plural'' [[" .. stem .. plural .. "]]" -- if masculine, test for added feminine (and similarly if feminine, test for added masculine) if gender == "m" then local f = args["f"] if f ~= nil then headword = headword .. ", ''feminine singular'' [[" .. f .."]]" end elseif gender == "f" then local m = args["m"] if m ~= nil then headword = headword .. ", ''masculine singular'' [[" .. m .."]]" end else error(gender .. " is an invalid gender.") end headword = headword .. ")" local sort = args["sort"] local cat if sort ~= nil then cat = "[[category:Italian nouns|" .. sort .. "]]" else cat = "[[category:Italian nouns]]" end return headword .. cat end return p All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://test2.wikipedia.org/w/index.php?diff=prev&oldid=39996.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|