Module:Wikidata label: Difference between revisions

Jump to navigation Jump to search
no edit summary
m (1 revision imported: Import dei template listati da Camillo-Stefano ed esportati da Wikidata)
No edit summary
Line 1: Line 1:
--[[
--[[
  __  __          _      _      __        ___ _    _    _      _          _      _          _
__  __          _      _      __        ___ _    _    _      _          _      _          _
  |  \/  | ___  __| |_  _| | ___ \ \      / (_) | _(_) __| | __ _| |_ __ _  | | __ _| |__  ___| |
  |  \/  | ___  __| |_  _| | ___ \ \      / (_) | _(_) __| | __ _| |_ __ _  | | __ _| |__  ___| |
  | |\/| |/ _ \ / _` | | | | |/ _ (_) \ /\ / /| | |/ / |/ _` |/ _` | __/ _` | | |/ _` | '_ \ / _ \ |
  | |\/| |/ _ \ / _` | | | | |/ _ (_) \ /\ / /| | |/ / |/ _` |/ _` | __/ _` | | |/ _` | '_ \ / _ \ |
Line 169: Line 169:
eLink='c:Special:EntityPage/'..item
eLink='c:Special:EntityPage/'..item
elseif item_type == 'Q' then
elseif item_type == 'Q' then
eLink='d:'..item -- wikibase entity page link
-- eLink='d:'..item -- wikibase entity page link
eLink='Item:'..item -- wikibase entity page link
elseif item_type == 'P' then
elseif item_type == 'P' then
eLink='d:Property:'..item -- wikibase entity page link
-- eLink='d:Property:'..item -- wikibase entity page link
eLink='Property:'..item -- wikibase entity page link
else
else
eLink='d:Special:EntityPage/'..item
-- eLink='d:Special:EntityPage/'..item
eLink='Special:EntityPage/'..item
end
end
if link_type == '-' then -- allow different link formats
if link_type == '-' then -- allow different link formats
Line 180: Line 183:
link = eLink        -- link to wikibase entity page
link = eLink        -- link to wikibase entity page
elseif link_type == 'wikidata talk' and item_type == 'P' then
elseif link_type == 'wikidata talk' and item_type == 'P' then
link = 'd:Property talk:'.. item        -- link to wikidata property talk page
-- link = 'd:Property talk:'.. item        -- link to wikidata property talk page
link = 'Property talk:'.. item        -- link to wikidata property talk page
elseif link_type == 'wikidata talk' then
elseif link_type == 'wikidata talk' then
link = 'd:Talk:'..item  -- link to wikidata talk page
-- link = 'd:Talk:'..item  -- link to wikidata talk page
link = 'Talk:'..item  -- link to wikidata talk page
elseif link_type == 'commons' or link_type == 'commonscat' then
elseif link_type == 'commons' or link_type == 'commonscat' then
--[[
--[[
Line 264: Line 269:
if not lang then
if not lang then
label, lang = mw.wikibase.getLabelWithLang(item)
label, lang = mw.wikibase.getLabelWithLang(item)
if not lang then lang = 'it' end -- Stefano Bargioni 2023-07-18
end
end
if not lang then -- if still no language
if not lang then -- if still no language

Navigation menu