Module:pollasena-roots: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 7: Line 7:
local match = mw.ustring.match
local match = mw.ustring.match
local gmatch = mw.ustring.gmatch
local gmatch = mw.ustring.gmatch
local lang = require("Module:languages").getByCode("socl")


local export = {}
local export = {}
Line 33: Line 31:
local args = require("Module:parameters").process(frame:getParent().args, params)
local args = require("Module:parameters").process(frame:getParent().args, params)
local code = frame.args[1]
local lang = require("Module:languages").getByCode(code)


local links = {}; local categories = {}; local alts = {};
local links = {}; local categories = {}; local alts = {};
Line 58: Line 59:
table.insert(alts, arg)
table.insert(alts, arg)
elseif prefix == "c" then
elseif prefix == "c" then
table.insert(categories, "Soc'ul' terms from Wascotl *" .. arg)
table.insert(categories, lang:getCanonicalName() .. " terms from Wascotl *" .. arg)
table.insert(alts, term)
table.insert(alts, term)
end
end
elseif prefix == "a" then
elseif prefix == "a" then
table.insert(links, link(term, arg))
table.insert(links, link(term, arg))
table.insert(categories, "Soc'ul' terms from Wascotl *" .. term)
table.insert(categories, lang:getCanonicalName() .. " terms from Wascotl *" .. term)
table.insert(alts, arg)
table.insert(alts, arg)
elseif prefix == "c" then
elseif prefix == "c" then
table.insert(links, link(term))
table.insert(links, link(term))
table.insert(categories, "Soc'ul' terms from Wascotl *" .. arg)
table.insert(categories, lang:getCanonicalName() .. " terms from Wascotl *" .. arg)
table.insert(alts, term)
table.insert(alts, term)
end
end
Line 73: Line 74:
else
else
table.insert(links, link(args[a][i]))
table.insert(links, link(args[a][i]))
table.insert(categories, "Soc'ul' terms from Wascotl *" .. args[a][i])
table.insert(categories, lang:getCanonicalName() .. " terms from Wascotl *" .. args[a][i])
table.insert(alts, args[a][i])
table.insert(alts, args[a][i])
end
end

Navigation menu