localm_headword=require("Module:headword")localm_utilities=require("Module:utilities")localexport={}localpos_functions={}locallang=require("Module:languages").getLanguageByCode("roa-jer")-- The main entry point.-- This is the only function that can be invoked from a template.functionexport.show(frame)localargs=frame:getParent().argsPAGENAME=mw.title.getCurrentTitle().textlocalhead=args["head"];ifhead==""thenhead=nilend-- 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.localposcat=frame.args[1]orerror("Part of speech has not been specified. Please pass parameter 1 to the module invocation.")localgenders={}localinflections={}localcategories={"Jèrriais "..poscat}ifpos_functions[poscat]thenpos_functions[poscat](args,genders,inflections,categories)endreturnm_headword.format_headword(head,lang,"Latn")..m_headword.format_genders(genders,lang)..m_headword.format_inflections(inflections,lang,"Latn")..m_utilities.format_categories(categories,lang)end-- This only adds categories for now. The rest of {{roa-jer-noun}} should be added later.pos_functions["nouns"]=function(args,genders,inflections,categories)localgender=args[1]or""ifgender==""thentable.insert(categories,"Jèrriais nouns lacking gender")endlocaltype=args["type"]orargs[2]localplural=args["pl"]orargs["plural"]orPAGENAME..(type=="-"and""or"s")iftype=="plural"thentable.insert(categories,"Jèrriais plurals")table.insert(categories,"Jèrriais pluralia tantum")elseifplural==PAGENAMEthentable.insert(categories,"Jèrriais plurals")endendreturnexport