Pāriet uz saturu

Modulis:Ģenitīvs

Vikipēdijas lapa
Dokumentācijas ikona Moduļa dokumentācija[izveidot]
local getArgs = require('Module:Arguments').getArgs
local p = {}

function p._main(args)
	local out = {}
	local currentpage = mw.title.getCurrentTitle()
	local disambigname = mw.ustring.gsub(args.name or currentpage.text, " %b()", "")
	local parts = { 'de','De','fon','Fon','von','Von','du','Du','del','Del','zu','Zu','di','Di','van','Van','na','Na','le','Le','de\'','De\'','der','Der' }
	local names = mw.text.split(disambigname or '', "%s*[- ]%s*")
	for k, v in ipairs(names) do
		local last = mw.ustring.sub(v, -1)
		local rez
		out[k] = string.format(" '%s' <small>[<span style='background:yellow'>%s</span>]</small>", v, last)
			--table.concat(names, ' / ')
			--string.format("* '%s'", v)
	end
	return table.concat(out)
end

function p.main(frame)
	local args = getArgs(frame)
	return p._main(args)
end

return p