「モジュール:Coordinates」の版間の差分

changed back to getEntityObject after finding my mistake. very sorry for breaking it!
template>Magyon
(Lucie Kaffee (WMDE) (会話) による ID:54536870 の版を取り消し)
template>Lucie Kaffee (WMDE)
(changed back to getEntityObject after finding my mistake. very sorry for breaking it!)
624行目: 624行目:
if mw.wikibase and current_page.namespace == 0 then
if mw.wikibase and current_page.namespace == 0 then
local wikidata_cat
local wikidata_cat
local entity = mw.wikibase.getEntity()
local entity = mw.wikibase.getEntityObject()
if entity and entity.claims and entity.claims.p625 then
if entity and entity.claims and entity.claims.P625 then
local snaktype = entity.claims.p625[0].mainsnak.snaktype
local snaktype = entity.claims.P625[1].mainsnak.snaktype
if snaktype == 'value' then
if snaktype == 'value' then
wikidata_cat = '[[Category:Coordinates on Wikidata]]' -- coordinates exist both here and on Wikidata, and can be compared
wikidata_cat = '[[Category:Coordinates on Wikidata]]' -- coordinates exist both here and on Wikidata, and can be compared