Mòdul:External links/conf/Cinema/proves

local configured_claims = {}

local function commons_formatter(id)
	return "https://commons.wikimedia.org/wiki/Category:" .. id:gsub(" ", "_")
end

configured_claims['ca'] = {

	{ prop='P3593', message="[$2 ''$1''] a Catàleg de l'[[American Film Institute]]$3", langcode='en' },
	{ prop='P2019', message='[$2 $1] a [[Allmovie]]$3', langcode='en' },
	{ prop='P1562', message="[$2 ''$1''] a [[Allmovie]]$3", langcode='en' },
	{ prop='P1266', message='[$2 $1] a [[AlloCiné]]$3', langcode='fr' },
	{ prop='P1265', message="[$2 ''$1''] a [[AlloCiné]]$3", langcode='fr' },
	{ prop='P4933', message="[$2 ''$1''] a [[The Big Cartoon DataBase]]$3", langcode='en' },
	{ prop='P345', message='[$2 $1] a [[Internet Movie Database]]$3', langcode='en' }, -- title
	{ prop='P1659', message="[$2 ''$1''] a [[FilmAffinity]]$3", langcode='en' },
	{ prop='P2638', message="[$2 ''$1''] a [[TV.com]]$3", langcode='en' },
	{ prop='P1237', message="[$2 ''$1''] a [[Box Office Mojo]]$3", langcode='en' },
	{ prop='P1874', message="[$2 ''$1''] a [[Netflix.]]$3" },
	{ prop='P1258', message="[$2 ''$1''] a [[Rotten Tomatoes]]$3", langcode='en' },
	{ prop='P3058', message='[$2 $1] a [[Turner Classic Movies|TCM Movie Database]]$3', langcode='en' },
	{ prop='P3058', message="[$2 ''$1''] a [[Turner Classic Movies|TCM Movie Database]]$3", langcode='en' },

}

local messages_conf = {}

messages_conf['ca'] = {
	['short-list-separator'] = ', ',
	['with-data-cat']              = '[[Categoria:Articles using cinema links with data from Wikidata]]',
	['no-data-text']               = "",
	['no-data-cat']                = '[[Categoria:Articles using cinema links with no data in Wikidata]]',
	['no-wikilink']                = "''This article has no link in Wikidata''",
	['no-wikilink-cat']            = "[[Categoria:Articles using cinema links with no link in Wikidata]]",
	['with-local-cat']             = '[[Categoria:Articles using cinema links with local values]]',
	['track-cat-wd-wd']            = '[[Categoria:Articles using cinema links with $1 from Wikidata]]',
	['track-cat-local-local']      = '[[Categoria:Articles using cinema links with $1 from local value]]',
	['track-cat-wd-local']         = '[[Categoria:Articles using cinema links with $1 from Wikidata but has local value]]',
	['track-cat-local-wd']         = '[[Categoria:Articles using cinema links with $1 from local value but has Wikidata]]',
	['track-cat-local-wd-equal']   = "[[Categoria:Articles using cinema links with $1 from local value same as Wikidata]]",
	['track-cat-local-wd-unequal'] = "[[Categoria:Articles using cinema links with $1 from local value different from Wikidata]]",
}
local limits = {
	['links-shown'] = 10,		-- maximum number of links shown in the article.
}

local p = {}

function p.getConfiguredClaims (self, lang)
	return configured_claims[lang]
end

function p.getLimits (self)
	return limits
end

function p.getMessage (self, lang, msg)
	return messages_conf[lang][msg] 
end

-- metatable for the export
local mt = {
	-- adjust the installation of the module
	['__call'] = function (self, lang)
		self.configured_claims = configured_claims[lang]
		self.messages_conf = messages_conf[lang]
		return self
	end
}

-- install the metatable
setmetatable(p, mt)

return p