Module:Term/TemplateData: Difference between revisions
Jump to navigation
Jump to search
TriforceTony (talk | contribs) m (1 revision imported: Author request.) |
PhantomCaleb (talk | contribs) No edit summary |
||
Line 48: | Line 48: | ||
format = "inline", | format = "inline", | ||
paramOrder = {1, 2, 3, 4}, | paramOrder = {1, 2, 3, 4}, | ||
boilerplate = { | |||
hiddenParams = {"redirectTarget"}, | |||
}, | |||
params = { | params = { | ||
[1] = { | [1] = { | ||
Line 77: | Line 80: | ||
desc = "Entering <code>plural</code> here will make the template output the plural term instead of the singular.", | desc = "Entering <code>plural</code> here will make the template output the plural term instead of the singular.", | ||
canOmit = true, | canOmit = true, | ||
}, | |||
redirectTarget = { | |||
type = "string", | |||
desc = "A hidden parameter added by [[Template:Synonym]] to indicate that the storing page redirects to another page." | |||
}, | }, | ||
}, | }, |
Latest revision as of 13:40, 3 September 2023
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