Kontentke ótiw

Module:Good article topics

Wikipedia — erkin enciklopediya
13:07, 2024 j. maydıń 11 waqtındaǵı Umarxon III (talqılaw | úlesi) (Taza bet jaratıldı: "-- This module implements {{GA/Topic}}. local p = {} function p.main(frame) local topic = frame:getParent().args[1] if not topic then return '' end topic = topic:match('^%s*(.-)%s*$') -- Trim whitespace local ret if topic ~= '' then ret = p._main(topic) end ret = ret or '' return ret end function p._main(topic) topic = topic:lower() local data = mw.loadData('Module:Good article topics/data') return data[topic] end return p") paydalanıwshı versiyası.
(parqı) ← Eskilew nusqası | Eń sońǵı nusqa (parqı) | Jańalaw nusqası→ (parqı)

Bul moduldiń hújjetin Module:Good article topics/doc betinde jarata alasız

-- This module implements {{GA/Topic}}.

local p = {}

function p.main(frame)
	local topic = frame:getParent().args[1]
	if not topic then
		return ''
	end
	topic = topic:match('^%s*(.-)%s*$') -- Trim whitespace
	local ret
	if topic ~= '' then
		ret = p._main(topic)
	end
	ret = ret or ''
	return ret
end

function p._main(topic)
	topic = topic:lower()
	local data = mw.loadData('Module:Good article topics/data')
	return data[topic]
end

return p