Module:Script

local p = {}

local utilsTable = require("Module:UtilsTable")

local data = require("Module:Script/Data")

p.Schemas = { Data = { type = "map", required = true, desc = "Key value pairs defining in-game scripts, where the key corresponds to the  parameter of Template:Script.", keys = { type = "string", },		values = { type = "record", properties = { {					name = "fileFormat", type = "string", required = true, desc = "The file format for the script characters.", },				{					name = "defaultSize", type = "number", desc = "If unspecified, the default size will be the size of the character's file.", },				{					name = "charset", type = "array", required = true, items = { type = "string" }, desc = "An array of all the source characters defined for the script.", },			},		},	}, }

p.Templates = { Script = { wip = true, purpose = "Transliterates in-game scripts from their source language (Japanese or English).", format = "inline", params = { [1] = {				name = "scriptId", type = "string", required = true, enum = utilsTable.merge({}, utilsTable.keys(data), { 					reference = "Module:Script/Data" 				}), desc = "Identifier for the language script. The various forms of Hylian are named after the first game in which they were released.", },			[2] = {				name = "text", type = "string", enumDependsOn = "scriptId", enum = function(scriptId) return utilsTable.merge({}, data[scriptId] or {}, {						reference = "Module:Script/Data" 					}) end, split = "", desc = "The text to transliterate into an in-game language.", },		},	}, }

return p