Module:script utilities/data: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
local data = {} | local data = {} | ||
local translit = { | |||
["term"] = { | ["term"] = { | ||
["tag"] = "i", | ["tag"] = "i", | ||
[" | ["class"] = "mention-tr", | ||
}, | }, | ||
["usex"] = { | ["usex"] = { | ||
["tag"] = "i", | ["tag"] = "i", | ||
[" | ["class"] = "e-transliteration", | ||
}, | }, | ||
["head"] = { | ["head"] = { | ||
[" | ["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", | ||
[" | ["class"] = "headword-ts", | ||
["dir"] = "ltr", | ["dir"] = "ltr", | ||
}, | }, | ||
["usex"] = { | ["usex"] = { | ||
tag = "span", | ["tag"] = "span", | ||
[" | ["class"] = "e-transcription", | ||
}, | }, | ||
["default"] = {}, | ["default"] = {}, | ||
} | } | ||
data.definition = { | |||
["gloss"] = { | |||
["tag"] = "span", | |||
["class"] = "mention-gloss", | |||
}, | |||
["non-gloss"] = { | |||
["tag"] = "span", | |||
["class"] = "use-with-mention", | |||
}, | |||
} | |||
faces["term"] = { | 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", | |||
} | |||
} | } | ||
Latest revision as of 16:29, 17 April 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 = {}
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