Module:Sandbox/Erutuon/Glossing abbreviations: Difference between revisions

Content deleted Content added
fixed
remove final periods, convert to lowercase; add more
Line 8:
["2p"] = "second person plural",
["3p"] = "third person plural",
["ind"] = "indicative mood",
["sjv"] = "subjunctive mood",
["part"] = "participle",
["imp"] = "imperative",
}
 
data["sbjv"] = data["sjv"]
 
function p.abbr(frame)
local args = frame:getParent().args[1] and frame:getParent().args or frame.args
local abbreviation = args[1] or error("Provide an abbreviation in parameter 1")
local expandedkey = data[abbreviation] or error("The abbreviation ".string.gsub(abbreviation or, "nil").%.$", is not recognized"")
key = string.lower(key)
local expanded = data[key] or error("The abbreviation "..(abbreviation or "nil").." is not recognized")
return '<abbr title="'..expanded..'">'..abbreviation..'</abbr>'
end