Module:mg-spel: Difference between revisions

Jump to navigation Jump to search
Undo revision 234313 by Sware (talk)
No edit summary
(Undo revision 234313 by Sware (talk))
Tag: Undo
Line 1: Line 1:
local PAGENAME = mw.title.getCurrentTitle().text
local PAGENAME = mw.title.getCurrentTitle().text
local gsub = mw.ustring.gsub
local gsub = mw.ustring.gsub
local match = mw.ustring.match


local lang = require("Module:languages").getByCode("cel-gal")
local lang = require("Module:languages").getByCode("cel-gal")
Line 16: Line 15:
local e = term; local a = term; local c = term; local s = term
local e = term; local a = term; local c = term; local s = term
local lh = match(s, "lh")
-- Spanish
-- Spanish
Line 47: Line 45:
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})
table.insert(ret, "* " .. m_l.full_link({term = s, lang = lang}) .. " " .. m_q.format_qualifier({"Southern"}) .. "\n")
  .. (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 63: Line 59:
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})
table.insert(ret, "* " .. m_l.full_link({term = s, lang = lang}) .. " " .. m_q.format_qualifier({"Southern"}) .. "\n")
  .. (lh and ", " .. m_l.full_link({term = s:gsub("lh", "j"), lang = lang}) or " ")
  .. m_q.format_qualifier({"Southern"}) .. "\n")
end
end

Navigation menu