Module:Interlinear and Module:Interlinear/sandbox: Difference between pages
(Difference between pages)
imported>Santiago Claudio m Replaced "oldstyle" with "lining" |
imported>Santiago Claudio m Replaced "oldstyle" with "lining" |
||
| 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 = { | combining_number = {S = "singular", SG = "singular", P = "plural", PL = "plural", D = "dual", DU = "dual", TRI = "trial"}, | ||
combining_gender = {F = "feminine", M = "masculine", N = "neuter"}, | combining_gender = {F = "feminine", M = "masculine", N = "neuter"}, | ||
LowerCaseGlosses = { | 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 482: | Line 471: | ||
removeBlanks = false, | removeBlanks = false, | ||
parentOnly = true, | parentOnly = true, | ||
wrappers = {'Template: | wrappers = {'Template:Gcl'}, | ||
}) | }) | ||
msg = UserMessages | msg = UserMessages | ||
| Line 564: | Line 553: | ||
then conf.style.WordDiv = conf.style.WordDiv .. 'margin-right: ' .. _spacing .. 'em;' | then conf.style.WordDiv = conf.style.WordDiv .. 'margin-right: ' .. _spacing .. 'em;' | ||
else conf.style.WordDiv = conf.style.WordDiv .. conf.style.WordMargin | else conf.style.WordDiv = conf.style.WordDiv .. conf.style.WordMargin | ||
end | |||
-- right-to-left script | |||
if yesno(args.rtl) == true then | |||
conf.style.WordDiv = string.gsub(conf.style.WordDiv, " left", " right") | |||
end | end | ||
| Line 602: | Line 596: | ||
else _style = tidyCss(_style) end | else _style = tidyCss(_style) end | ||
--line[i].attr holds the attributes for the <p> elements that enclose the words in line i | --line[i].attr holds the attributes for the <p> elements that enclose the words in line i | ||
line[i].attr = {style = conf.style.WordP .. _style} | line[i].attr = { | ||
style = conf.style.WordP .. _style, | |||
dir = (yesno(args.rtl) == true and "rtl" or "ltr") --"auto" | |||
} | |||
local _lang = args["lang" .. i] | local _lang = args["lang" .. i] | ||
| Line 618: | Line 615: | ||
line[1].class = line[1].class .. " uchen" | line[1].class = line[1].class .. " uchen" | ||
line[1].attr.style = line[1].attr.style .. "font-size:1.25em; word-wrap:break-word;" | line[1].attr.style = line[1].attr.style .. "font-size:1.25em; word-wrap:break-word;" | ||
end | end | ||
end | end | ||
| Line 847: | Line 838: | ||
ft_line:attr("style", "clear: left;") | ft_line:attr("style", "clear: left;") | ||
ft_line:wikitext(free_translation) | ft_line:wikitext(free_translation) | ||
end | |||
-- right-to-left script | |||
if yesno(args.rtl) == true then | |||
ft_line:attr("style", "clear: right;") | |||
end | end | ||
if args.bottom and args.bottom ~= "" | if args.bottom and args.bottom ~= "" | ||