Module:script utilities/data: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
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",
["tag"] = "i",
]=]
["classes"] = "mention-tr",
["classes"] = "mention-tr",
},
},
Line 22: Line 24:
["classes"] = "headword-ts",
["classes"] = "headword-ts",
["dir"] = "ltr",
["dir"] = "ltr",
},
["usex"] = {
tag = "span",
["classes"] = "e-transcription",
},
},
["default"] = {},
["default"] = {},
Line 32: Line 38:
end
end


data.faces = {
local faces = {}
["term"] = {
 
tag = "b",
faces["term"] = {
class = "mention",
tag = "i",
},
class = "mention",
["term_i"] = {
}
tag = "i",
 
},
faces["head"] = {
["term_nonlatin"] = {
tag = "strong",
tag = "",
class = "headword",
class = "mention",
}
},
 
["head"] = {
faces["hypothetical"] = {
tag = "strong",
prefix = '<span class="hypothetical-star">*</span>',
class = "headword",
tag = "i",
},
class = "hypothetical",
["hypothetical"] = {
}
prefix = '<span class="hypothetical-star">*</span>',
 
tag = "i",
faces["bold"] = {
class = "hypothetical",
tag = "b",
},
}
["bold"] = {
 
tag = "b",
faces["plain"] = {
},
tag = "span",
["translation"] = {
tag = "span",
},
["nil"] = {
tag = "span",
},
["usex"] = {
["tag"] = "i",
},
}
}
faces["translation"] = faces["plain"]
data.faces = faces


return data
return data

Revision as of 18:13, 11 January 2025



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"] = {},
}

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

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

local faces = {}

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

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

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

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

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

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

data.faces = faces

return data