Modul:External links/conf/Musikk
Utseende
Moduldokumentasjon
[opprett]
local function commons_formatter(id)
return "https://commons.wikimedia.org/wiki/Category:" .. id:gsub(" ", "_")
end
local configured_claims = {}
configured_claims['nb'] = {
-- (HENTES FRA {{Offisielt nettsted}}) { prop ='P373', message ="$3 [$2 $1] – bilder, video eller lyd på [[Wikimedia Commons]]", langcode = 'en', genitiv = false, url_f=commons_formatter },
{ prop='P2206', message ="$3 [$2 ''$1''] på [[Discogs]]", short="[$2 Discogs]", langcode ='en', genitiv = false }, -- Utgivelse
{ prop='P1953', message ="$3 [$2 $1] på [[Discogs]]", short="[$2 Discogs]", langcode ='en', genitiv = false }, -- Artist
{ prop='P1954', message ="$3 [$2 ''$1''] på [[Discogs]]", short="[$2 Discogs]", langcode ='en', genitiv = false }, -- Verk
{ prop='P435', message ="$3 [$2 $1] på [[MusicBrainz]]", short="[$2 MusicBrainz]", langcode ='en', genitiv = false }, --Utgivelse
{ prop='P436', message ="$3 [$2 $1] på [[MusicBrainz]]", short="[$2 MusicBrainz]", langcode ='en', genitiv = false }, --Verk
{ prop='P2624', message ="$3 [$2 $1] på [[MetroLyrics]]", short="[$2 MetroLyrics]", langcode ='en', genitiv = false },
{ prop='P2721', message ="$3 [$2 $1] på [[Encyclopaedia Metallum]]", short="[$2 Encyclopaedia Metallum]", langcode ='en', genitiv = false },
{ prop='P3040', message ="$3 [$2 $1] på [[SoundCloud]]", short="[$2 SoundCloud]", langcode ='en', genitiv = false },
{ prop='P1902', message ="$3 [$2 $1] på [[Spotify]]", short="[$2 Spotify]", langcode ='en', genitiv = false }, --band, artist på Spotify
{ prop='P2205', message ="$3 [$2 $1] på [[Spotify]]", short="[$2 Spotify]", langcode ='en', genitiv = false }, --utgivelse på Spotify
{ prop='P2207', message ="$3 [$2 $1] på [[Spotify]]", short="[$2 Spotify]", langcode ='en', genitiv = false }, --sang på Spotify
{ prop='P3478', message ="$3 [$2 $1] på [[Songkick]]", short="[$2 Songkick]", langcode ='en', genitiv = false },
{ prop='P3192', message ="$3 [$2 $1] på [[Last.fm]]", short="[$2 Last.fm]", langcode ='en', genitiv = false },
{ prop='P5172', message ="$3 [$2 $1] på [[Rockipedia]]", short="[$2 Rockipedia]", langcode ='no', genitiv = false },
{ prop='P5171', message ="$3 [$2 $1] på [[Rockipedia]]", short="[$2 Rockipedia]", langcode ='no', genitiv = false }, --utgivelse
{ prop='P6217', message ="$3 [$2 $1] på [[Genius (nettsted)|Genius]] — sangtekster", short="[$2 Genius]", langcode ='no', genitiv = false }, --utgivelse
{ prop='P6218', message ="$3 [$2 $1] på [[Genius (nettsted)|Genius]] — sangtekst", short="[$2 Genius]", langcode ='no', genitiv = false }, --sang
{ prop='P2373', message ="$3 [$2 $1] på [[Genius (nettsted)|Genius]] — sangtekster", short="[$2 Genius]", langcode ='no', genitiv = false }, --sang
{ prop='P1729', message ="$3 [$2 $1] på [[AllMusic]]", short="[$2 AllMusic]", langcode ='en', genitiv = false }, --sang
}
local messages_conf = {}
messages_conf['nb'] = {
['short-list-separator'] = " '''·''' ",
['no-data-cat'] = '[[Kategori:Artikler uten musikklenker fra Wikidata]]',
['with-data-cat'] = '[[Kategori:Artikler med musikklenker fra Wikidata]]',
['with-local-cat'] = '[[Kategori:Artikler med musikklenker fra lokale verdier]]',
['no-data-text'] = "''Artikkelen har ingen egenskaper for musikkdatabaser i Wikidata''",
['no-wikilink'] = "''Artikkelen mangler oppslag i Wikidata''",
['no-wikilink-cat'] = "[[Kategori:Artikler med musikklenker og uten kobling til Wikidata]]",
['track-cat-wd-wd'] = '[[Kategori:Artikler med musikklenker for $1 fra Wikidata]]',
['track-cat-local-local'] = '',
['track-cat-wd-local'] = '',
['track-cat-local-wd'] = '',
['track-cat-local-wd-equal'] = '',
['track-cat-local-wd-unequal'] = '',
}
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.getMessage (self, lang, msg)
return messages_conf[lang][msg]
end
function p.getLimits (self)
return limits
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