Module:interlinear: Difference between revisions
No edit summary |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local data = mw.loadData( 'Module: | local data = mw.loadData( 'Module:interlinear/data' ) | ||
local gloss_override = {} -- for custom gloss abbreviations | local gloss_override = {} -- for custom gloss abbreviations | ||
local getArgs = require('Module:Arguments').getArgs | local getArgs = require('Module:Arguments').getArgs | ||
| Line 30: | Line 30: | ||
combining_gender_numbers = "[0-9][0-9]?$", --e.g. G4 '4th gender' or CL7 'class 7' | combining_gender_numbers = "[0-9][0-9]?$", --e.g. G4 '4th gender' or CL7 'class 7' | ||
combining_gender_prefixes = {G = "gender", CL = "class"}, | combining_gender_prefixes = {G = "gender", CL = "class"}, | ||
combining_person = {["1"] = "first person", ["2"] = "second person", ["3"] = "third person"}, | combining_person = {["1"] = "first person", ["2"] = "second person", ["3"] = "third person",}, | ||
combining_number = {S = "singular", SG = "singular", P = "plural", PL = "plural", D = "dual", DU = "dual", TRI = "trial"}, | combining_number = { | ||
S = "singular", SG = "singular", | |||
P = "plural", PL = "plural", | |||
D = "dual", DU = "dual", | |||
TRI = "trial", PAU = "paucal", COL = "collective", | |||
IN = "inclusive", INC = "inclusive", INCL = "inclusive", | |||
EX = "exclusive", EXC = "exclusive", EXCL = "exclusive" | |||
}, | |||
combining_gender = {F = "feminine", M = "masculine", N = "neuter"}, | combining_gender = {F = "feminine", M = "masculine", N = "neuter"}, | ||
LowerCaseGlosses = {["1sg"] = true, ["2sg"] = true, ["3sg"] = true, ["1du"] = true, ["2du"] = true, ["3du"] = true, ["1pl"] = true, ["2pl"] = true, | LowerCaseGlosses = { | ||
["1sg"] = true, ["2sg"] = true, ["3sg"] = true, | |||
["1du"] = true, ["2du"] = true, ["3du"] = true, | |||
["1pl"] = true, ["2pl"] = true, ["3pl"] = true, | |||
["Fsg"] = true, ["Fpl"] = true, ["Msg"] = true, ["Mpl"] = true, | |||
}, -- these are the non-all-upper-case strings that will be recognised as glossing abbreviations | |||
ErrorHelpLocation = "Template:Interlinear", | ErrorHelpLocation = "Template:Interlinear", | ||
} | } | ||
| Line 45: | Line 56: | ||
WordMargin = "margin-right: 1em;", | WordMargin = "margin-right: 1em;", | ||
WordP = "margin: 0px;", -- the style for the word <p> elements | WordP = "margin: 0px;", -- the style for the word <p> elements | ||
GlossAbbr = "font-variant: small-caps; font-variant-numeric: | GlossAbbr = "font-variant: small-caps; font-variant-numeric: lining-nums; text-transform: lowercase; ", -- won't be applied to gloss abbreviations containing lower-case characters | ||
HiddenText = "display: none;", | HiddenText = "display: none;", | ||
EndDiv = "clear: left; display: block;", -- style of the <div> element at the end of the interlinear display | EndDiv = "clear: left; display: block;", -- style of the <div> element at the end of the interlinear display | ||
| Line 471: | Line 482: | ||
removeBlanks = false, | removeBlanks = false, | ||
parentOnly = true, | parentOnly = true, | ||
wrappers = {'Template: | wrappers = {'Template:Grammatical category label'}, | ||
}) | }) | ||
msg = UserMessages | msg = UserMessages | ||