"Module:Location map" के अवतरणों में अंतर

65 बैट्स् नीकाले गए ,  2 वर्ष पहले
trying to fix files in श्रेणी:टूटी हुई फ़ाइल कड़ियों वाले पृष्ठ, please revert if it leads to any unintended bug
छो (अनुवाद में मामूली सुधार)
(trying to fix files in श्रेणी:टूटी हुई फ़ाइल कड़ियों वाले पृष्ठ, please revert if it leads to any unintended bug)
else
return mapData[name]
end
end
elseif mw.title.new('Template:Location map ' .. map).exists then
local cache = {}
if type(frame) ~= 'table' or type(frame.expandTemplate) ~= 'function' then
error('A frame must be provided when using a legacy location map')
end
return function(name, params)
if params then
return frame:expandTemplate{title = 'Location map ' .. map, args = { name, unpack(params) }}
else
if name == nil then
return 'Template:Location map ' .. map
elseif cache[name] == nil then
cache[name] = frame:expandTemplate{title = 'Location map ' .. map, args = { name }}
end
return cache[name]
end
end
else
error('Unable to find the specified location map definition. Neither: "Module:Location map/data/' .. map .. '" nordoes "Template:Location map ' .. map .. '"not existsexist', 2)
end
end
end
local image = getContainerImage(args, map)
local currentTitle = mw.title.getCurrentTitle()
retval = string.format(
'%s[[File:%s|%spx|%s%s]]',
image,
width,
args.alt or ((args.label or mw.title.getCurrentTitle()currentTitle.text) .. ' की ' .. map('name') .. ' के मानचित्र पर अवस्थिति'),
args.maplink and ('|link=' .. args.maplink) or ''
)
if args.caption and args.caption ~= '' then
if (currentTitle.namespace == 0) and mw.ustring.find(args.caption, '##') then
retval = retval .. '[[Category:Pages using location map with a double number sign in the caption]]'
end
end
local retval = '</div>'
local currentTitle = mw.title.getCurrentTitle()
if not args.caption or args.border == 'infobox' then
if args.border then
end
retval = retval
.. (args.caption or (args.label or mw.title.getCurrentTitle()currentTitle.text) .. ' (' .. map('name') .. ')')
.. '</div>'
elseif args.caption ~= '' then
end
mw.logObject(args, 'args')
if currentTitle.namespace == 0 then
retval = retval .. '[[Category:Location maps with removed parameters|caption_undefined]]'
end
end
if map('skew') ~= '' or map('lat_skew') ~= '' or map('crosses180') ~= '' or map('type') ~= '' then
mw.log('Removed parameter used in map definition ' .. map())
if currentTitle.namespace == 0 then
local key = (map('skew') ~= '' and 'skew' or '') ..
(map('lat_skew') ~= '' and 'lat_skew' or '') ..
(map('crosses180') ~= '' and 'crosses180' or '') ..
(map('type') ~= '' and 'type' or '')
retval = retval .. '[[Category:Location maps with removed parameters|' .. key .. ' ]]'
end
end
if string.find(map('name'), '|', 1, true) then
mw.log('Pipe used in name of map definition ' .. map())
if currentTitle.namespace == 0 then
retval = retval .. '[[Category:Location maps with a name containing a pipe]]'
end
end
if args.float == 'center' then
end
local builder = mw.html.create()
local currentTitle = mw.title.getCurrentTitle()
if args.coordinates then
-- Temporarily removed to facilitate infobox conversion. See [[Wikipedia:Coordinates in infoboxes]]
local value = entity.claims.P625[1].mainsnak.datavalue.value
longitude, latitude = value.longitude, value.latitude
end
if args.link and (currentTitle.namespace == 0) then
builder:wikitext('[[Category:Location maps with removedlinked parameters|'markers ..with keycoordinates ..'from Wikidata]]')
end
end
error('No value was provided for latitude')
end
if currentTitle.namespace > 0 then
local builder = mw.html.create()
if (not args.lon_deg) ~= (not args.lat_deg) then
builder:wikitext('[[Category:Location maps with different longitude and latitude precisions|Degrees]]')
elseif (not args.lon_min) ~= (not args.lat_min) then
builder:wikitext('[[Category:Location maps with different longitude and latitude precisions|Minutes]]')
elseif (not args.lon_sec) ~= (not args.lat_sec) then
builder:wikitext('[[Category:Location maps with different longitude and latitude precisions|Seconds]]')
elseif (not args.lon_dir) ~= (not args.lat_dir) then
builder:wikitext('[[Category:Location maps with different longitude and latitude precisions|Hemisphere]]')
elseif (not args.long) ~= (not args.lat) then
builder:wikitext('[[Category:Location maps with different longitude and latitude precisions|Decimal]]')
end
end
if args.skew or args.lon_shift or args.markhigh then
end
mw.logObject(args, 'args')
if currentTitle.namespace == 0 then
local key = (args.skew and 'skew' or '') ..
local key = (args.lon_shiftskew and 'lon_shiftskew' or '') ..
(args.markhighlon_shift and 'markhighlon_shift' or '') ..
local key = (args.skewmarkhigh and 'skewmarkhigh' or '') ..
builder:wikitext('[[Category:Location maps with removed parameters|' .. key ..' ]]')
builder:wikitext('[[Category:Location maps with marksremoved outside map and outside parameter not setparameters|' .. key .. ' ]]')
end
end
if map('x') ~= '' then
end
mw.logObject(args, 'args')
if currentTitle.namespace == 0 then
local key = frame:preprocess('{{FULLPAGENAME}}')
builder:wikitext('[[Category:Location maps with marks outside map and outside parameter not set|' .. key .. ' ]]')
builder:wikitext('[[Category:Location maps with marks outside map and outside parameter not set|' .. key .. ' ]]')
end
end
local mark = args.mark or map('mark')
3,648

सम्पादन