Модуль:Test

Материал из Справочника наблюдателя
Перейти к:навигация, поиск

(i)      Описание модуля[]

Документация отсутствует!


local p={}

function p.q (alfa)
	local page = mw.title.makeTitle( 'Mediawiki', alfa)
	local res = 'MediaWiki:' .. alfa
	if page.exists then
		res = res .. ' * page exists «' .. mw.ustring.sub( page:getContent(), 1, 40 ) .. '» '
	else
		res = res .. '  * page not exists '
	end
	local msg = mw.message.new (alfa)
	msg = msg:useDatabase( false )
	if msg:exists() then
		res = res .. ' * msg exists «' .. tostring (msg) .. '» '
	else
		res = res .. '  * msg not exists '
	end
	
	local msgru = msg:inLanguage('ru')
	if msgru:exists() then
		res = res .. ' * msgru exists «' .. tostring (msgru) .. '» '
	else
		res = res .. '  * msgru not exists '
	end
	
	return res
end
return p