Module:ClothingInfobox

local categorization = require('Module:Categorization') local i18n = require('Dev:I18n').loadMessages('Module:ClothingInfobox/i18n') local utils = require('Module:Utils')

local categorize = categorization.categorize_in_namespaces('Catalog')

local p = {}

function p._format_clothing_type(args) local clothing_type = args["clothing type"] if not clothing_type then return error(i18n:msg("error-required-parameter-missing", "clothing type")) end return categorize(i18n:msg("cat-clothing-type-" .. clothing_type:lower:gsub("%s", "-"))) .. categorize(i18n:msg("cat-clothing-tech-" .. (clothing_type:lower:match("classic") or "layered") )) end

p.format_clothing_type = utils.make_wrapper_function(p._format_clothing_type)

return p