Module:language-like: Difference between revisions

no edit summary
No edit summary
No edit summary
Tag: Manual revert
 
(4 intermediate revisions by the same user not shown)
Line 190: Line 190:
-- Otherwise, check the Wikidata item for a sitelink.
-- Otherwise, check the Wikidata item for a sitelink.
local item = self:getWikidataItem()
local item = self:getWikidataItem()
article = item and sitelink(item, project) or false
article = self:getCanonicalName() or false --item and sitelink(item, project) or false
if article then
if article then
return article
return article
Line 256: Line 256:
local function get_commons_cat_sitelink(item)
local function get_commons_cat_sitelink(item)
if item then
--[[if item then
local commons_sitelink = sitelink(item, "commonswiki")
local commons_sitelink = sitelink(item, "commonswiki")
-- Reject any sitelinks that aren't categories.
-- Reject any sitelinks that aren't categories.
return commons_sitelink and match(commons_sitelink, "^Category:") and commons_sitelink or nil
return commons_sitelink and match(commons_sitelink, "^Category:") and commons_sitelink or nil
end
end]]
return nil
end
end