Module:script utilities/data: Difference between revisions
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 | ||
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 | return data | ||
Revision as of 18:13, 11 January 2025
- The following documentation is located at Module:script utilities/data/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
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