Modul:Wikibase: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
missing function for Templat:Infobox lokasi, cleaning up Kategori:Halaman dengan galat skrip |
Hidayatsrf (bicara | kontrib) API updates |
||
Baris 1:
---------- Module:Wikibase ----------------
require('Module:No globals')
local p = {}
-- Return the
function p.id(frame)
if not mw.wikibase then
return "no mw.wikibase"
end
if entity == nil then▼
end
-- Return the
-- or the item linked to the current page if no argument is provided
function p.wdurl(frame)
return mw.wikibase.getEntityUrl(frame.args[1] and mw.text.trim(frame.args[1])) -- defaults to entity URL of the item linked to the current page
end
-- Return the label of
-- or the item linked to the current page if no argument is provided
function p.label(frame)
return mw.wikibase.getLabel(frame.args[1] and mw.text.trim(frame.args[1])) -- defaults to label of the item linked to the current page
end
-- Return the description of
-- or the item linked to the current page if no argument is provided
function p.description(frame)
return mw.wikibase.getDescription(frame.args[1] and mw.text.trim(frame.args[1])) -- defaults to description of the item linked to the current page
end
-- Return the local
-- or the item linked to the current page if no argument is provided.
function p.page(frame)
qid = mw.wikibase.getEntityIdForCurrentPage() -- default the item connected to the current page
end
return mw.wikibase.
end
-- Return the data type of a property given its entity ID.
function p.datatype(frame)
return prop and prop.datatype
end
|