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

Content deleted Content added
change wikidata to Wikidata in maintenance category names
change machine-readable formatting for {{object location}} templates
લીટી ૧:
--[[
__ __ _ _ ____ _ _ _
| \/ | ___ __| |_ _| | ___ _ / ___|___ ___ _ __ __| (_)_ __ __ _| |_ ___ ___
| |\/| |/ _ \ / _` | | | | |/ _ (_) | / _ \ / _ \| '__/ _` | | '_ \ / _` | __/ _ \/ __|
| | | | (_) | (_| | |_| | | __/_| |__| (_) | (_) | | | (_| | | | | | (_| | || __/\__ \
|_| |_|\___/ \__,_|\__,_|_|\___(_)\____\___/ \___/|_| \__,_|_|_| |_|\__,_|\__\___||___/
 
This module is intended to provide functionality of {{location}} and related
Line ૨૬૩ ⟶ ૨૬૯:
}
s = entity:getBestStatements( 'P31' )
if s[1] and s[1].mainsnak.datavalue.value['numeric-id'] then
local instanceOf = string.format('Q%i',s[1].mainsnak.datavalue.value['numeric-id'])
if QCodes[instanceOf] then
cat = '' -- wipe out categories
Line ૫૦૮ ⟶ ૫૧૪:
end
elseif mode=='object'or mode =='globe' then -- Used by {{Object location}}
if mode=='object' and string.find(attributes, 'type:')==nil then
attributes = 'type:object_' .. attributes
end
if string.find(attributes, 'class:object')==nil then
attributes = 'class:object_' .. attributes
Line ૬૭૬ ⟶ ૬૮૫:
-- add {{#coordinates}} tag, see https://www.mediawiki.org/wiki/Extension:GeoData
if args.namespace == 'File' and Status == 'primary' and args.mode=='camera' then
coorTag = string.formatframe:callParserFunction( '{{#coordinates:', { 'primary|%10.6f|%11.6f|%s}}', lat, lon, args.attributes } )
elseif args.namespace == 'File' and args.mode=='object' then
coorTag = frame:preprocess(coorTag)
coorTag = frame:callParserFunction( '#coordinates', { lat, lon, args.attributes } )
end
else -- if lat and lon are not numbers then add error category