require "Modul:No globals"
local p = {}
local lib = require "Modul:Wikidata/lib"
local i18n = mw.loadData("Modul:Wikidata/i18n")
local function getEntityFromId(id)
return mw.wikibase.getEntityObject(id)
end
local function findEntity(options)
local entity
if options.entity and type(options.entity) == "table" then
entity = options.entity
end
if not entity then
if options.id then
local id = options.id:upper()
entity = getEntityFromId(id)
if entity and entity.id ~= id then
mw.log(id .. ' je přesměrování na ' .. entity.id)