Module:Wd: Difference between revisions

(Undo revision 21914 by Johnrdorazio (talk))
Tag: Undo
(Avoid Lua errors should Wikidata not be available (tested via sandbox & testcases))
Line 68: Line 68:


local aliasesP = {
local aliasesP = {
coord                  = "P5283",
coord                  = "P625",
-----------------------
-----------------------
image                  = "P725",
image                  = "P18",
author                  = "P3990",
author                  = "P50",
publisher              = "P213",
publisher              = "P123",
importedFrom            = "P413",
importedFrom            = "P143",
statedIn                = "P1408",
statedIn                = "P248",
pages                  = "P1956",
pages                  = "P304",
language                = "P3001",
language                = "P407",
hasPart                = "P4273",
hasPart                = "P527",
publicationDate        = "P4788",
publicationDate        = "P577",
startTime              = "P4821",
startTime              = "P580",
endTime                = "P4841",
endTime                = "P582",
chapter                = "P7048",
chapter                = "P792",
retrieved              = "P7275",
retrieved              = "P813",
referenceURL            = "P7714",
referenceURL            = "P854",
sectionVerseOrParagraph = "P7839",
sectionVerseOrParagraph = "P958",
archiveURL              = "P66",
archiveURL              = "P1065",
title                  = "P458",
title                  = "P1476",
formatterURL            = "P574",
formatterURL            = "P1630",
quote                  = "P622",
quote                  = "P1683",
shortName              = "P739",
shortName              = "P1813",
definingFormula        = "P1463",
definingFormula        = "P2534",
archiveDate            = "P1873",
archiveDate            = "P2960",
inferredFrom            = "P2352",
inferredFrom            = "P3452",
typeOfReference        = "P2788",
typeOfReference        = "P3865",
column                  = "P2826"
column                  = "P3903"
}
}


local aliasesQ = {
local aliasesQ = {
percentage              = "Q1906",
percentage              = "Q11229",
prolepticJulianCalendar = "Q13230",
prolepticJulianCalendar = "Q1985786",
citeWeb                = "Q13234",
citeWeb                = "Q5637226",
citeQ                  = "Q13236"
citeQ                  = "Q22321052"
}
}


Line 740: Line 740:
end
end


value = "[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px|alt=" .. i18n['info']['edit-on-wikidata'] .. "|link=https://en.seminaverbi.bibleget.io/wiki/" .. prefix .. self.entityID .. "?uselang=" .. self.langCode
value = "[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px|alt=" .. i18n['info']['edit-on-wikidata'] .. "|link=https://www.wikidata.org/wiki/" .. prefix .. self.entityID .. "?uselang=" .. self.langCode


if self.propertyID then
if self.propertyID then
Line 2,541: Line 2,541:
-- main function that is supposed to be used by wrapper templates
-- main function that is supposed to be used by wrapper templates
function p.main(frame)
function p.main(frame)
if not mw.wikibase then return nil end
local f, args
local f, args