Module:sish-headword: Difference between revisions

No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 25: Line 25:
local unfd = mw.ustring.toNFD
local unfd = mw.ustring.toNFD
local insert = table.insert
local insert = table.insert
local GR = u(0x0300)
local AC = u(0x0301)
local TILDE = u(0x0303)
local MACRON = u(0x0304)
local DGRAVE = u(0x030F)
local INVBREVE = u(0x0311)
local tonal_accents = GR .. AC .. TILDE .. DGRAVE .. INVBREVE
local vowels = "aeiouаеиоу"
local vowels_that_can_bear_tone = vowels .. "rр"
local V = "[" .. vowels .. "]"


local list_param = {list = true, disallow_holes = true}
local list_param = {list = true, disallow_holes = true}
local boolean_param = {type = "boolean"}
local boolean_param = {type = "boolean"}
-- Table of all valid genders, mapping user-specified gender specs to canonicalized versions.
local valid_genders = {
["m"] = "m-an?",
["?"] = true,
["mfbysense-an"] = true,
["m-an"] = true,
["m-in"] = true,
["f"] = true,
["n"] = true,
["m-p"] = true,
["f-p"] = true,
["n-p"] = true,
}
-- Table of all valid aspects.
local valid_aspects = m_table.listToSet {
"impf", "pf", "both", "biasp", "?",
}


local function ine(val)
local function ine(val)
Line 160: Line 129:
if sc:getCode() == "Latn" then
if sc:getCode() == "Latn" then
other_sc = "Armn"
other_sc = "sish-Armn"
elseif sc:getCode() == "Armn" then
elseif sc:getCode() == "sish-Armn" then
other_sc = "Latn"
other_sc = "Latn"
end
end