Module:siwa-headword: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 10: Line 10:
-- This is the only function that can be invoked from a template.
-- This is the only function that can be invoked from a template.
function export.show(frame)
function export.show(frame)
local fargs = frame:getParent().args
-- The part of speech. This is also the name of the category that
-- entries go in. However, the two are separate (the "cat" parameter)
-- because you sometimes want something to behave as an adjective without
-- putting it in the adjectives category.
local poscat = frame.fargs[1] or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.")
local PAGENAME = mw.title.getCurrentTitle().text
local PAGENAME = mw.title.getCurrentTitle().text
local params = {
local params = {
Line 21: Line 29:
end
end
local poscat = frame.args[1]
--local data = {lang = lang, pos_category = (postype and postype .. " " or "") .. poscat, categories = {}, heads = {head}, genders = {}, inflections = {}}
--local data = {lang = lang, pos_category = (postype and postype .. " " or "") .. poscat, categories = {}, heads = {head}, genders = {}, inflections = {}}