Module:script utilities/data: difference between revisions

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Content deleted Content added
add class to distinguish headword transliteration
mention transliteration should use i tag, as the term itself does, but this can't be rolled out yet
Line 3: Line 3:
data.translit = {
data.translit = {
["term"] = {
["term"] = {
--[=[ can't be done until Kana transliterations are correctly parsed by [[Module:links]]
["tag"] = "i",
]=]
["classes"] = "mention-tr",
["classes"] = "mention-tr",
},
},

Revision as of 15:45, 19 May 2017

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local data = {}

data.translit = {
	["term"] = {
--[=[	can't be done until Kana transliterations are correctly parsed by [[Module:links]]
		["tag"] = "i",
		]=]
		["classes"] = "mention-tr",
	},
	["usex"] = {
		["tag"] = "i",
		["classes"] = "e-transliteration",
	},
	["head"] = {
		["classes"] = "headword-tr",
		["dir"] = "ltr",
	},
	["default"] = {},
}

for key, value in pairs(data.translit) do
	if not value.tag then
		value.tag = "span"
	end
end

data.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",
	},
	["nil"] = {
		tag = "span",
	},
}

return data