Change from mw.wikibase.getEntity (deprecated) to mw.wikibase.getEntityObject
template>Fryed-peach (en:Module:Coordinates 2014年9月10日 (水) 10:57 と同期。"import coordinates from WikiData") |
template>Lucie Kaffee (WMDE) (Change from mw.wikibase.getEntity (deprecated) to mw.wikibase.getEntityObject) |
||
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. | local entity = mw.wikibase.getEntityObject() | ||
if entity and entity.claims and entity.claims. | if entity and entity.claims and entity.claims.P625 then | ||
local snaktype = entity.claims. | local snaktype = entity.claims.P625[0].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 |