More Info
KPOP Image Download
  • Top University
  • Top Anime
  • Home Design
  • Top Legend



  1. ENSIKLOPEDIA
  2. Modul:WikidataCheck - Wikipedia bahasa Indonesia, ensiklopedia bebas
Modul:WikidataCheck - Wikipedia bahasa Indonesia, ensiklopedia bebas

Modul:WikidataCheck

  • ak:Module:WikidataCheck
  • አማርኛ
  • العربية
  • الدارجة
  • مصرى
  • অসমীয়া
  • Asturianu
  • Авар
  • Azərbaycanca
  • تۆرکجه
  • Basa Bali
  • Беларуская (тарашкевіца)
  • भोजपुरी
  • বাংলা
  • Bosanski
  • Cebuano
  • کوردی
  • Čeština
  • Cymraeg
  • Dansk
  • Ελληνικά
  • English
  • Español
  • Eesti
  • فارسی
  • Suomi
  • Føroyskt
  • Français
  • Furlan
  • Gaeilge
  • Galego
  • گیلکی
  • ગુજરાતી
  • Hausa
  • हिन्दी
  • Fiji Hindi
  • Hrvatski
  • Magyar
  • Արեւմտահայերէն
  • Ilokano
  • Íslenska
  • Italiano
  • 日本語
  • Jawa
  • ქართული
  • Qaraqalpaqsha
  • ಕನ್ನಡ
  • 한국어
  • Kurdî
  • Ligure
  • Lombard
  • ລາວ
  • Lietuvių
  • Latviešu
  • मैथिली
  • Мокшень
  • Minangkabau
  • Македонски
  • മലയാളം
  • Bahasa Melayu
  • မြန်မာဘာသာ
  • Napulitano
  • Norsk nynorsk
  • ଓଡ଼ିଆ
  • ਪੰਜਾਬੀ
  • پښتو
  • Português
  • Română
  • Tarandíne
  • Ikinyarwanda
  • Sardu
  • Scots
  • Srpskohrvatski / српскохрватски
  • တႆး
  • සිංහල
  • Simple English
  • Slovenščina
  • Anarâškielâ
  • Српски / srpski
  • Sunda
  • Sakizaya
  • తెలుగు
  • ไทย
  • Türkmençe
  • Tagalog
  • Türkçe
  • Українська
  • اردو
  • Oʻzbekcha / ўзбекча
  • Vèneto
  • Tiếng Việt
  • Winaray
  • 中文
  • 閩南語 / Bân-lâm-gú
  • 粵語
Sunting pranala
  • Module
  • Pembicaraan
  • Baca
  • Lihat sumber
  • Lihat riwayat
Perkakas
Tindakan
  • Baca
  • Lihat sumber
  • Lihat riwayat
Umum
  • Pranala balik
  • Perubahan terkait
  • Pranala permanen
  • Informasi halaman
  • Lihat URL pendek
  • Unduh kode QR
Cetak/ekspor
  • Unduh sebagai PDF
  • Versi cetak
Dalam proyek lain
  • Wikimedia Commons
  • Butir di Wikidata
Tampilan
Halaman yang dilindungi semi
Dari Wikipedia bahasa Indonesia, ensiklopedia bebas
Dokumentasi modul[buat] [segarkan]
Anda dapat membuat halaman dokumentasi untuk buat pada modul Scribunto ini.
Penyunting dapat melakukan uji coba pada halaman bak pasir (buat | cermin) dan kasus uji (buat) modul ini.
Subhalaman modul ini.

local p = {}

function p.wikidatacheck(frame)
	local pframe = frame:getParent()
	local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
	local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template

	local property = config.property
	local value = config.value or ""
	local catbase = config.category
	local namespaces = config.namespaces
	local nocatsame = config.nocatsame or ""
	local qid = config.qid or ""
	local ok = false -- one-way flag to check if we're in a good namespace
	local ns = mw.title.getCurrentTitle().namespace
	
	
	for v in mw.text.gsplit( namespaces, ",", true) do
		if tonumber(v) == ns then
			ok = true
		end
	end
	if not ok then -- not in one of the approved namespaces
		return ""
	end
	local entity
	if qid == "" then
		entity = mw.wikibase.getEntityObject()
	else
		entity = mw.wikibase.getEntityObject(qid)
	end
	if not entity then -- no Wikidata item
		return "[[Kategori:" .. catbase .. " tidak ada di Wikidata]]"
	end
	if value == "" then
		return nil -- Using Wikidata
	end
	local claims = entity.claims or {}
	local hasProp = claims[property]
	if not hasProp then -- no claim of that property
		return "[[Kategori:" .. catbase .. " tidak ada di Wikidata]]" -- bad. Bot needs to add the property
	end
	for i, v in ipairs(hasProp) do -- Now we try to iterate over all possible values?
		propValue = (v.mainsnak.datavalue or {}).value
		if propValue == value then
			if nocatsame == "" then
				return "[[Kategori:" .. catbase .. " sama seperti Wikidata]]" -- yay!
			else
				return nil -- if nocatsame, the "same as" category is not added
			end
		end
	end
	return "[[Kategori:" .. catbase .. " berbeda dengan Wikidata]]" -- needs human review :(
end

return p
Diperoleh dari "https://id.wikipedia.org/w/index.php?title=Modul:WikidataCheck&oldid=18828441"
Kategori tersembunyi:
  • Halaman Wikipedia yang dilindungi sebagian tanpa batas waktu

Best Rank
More Recommended Articles