Module:script utilities/data: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
local data = {}
local data = {}


data.translit = {
local translit = {
["term"] = {
["term"] = {
--[=[ can't be done until Kana transliterations are correctly parsed by [[Module:links]]
["tag"] = "i",
["tag"] = "i",
]=]
["class"] = "mention-tr",
["classes"] = "mention-tr",
},
},
["usex"] = {
["usex"] = {
["tag"] = "i",
["tag"] = "i",
["classes"] = "e-transliteration",
["class"] = "e-transliteration",
},
},
["head"] = {
["head"] = {
["classes"] = "headword-tr",
["class"] = "headword-tr",
["dir"] = "ltr",
["dir"] = "ltr",
},
},
["default"] = {},
["default"] = {},
}
}
for _, v in next, translit do
if not v.tag then
v.tag = "span"
end
end
data.translit = translit


data.transcription = {
data.transcription = {
["head"] = {
["head"] = {
["tag"] = "span",
["tag"] = "span",
["classes"] = "headword-ts",
["class"] = "headword-ts",
["dir"] = "ltr",
["dir"] = "ltr",
},
},
["usex"] = {
["usex"] = {
tag = "span",
["tag"] = "span",
["classes"] = "e-transcription",
["class"] = "e-transcription",
},
},
["default"] = {},
["default"] = {},
}
}


for key, value in pairs(data.translit) do
data.definition = {
if not value.tag then
["gloss"] = {
value.tag = "span"
["tag"] = "span",
end
["class"] = "mention-gloss",
end
},


local faces = {}
["non-gloss"] = {
["tag"] = "span",
["class"] = "use-with-mention",
},
}


faces["term"] = {
local faces = {
tag = "i",
["term"] = {
class = "mention",
["tag"] = "i",
}
["class"] = "mention",
},


faces["head"] = {
["head"] = {
tag = "strong",
["tag"] = "strong",
class = "headword",
["class"] = "headword",
}
},


faces["hypothetical"] = {
["hypothetical"] = {
prefix = '<span class="hypothetical-star">*</span>',
["prefix"] = '<span class="hypothetical-star">*</span>',
tag = "i",
["tag"] = "i",
class = "hypothetical",
["class"] = "hypothetical",
}
},


faces["bold"] = {
["bold"] = {
tag = "b",
["tag"] = "b",
}
},


faces["plain"] = {
["plain"] = {
tag = "span",
["tag"] = "span",
}
}
}



Latest revision as of 16:29, 17 April 2025



local data = {}

local translit = {
	["term"] = {
		["tag"] = "i",
		["class"] = "mention-tr",
	},

	["usex"] = {
		["tag"] = "i",
		["class"] = "e-transliteration",
	},

	["head"] = {
		["class"] = "headword-tr",
		["dir"] = "ltr",
	},

	["default"] = {},
}

for _, v in next, translit do
	if not v.tag then
		v.tag = "span"
	end
end

data.translit = translit

data.transcription = {
	["head"] = {
		["tag"] = "span",
		["class"] = "headword-ts",
		["dir"] = "ltr",
	},

	["usex"] = {
		["tag"] = "span",
		["class"] = "e-transcription",
	},

	["default"] = {},
}

data.definition = {
	["gloss"] = {
		["tag"] = "span",
		["class"] = "mention-gloss",
	},

	["non-gloss"] = {
		["tag"] = "span",
		["class"] = "use-with-mention",
	},
}

local faces = {
	["term"] = {
		["tag"] = "i",
		["class"] = "mention",
	},

	["head"] = {
		["tag"] = "strong",
		["class"] = "headword",
	},

	["hypothetical"] = {
		["prefix"] = '<span class="hypothetical-star">*</span>',
		["tag"] = "i",
		["class"] = "hypothetical",
	},

	["bold"] = {
		["tag"] = "b",
	},

	["plain"] = {
		["tag"] = "span",
	}
}

faces["translation"] = faces["plain"]

data.faces = faces

return data