İçeriğe atla

Modül:Koruma kutu/config: Revizyonlar arasındaki fark

Sanarşiv, sanat ansiklopedisi
Sayfa içeriği "-- Module:Protection -- Sanarşiv uyarlaması -- Yapı: Wikipedia Module:Protection ile aynıdır local p = {} local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local imageLinks = { edit = { default = 'Sanarşiv:Koruma_politikası#tam', templateeditor = 'Sanarşiv:Koruma_politikası#şablon', autoconfirmed = 'Sanarşiv:Koruma_politikası#yarı' }, move = {..." ile değiştirildi
Etiketler: İçerik değiştirildi Geri alındı
Değişiklik özeti yok
Etiket: Geri alındı
1. satır: 1. satır:
-- Module:Protection
-- This module provides configuration data for [[Module:Protection banner]].
-- Sanarşiv uyarlaması
-- Yapı: Wikipedia Module:Protection ile aynıdır


local p = {}
return {


local getArgs = require('Module:Arguments').getArgs
--------------------------------------------------------------------------------
local yesno = require('Module:Yesno')
--
--                                BANNER DATA
--
--------------------------------------------------------------------------------


local lang = mw.language.getContentLanguage()
masterBanner = {
text = '${INTROBLURB}',
explanation = '${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPBLURB}',
link = '${IMAGELINK}',
alt = 'Page ${PROTECTIONLEVEL}'
},


local imageLinks = {
defaultBanners = {
edit = {},
move = {},
autoreview = {
autoconfirmed = {
alt = 'Page protected with pending changes level 1',
tooltip = 'All edits by unregistered and new users are subject to review',
image = 'Yarı-koruma.svg'
},
default = {
alt = 'Page protected with pending changes level 2',
tooltip = 'All edits by users who are not reviewers or administrators are'
.. ' subject to review',
image = 'Padlock-orange.svg'
}
},
upload = {}
},
 
banners = {
edit = {
blp = {
description = 'For pages protected to promote compliance with the'
.. ' [[Sanarşiv:Biographies of living persons'
.. '|biographies of living persons]] policy',
text = '[[Sanarşiv:Yaşayan insanların biyografileri|'
.. 'Yaşayan insanların biyografileri]] ihlallerinin önüne geçilmesi'
.. ' adına ${INTROFRAGMENT}',
tooltip = 'Yaşayan insanların biyografileri politikasının ihlallerinin'
.. ' önüne geçilmesi adına ${TOOLTIPFRAGMENT}',
},
dmca = {
description = 'For pages protected by the Wikimedia Foundation'
.. ' due to [[Digital Millennium Copyright Act]] takedown requests',
explanation = function (protectionObj, args)
local ret = 'Pursuant to a rights owner notice under the Digital'
.. ' Millennium Copyright Act (DMCA) regarding some content'
.. ' in this article, the Wikimedia Foundation acted under'
.. ' applicable law and took down and restricted the content'
.. ' in question.'
if args.notice then
ret = ret .. ' A copy of the received notice can be found here: '
.. args.notice .. '.'
end
ret = ret .. ' For more information, including websites discussing'
.. ' how to file a counter-notice, please see'
.. " [[Sanarşiv:Office actions]] and the article's ${TALKPAGE}."
.. "'''Do not remove this template from the article until the"
.. " restrictions are withdrawn'''."
return ret
end,
image = 'Vakıf-koruması.svg',
},
dispute = {
description = 'For pages protected due to editing disputes',
text = function (protectionObj, args)
local display = 'anlaşmazlık'
local disputes
if args.section then
disputes = string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[protectionObj.title.namespace].talk.name,
protectionObj.title.text,
args.section,
display
)
else
disputes = display
end
 
local msg
if type(protectionObj.expiry) == 'number' then
msg = '${INTROFRAGMENT} Koruma, içerik anlaşmazlığı çözülene kadar sürebilir.'
else
msg = '${INTROFRAGMENT} Koruma, içerik anlaşmazlıkları çözülene dek sürecektir.'
end
return string.format(msg, disputes)
end,
explanation = "Bu koruma ${CURRENTVERSION} onaylandığı anlamına '''gelmez'''."
.. ' ${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPFRAGMENT} içerik anlaşmazlıkları nedeniyle',
},
template = {
description = 'For [[Sanarşiv:High-risk templates|high-risk]]'
.. ' templates and Lua modules',
text = 'Bu ${PAGETYPE}, [[Sanarşiv:Yüksek riskli şablonlar|yüksek risk]] nedeniyle'
.. ' süresiz olarak [[Yardım:Koruma|koruma]] altındadır.',
explanation = 'Lütfen yapılması gerektiğini düşündüğünüz değişiklikleri'
.. ' ${TALKPAGE}nda tartışın.'
}
},
move = {},
autoreview = {},
upload = {}
},
 
imageLinks = {
edit = {
edit = {
default = 'Sanarşiv:Koruma_politikası#tam',
default = 'Sanarşiv:Koruma politikası#full',
templateeditor = 'Sanarşiv:Koruma_politikası#şablon',
templateeditor = 'Sanarşiv:Protection policy#template',
autoconfirmed = 'Sanarşiv:Koruma_politikası#yarı'
autoconfirmed = 'Sanarşiv:Koruma politikası#semi'
},
},
move = {
move = {
default = 'Sanarşiv:Koruma_politikası#taşıma'
default = 'Sanarşiv:Koruma politikası#move'
},
autoreview = {
autoconfirmed = 'Sanarşiv:Protection policy#pc1',
reviewer = 'Sanarşiv:Protection policy#pc2'
},
},
upload = {
upload = {
default = 'Sanarşiv:Koruma_politikası#yükleme'
default = 'Sanarşiv:Protection policy#upload'
}
}
},
msg = {
['explanation-blurb-nounprotect'] = 'See the [[Sanarşiv:Koruma politikası|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Sanarşiv:Administrators|administrator]] to make an edit if it'
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by [[Sanarşiv:Consensus'
.. '|consensus]].'
}
}


local messages = {
['explanation-blurb-nounprotect'] =
'Bkz. [[Sanarşiv:Koruma_politikası|koruma politikası]] ve ${PROTECTIONLOG}.',
['protectionlog'] = '[[Özel:Günlük/protect|koruma günlüğü]]',
['reason-edit'] =
'Bu sayfa vandalizm veya politika ihlalleri nedeniyle korunmaktadır.',
['reason-move'] =
'Bu sayfa uygunsuz taşıma girişimlerini önlemek için korunmaktadır.',
['reason-upload'] =
'Bu dosya telif veya lisans sorunları nedeniyle korunmaktadır.'
}
}
local function makeWikilink(page, text)
if not page then
return ''
end
if text then
return string.format('[[%s|%s]]', page, text)
end
return string.format('[[%s]]', page)
end
local function getProtectionLogLink()
return messages['protectionlog']
end
local function getExplanation()
return mw.ustring.gsub(
messages['explanation-blurb-nounprotect'],
'%${PROTECTIONLOG}',
getProtectionLogLink()
)
end
function p.main(frame)
local args = getArgs(frame)
local action = args.action or 'edit'
local level = args.level or 'default'
local reason = args.reason
local policyLink =
imageLinks[action]
and imageLinks[action][level]
or imageLinks[action]
and imageLinks[action].default
local text = {}
if policyLink then
table.insert(text, makeWikilink(policyLink))
end
if reason and messages['reason-' .. reason] then
table.insert(text, messages['reason-' .. reason])
end
table.insert(text, getExplanation())
return table.concat(text, ' ')
end
return p

14.24, 31 Aralık 2025 tarihindeki hâli

Bu modül Modül:Koruma kutu için konfigürasyon verilerini içerir. Daha detaylı bilgi için modüldeki yorumlara göz atabilirsiniz.


-- This module provides configuration data for [[Module:Protection banner]].

return {

--------------------------------------------------------------------------------
--
--                                BANNER DATA
--
--------------------------------------------------------------------------------

masterBanner = {
	text = '${INTROBLURB}',
	explanation = '${EXPLANATIONBLURB}',
	tooltip = '${TOOLTIPBLURB}',
	link = '${IMAGELINK}',
	alt = 'Page ${PROTECTIONLEVEL}'
},

defaultBanners = {
	edit = {},
	move = {},
	autoreview = {
		autoconfirmed = {
			alt = 'Page protected with pending changes level 1',
			tooltip = 'All edits by unregistered and new users are subject to review',
			image = 'Yarı-koruma.svg'
		},
		default = {
			alt = 'Page protected with pending changes level 2',
			tooltip = 'All edits by users who are not reviewers or administrators are'
				.. ' subject to review',
			image = 'Padlock-orange.svg'
		}
	},
	upload = {}
},

banners = {
	edit = {
		blp = {
			description = 'For pages protected to promote compliance with the'
				.. ' [[Sanarşiv:Biographies of living persons'
				.. '|biographies of living persons]] policy',
			text = '[[Sanarşiv:Yaşayan insanların biyografileri|'
				.. 'Yaşayan insanların biyografileri]] ihlallerinin önüne geçilmesi'
				.. ' adına ${INTROFRAGMENT}',
			tooltip = 'Yaşayan insanların biyografileri politikasının ihlallerinin'
				.. ' önüne geçilmesi adına ${TOOLTIPFRAGMENT}',
		},
		dmca = {
			description = 'For pages protected by the Wikimedia Foundation'
				.. ' due to [[Digital Millennium Copyright Act]] takedown requests',
			explanation = function (protectionObj, args)
				local ret = 'Pursuant to a rights owner notice under the Digital'
					.. ' Millennium Copyright Act (DMCA) regarding some content'
					.. ' in this article, the Wikimedia Foundation acted under'
					.. ' applicable law and took down and restricted the content'
					.. ' in question.'
				if args.notice then
					ret = ret .. ' A copy of the received notice can be found here: '
						.. args.notice .. '.'
				end
				ret = ret .. ' For more information, including websites discussing'
					.. ' how to file a counter-notice, please see'
					.. " [[Sanarşiv:Office actions]] and the article's ${TALKPAGE}."
					.. "'''Do not remove this template from the article until the"
					.. " restrictions are withdrawn'''."
				return ret
			end,
			image = 'Vakıf-koruması.svg',
		},
		dispute = {
			description = 'For pages protected due to editing disputes',
			text = function (protectionObj, args)
				local display = 'anlaşmazlık'
				local disputes
				if args.section then
					disputes = string.format(
						'[[%s:%s#%s|%s]]',
						mw.site.namespaces[protectionObj.title.namespace].talk.name,
						protectionObj.title.text,
						args.section,
						display
					)
				else
					disputes = display
				end

				local msg
				if type(protectionObj.expiry) == 'number' then
					msg = '${INTROFRAGMENT} Koruma, içerik anlaşmazlığı çözülene kadar sürebilir.'
				else
					msg = '${INTROFRAGMENT} Koruma, içerik anlaşmazlıkları çözülene dek sürecektir.'
				end
				return string.format(msg, disputes)
			end,
			explanation = "Bu koruma ${CURRENTVERSION} onaylandığı anlamına '''gelmez'''."
				.. ' ${EXPLANATIONBLURB}',
			tooltip = '${TOOLTIPFRAGMENT} içerik anlaşmazlıkları nedeniyle',
		},
		template = {
			description = 'For [[Sanarşiv:High-risk templates|high-risk]]'
				.. ' templates and Lua modules',
			text = 'Bu ${PAGETYPE}, [[Sanarşiv:Yüksek riskli şablonlar|yüksek risk]] nedeniyle'
				.. ' süresiz olarak [[Yardım:Koruma|koruma]] altındadır.',
			explanation = 'Lütfen yapılması gerektiğini düşündüğünüz değişiklikleri'
				.. ' ${TALKPAGE}nda tartışın.'
		}
	},
	move = {},
	autoreview = {},
	upload = {}
},

imageLinks = {
	edit = {
		default = 'Sanarşiv:Koruma politikası#full',
		templateeditor = 'Sanarşiv:Protection policy#template',
		autoconfirmed = 'Sanarşiv:Koruma politikası#semi'
	},
	move = {
		default = 'Sanarşiv:Koruma politikası#move'
	},
	autoreview = {
		autoconfirmed = 'Sanarşiv:Protection policy#pc1',
		reviewer = 'Sanarşiv:Protection policy#pc2'
	},
	upload = {
		default = 'Sanarşiv:Protection policy#upload'
	}
},

msg = {
	['explanation-blurb-nounprotect'] = 'See the [[Sanarşiv:Koruma politikası|'
		.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
		.. ' Please discuss any changes on the ${TALKPAGE}; you'
		.. ' may ${EDITREQUEST} to ask an'
		.. ' [[Sanarşiv:Administrators|administrator]] to make an edit if it'
		.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'
		.. '|uncontroversial]] or supported by [[Sanarşiv:Consensus'
		.. '|consensus]].'
}

}