વિભાગ:Coordinates: આવૃત્તિઓ વચ્ચેનો તફાવત

Content deleted Content added
Reverted bad revision.
add support for optional qid for template:infobox observatory
લીટી ૪૮૫:
Generate Wikidata tracking categories.
]]
local function makeWikidataCategories(qid)
local ret
if mw.wikibase and current_page.namespace == 0 then
local entity = qid and mw.wikibase.getEntityObject(qid) or mw.wikibase.getEntityObject()
if entity and entity.claims and entity.claims.P625 and entity.claims.P625[1] then
local snaktype = entity.claims.P625[1].mainsnak.snaktype
લીટી ૬૦૯:
if (not args[1] or not tonumber(args[1])) and not args[2] and mw.wikibase.getEntityObject() then
args[3] = args[1]; args[1] = nil
local entity = args.qid and mw.wikibase.getEntityObject(args.qid) or mw.wikibase.getEntityObject()
if entity
and entity.claims
લીટી ૬૫૧:
text = text
.. displaytitle(contents, Notes)
.. makeWikidataCategories(args.qid)
end
if not args.nosave then