Module:uses lua: Difference between revisions

From Linguifex
Jump to navigation Jump to search
Created page with "local export = {} local concat = table.concat local ipairs = ipairs local process_params = require("Module:parameters").process function export.show(frame) local titles = process_params(frame:getParent().args, { [1] = {required = true, type = "title", list = true, namespace = 828} })[1] for i, mod in ipairs(titles) do titles[i] = ("<li>%s</li>"):format(mod.fullText) end return ([===[<div class="floatright notice-box" style="font-size:smaller;border:1px..."
 
No edit summary
 
Line 14: Line 14:
end
end
return ([===[<div class="floatright notice-box" style="font-size:smaller;border:1px solid var(--wikt-palette-grey,#9e9e9e);display:flex;padding:8px 25px 5px 8px;gap:15px;background:var(--wikt-palette-paleblue,#f8f9fa)">[[File:Lua-logo-nolabel.svg|30px|alt=Lua logo|]]<div>Uses [[Wiktionary:Scribunto|Lua]]:<ul>%s</ul></div></div>]===]):format(concat(titles))
return ([===[<div class="floatright notice-box" style="font-size:smaller;border:1px solid var(--wikt-palette-grey,#9e9e9e);display:flex;padding:8px 25px 5px 8px;gap:15px;background:var(--wikt-palette-paleblue,#f8f9fa)">[[File:Lua-logo-nolabel.svg|30px|alt=Lua logo|]]<div>Uses [[wikt:Wiktionary:Scribunto|Lua]]:<ul>%s</ul></div></div>]===]):format(concat(titles))
end
end


return export
return export

Latest revision as of 17:20, 20 April 2026



local export = {}

local concat = table.concat
local ipairs = ipairs
local process_params = require("Module:parameters").process

function export.show(frame)
	local titles = process_params(frame:getParent().args, {
		[1] = {required = true, type = "title", list = true, namespace = 828}
	})[1]

	for i, mod in ipairs(titles) do
		titles[i] = ("<li>[[:%s]]</li>"):format(mod.fullText)
	end
	
	return ([===[<div class="floatright notice-box" style="font-size:smaller;border:1px solid var(--wikt-palette-grey,#9e9e9e);display:flex;padding:8px 25px 5px 8px;gap:15px;background:var(--wikt-palette-paleblue,#f8f9fa)">[[File:Lua-logo-nolabel.svg|30px|alt=Lua logo|]]<div>Uses [[wikt:Wiktionary:Scribunto|Lua]]:<ul>%s</ul></div></div>]===]):format(concat(titles))
end

return export