Module:Term/TemplateData
Jump to navigation
Jump to search
This data is used to auto-generate documentation and validate input for templates backed by Module:Term.
local p = {}
local Franchise = require("Module:Franchise")
p = {
Term = {
purpose = "Returns the proper singular form of a term for any given topic in {{TLoZ|Series}}. Terms are stored using [[:Template:Term/Store]].",
format = "inline",
params = {
[1] = {
name = "game",
type = "string",
enum = Franchise.enum({ includeSeries = true }),
desc = "The game from which to fetch the term of the given subject. Defaults to <code>Series</code>.",
trim = true,
nilIfEmpty = true,
},
[2] = {
name = "page",
type = "wiki-page-name",
desc = "The name of the page for said subject.",
trim = true,
nilIfEmpty = true,
},
[3] = {
name = "link",
type = "string",
desc = "Entering anything in this field will output the result as a link. (Enter <code>link</code> for standardization)",
trim = true,
nilIfEmpty = true,
},
display = {
type = "string",
desc = "Alternative display text for term.",
trim = true,
nilIfEmpty = true,
},
section = {
type = "string",
desc = "Section of <code>page</code> to link to.",
trim = true,
nilIfEmpty = true,
},
}
},
["Term/Store"] = {
purpose = "Used in article leads to store [[Guidelines:Terminology|terms]], for use by [[Template:Term]] and other modules.",
format = "inline",
paramOrder = {1, 2, 3, 4},
boilerplate = {
hiddenParams = {"redirectTarget"},
},
params = {
[1] = {
name = "singularTerm",
type = "string",
required = true,
desc = "The singular form of the term.",
},
[2] = {
name = "pluralTerm",
type = "string",
required = true,
desc = "The plural form of the term. Leave empty for characters or other terms where no plural form applies.",
trim = true,
},
[3] = {
name = "games",
type = "string",
required = true,
enum = Franchise.enum({ includeSeries = true }),
desc = "Comma-separated list of games to which the term applies. For example, <code>OoT, SS, BotW</code>.",
split = true,
trim = true,
nilIfEmpty = true,
},
[4] = {
name = "plural",
type = "string",
desc = "Entering <code>plural</code> here will make the template output the plural term instead of the singular.",
canOmit = true,
},
redirectTarget = {
type = "string",
desc = "A hidden parameter added by [[Template:Synonym]] to indicate that the storing page redirects to another page."
},
},
},
}
p.Plural = p.Term
return p