Module:Cite/TemplateData

From Zelda Wiki, the Zelda encyclopedia

This data is used to auto-generate documentation and validate input for templates backed by Module:Cite.


local Language = require("Module:Language")

return {
	Cite = {
		description = "Citing in-game text.",
		format = "inline",
		paramOrder = {1, 2, "plural", 3, "romanization", "translation", 4, "lang"},
		params = {
			[1] = {
				name = "quote",
				required = true,
				type = "content",
				desc = "The text to cite. Generally speaking, one should quote the [[Guidelines:Canon#Version Differences|latest remake]] of a game."
			},
			[2] = {
				name = "source",
				required = true,
				trim = true,
				nilIfEmpty = true,
				type = "string",
				desc = "The source of the in-game text. Usually this is a speaking character. For written text, cite the source as being text itself if it has a name, otherwise cite its author. A [[:Category:Menus|menu screen]] can also be a source. If the text corresponds to in-game narration, use <code>N/A</code>. If <code>game</code> is a valid game code, then <code>source</code> is treated as a [[Template:Term|term]] subject (unless it's <code>N/A</code>).",
			},
			[3] = {
				name = "game",
				required = true,
				type = "string",
				desc = "A [[Data:Franchise|game code]]. If no such game exists at [[Data:Franchise]] (i.e. any third-party game outside the ''Zelda'' franchise), this field will instead be treated as plain wikitext. In this case, an interwiki link must be used."
			},
			[4] = {
				name = "version",
				type = "content",
				desc = "Can be used to specify a port, game mode, or localization of the game.",
				canOmit = true,
				trim = true,
				nilIfEmpty = true,
			},
			plural = {
				type = "boolean",
				desc = "Typing <code>true</code> in this field causes <code>speaker</code> to be [[Template:Plural|pluralized]], if it is a valid term.",
				canOmit = true,
				trim = true,
				nilIfEmpty = true,
			},
			translation = {
				type = "content",
				desc = "A translation of <code>quote</code> if the quote is not in English.",
				canOmit = true,
				trim = true,
				nilIfEmpty = true,
			},
			lang = {
				type = "string",
				enum = Language.enum(),
				desc = "<p>A language code identifying the game localization cited in <code>quote</code>, if the quote is not from the North American localization.</p><p>Can also be omitted when citing a British localization, but only if that is the only English localization (e.g. {{FPTRR}}).",
				canOmit = true,
				trim = true,
				nilIfEmpty = true,
			},
			romanization = {
				type = "string",
				desc = "Romanization of <code>quote</code> if the quote is not written in the Latin alphabet. This is primarily intended for term references and can be omitted when quoting entire sentences. See examples.",
				canOmit = true,
				trim = true,
				nilIfEmpty = true,
			},
		},
	},
}