Module:taxonomy

Hello, you have come here looking for the meaning of the word Module:taxonomy. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:taxonomy, but we will also tell you about its etymology, its characteristics and you will know how to say Module:taxonomy in singular and plural. Everything you need to know about the word Module:taxonomy you have here. The definition of the word Module:taxonomy will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:taxonomy, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

Used by {{taxon}} to create definition lines for entries on taxa.


local export = {}

local lang_en = require("Module:languages").getByCode("en")
local lang_mul = require("Module:languages").getByCode("mul")


function export.taxon(frame)
	local params = {
		 = {required = true, default = "{{{1}}}"},
		 = {required = true, default = "{{{2}}}"},
		 = {required = true, default = "{{{3}}}"},
		 = {},
		
		 = {type = "boolean"},
		 = {type = "boolean"},
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	
	local ret = {}
	local categories = {"mul:Taxonomic names (" .. args .. ")"}
	
	table.insert(ret, "A taxonomic ")
	table.insert(ret, require("Module:links").language_link{lang = lang_en, term = args})
	table.insert(ret, " within the ")
	table.insert(ret, require("Module:links").language_link{lang = lang_en, term = args})
	table.insert(ret, " ")
	
	local parent = require("Module:links").language_link{lang = lang_mul, term = args}
	
	if args == "genus" or args == "species" or args then
		parent = "''" .. parent .. "''"
	end
	
	table.insert(ret, parent)
	
	-- Track missing taxonomic name
	parent = mw.title.new(args)
	
	if not (parent and parent.exists) then
		table.insert(categories, "Entries using missing taxonomic name (" .. args .. ")")
	end
	
	-- Vernacular name
	if args then
		table.insert(ret, " – ")
	    table.insert(ret, args)
	else
		table.insert(categories, "Taxonomic names needing vernacular names")
	end
	
	if not args and not (args and string.sub(args, -1) == ".") then
		table.insert(ret, ".")
	end
	
	return table.concat(ret) .. require("Module:utilities").format_categories(categories, lang_mul)
end


return export