Module:mg-spel: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 16: Line 16:
local e = term; local a = term; local c = term; local s = term
local e = term; local a = term; local c = term; local s = term
-- Spanish
-- Spanish
Line 30: Line 31:
s = s:gsub("il", "lh")
s = s:gsub("il", "lh")
s = s:gsub("v", "b")
s = s:gsub("v", "b")
local lh = match(s, "lh")
-- Celtic
-- Celtic
Line 46: Line 48:
table.insert(qs, "Asturian")
table.insert(qs, "Asturian")
table.insert(ret, "* " .. m_l.full_link({term = e, lang = lang}) .. " " .. m_q.format_qualifier(qs) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = e, lang = lang}) .. " " .. m_q.format_qualifier(qs) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = s, lang = lang}) .. " " .. m_q.format_qualifier({"Southern"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = s, lang = lang})
  .. (lh and ", " .. m_l.full_link({term = s:gsub("lh", "j"), lang = lang}) or "")
  .. " " .. m_q.format_qualifier({"Southern"}) .. "\n")
elseif e == s then
elseif e == s then
table.insert(qs, "Spanish")
table.insert(qs, "Spanish")
Line 60: Line 64:
table.insert(ret, "* " .. m_l.full_link({term = e, lang = lang}) .. " " .. m_q.format_qualifier({"Spanish"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = e, lang = lang}) .. " " .. m_q.format_qualifier({"Spanish"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = a, lang = lang}) .. " " .. m_q.format_qualifier({"Asturian"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = a, lang = lang}) .. " " .. m_q.format_qualifier({"Asturian"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = s, lang = lang}) .. " " .. m_q.format_qualifier({"Southern"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = s, lang = lang})
  .. (lh and ", " .. m_l.full_link({term = s:gsub("lh", "j"), lang = lang}) or "")
  .. " " .. m_q.format_qualifier({"Southern"}) .. "\n")
end
end
if c ~= term then
if c ~= term then
table.insert(ret, "* " .. m_l.full_link({term = c, lang = lang})
table.insert(ret, "* " .. m_l.full_link({term = c, lang = lang}) .. " " .. m_q.format_qualifier({"Celtic"}) .. "\n")
  .. (lh and ", " .. m_l.full_link({term = c:gsub("lh", "j"), lang = lang}) or "")
  .. " " .. m_q.format_qualifier({"Celtic"}) .. "\n")
end
end