Mòdul:Wikidades i Mòdul:Wikidades/proves: Diferència entre les pàgines
Aparença
(Diferència entre pàgines)
Contingut suprimit Contingut afegit
Filtres amb qualificadors multivalor, demanat a la discussió |
label icon skin-invert |
||
Línia 1: | Línia 1: | ||
-- version |
-- version 20240527 from master @cawiki |
||
-- changes from previous version: |
-- changes from previous version: |
||
---- links to Wikidata without style="color:#5f9cbb;" TBD with templateStyles for class extiw |
|||
---- label icon with class=skin-invert for dark mode |
|||
local p = {} |
local p = {} |
||
Línia 248: | Línia 251: | ||
namespace = 'Property:' |
namespace = 'Property:' |
||
end |
end |
||
ret_icon = " [[File:Noun Project label icon 1116097 cc mirror.svg|10px|baseline|" |
ret_icon = " [[File:Noun Project label icon 1116097 cc mirror.svg|10px|baseline|class=skin-invert|" |
||
.. mw.message.new('Translate-taction-translate'):inLanguage(uselang):plain() |
.. mw.message.new('Translate-taction-translate'):inLanguage(uselang):plain() |
||
.. "|link=https://www.wikidata.org/wiki/" .. namespace .. label_id .. "?uselang=" .. uselang .. "]]" |
.. "|link=https://www.wikidata.org/wiki/" .. namespace .. label_id .. "?uselang=" .. uselang .. "]]" |
||
Línia 840: | Línia 843: | ||
ret2 = labelcase |
ret2 = labelcase |
||
else |
else |
||
ret1 = '[[d:' .. entity_page .. '| |
ret1 = '[[d:' .. entity_page .. '|' .. (labelcase or entity_id) .. ']]' |
||
ret2 = labelcase or entity_id |
ret2 = labelcase or entity_id |
||
end |
end |
||
Línia 858: | Línia 861: | ||
return |
return |
||
end |
end |
||
local ret = '[[d:Special:EntityPage/' .. entity_id .. '| |
local ret = '[[d:Special:EntityPage/' .. entity_id .. '|' .. lemmas[1][1] .. ']]' |
||
if parameters.list ~= 'lang' or (parameters.list == 'lang' and lemmas[1][2] ~= wiki.langcode) then |
if parameters.list ~= 'lang' or (parameters.list == 'lang' and lemmas[1][2] ~= wiki.langcode) then |
||
ret = ret .. " <sup>(" .. lemmas[1][2] .. ")</sup>" |
ret = ret .. " <sup>(" .. lemmas[1][2] .. ")</sup>" |