Module:mg-spel: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 23: Line 23:
a = a:gsub("v", "b")
a = a:gsub("v", "b")
local ea_q = {}
-- Southern
if e ~= term and a ~= term then
s = s:gsub("ñ", "nh")
if e == a then
s = s:gsub("il", "lh")
table.insert(ret, "* " .. m_l.full_link({term = e, lang = lang}) .. " " .. m_q.format_qualifier({"Spanish script", "Asturian script"}) .. "\n")
s = s:gsub("v", "b")
local list = {}
if e ~= term and a ~= term and s ~= term then
if s == e and s ~= a then
table.insert(list, "Spanish script")
table.insert(list, "Southern script")
elseif s == a and s ~= e then
table.insert(list, "Asturian script")
table.insert(list, "Southern script")
elseif e == a and s ~= e then
table.insert(list, "Spanish script")
table.insert(list, "Asturian script")
elseif s == e and s == a then
table.insert(list, "Spanish script")
table.insert(list, "Asturian script")
table.insert(list, "Southern script")
else
else
table.insert(ret, "* " .. m_l.full_link({term = e, lang = lang}) .. " " .. m_q.format_qualifier({"Spanish script"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = e, lang = lang}) .. " " .. m_q.format_qualifier({"Spanish script"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = a, lang = lang}) .. " " .. m_q.format_qualifier({"Asturian script"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = a, lang = lang}) .. " " .. m_q.format_qualifier({"Asturian script"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = s, lang = lang}) .. " " .. m_q.format_qualifier({"Southern script"}) .. "\n")
end
if list then
table.insert(ret, "* " .. m_l.full_link({term = e, lang = lang}) .. " " .. m_q.format_qualifier(list) .. "\n")
end
end
end
end
Line 41: Line 62:
if c ~= term then
if c ~= term then
table.insert(ret, "* " .. m_l.full_link({term = c, lang = lang}) .. " " .. m_q.format_qualifier({"Celtic script"}) .. "\n")
table.insert(ret, "* " .. m_l.full_link({term = c, lang = lang}) .. " " .. m_q.format_qualifier({"Celtic script"}) .. "\n")
end
-- Southern
s = s:gsub("ñ", "nh")
s = s:gsub("il", "lh")
if s ~= term then
table.insert(ret, "* " .. m_l.full_link({term = s, lang = lang}) .. " " .. m_q.format_qualifier({"Southern script"}) .. "\n")
end
end