মডিউল:অবস্থান মানচিত্র: সংশোধিত সংস্করণের মধ্যে পার্থক্য

বিষয়বস্তু বিয়োগ হয়েছে বিষয়বস্তু যোগ হয়েছে
একটা সমস্যা, সাময়িকভাবে বাতিল
প্যাচের জন্য ব্যবহারকারী:Johnuniq কে ধন্যবাদ
৩ নং লাইন:
local p = {}
 
local getArgs_getArgs = require('Module:Arguments').getArgs
 
local function getArgs(...)
-- Return args after translation.
local noTranslate = {
[1] = true, -- do not translate name of map
AlternativeMap = true,
alt = true,
caption = true,
label = true,
link = true,
mark = true,
overlay_image = true,
}
local args = _getArgs(...)
for k, v in pairs(args) do
if not noTranslate[k] then
v = mw.ustring.gsub(v, '%d', {
['০'] = '0',
['১'] = '1',
['২'] = '2',
['৩'] = '3',
['৪'] = '4',
['৫'] = '5',
['৬'] = '6',
['৭'] = '7',
['৮'] = '8',
['৯'] = '9',
})
args[k] = v
:gsub(' *উত্তর', 'N')
:gsub(' *পূর্ব' , 'E')
:gsub(' *দক্ষিণ', 'S')
:gsub(' *পশ্চিম', 'W')
end
end
return args
end
 
local function round(n, decimals)
১১৯ ⟶ ১৫৬ নং লাইন:
 
-- Finds a parameter in a transclusion of {{Coord}}.
local function coord2text(para, coord)
local resultvalue, direction, longitude, ew = mw.text.split(mw.ustring.coord:match(coord,'(%-?[%.%d]+)°([NS]) [(%-?[.%d]+)°([EW]') or '', '[ °]')
if para == 'longitude' then resultvalue, direction = {result[3]longitude, result[4]}ew end
value = tonumber(value)
if not tonumber(result[1]) or not result[2] then return error('Malformed coordinates value', 2) end
if value then
return tonumber(result[1])value * hemisphereMultipliers[para][result[2]direction]
end
error('স্থানাঙ্কের মান বিকৃত', 2)
end
 
২১৯ ⟶ ২৫৯ নং লাইন:
end
local retval = '</div>'
 
if not args.caption or args.border == 'infobox' then
if args.border then
২৩৯ ⟶ ২৭৯ নং লাইন:
retval = retval .. '<span class="switcher-label" style="display:none">' .. map('name') .. '-এর মানচিত্র দেখাও</span>'
end
 
retval = retval .. '</div></div>'
if args.caption_undefined then
২৮৮ ⟶ ৩২৮ নং লাইন:
return builder
end
 
local function markLabelDiv(label, label_size, label_width, position, background, x, marksize)
if tonumber(label_size) == 0 then
৪৫০ ⟶ ৪৯০ নং লাইন:
local altmaps = switcherSeparate(args.AlternativeMap)
if #altmaps > #map then
error(string.format('%d AlternativeMaps wereপ্রদান providedকরা হয়েছে, butকিন্তু onlyশুধুমাত্র %d mapsমানচিত্রগুলি প্রদান wereকরা providedহয়েছে', #altmaps, #map))
end
local overlays = switcherSeparate(args.overlay_image)
if #overlays > #map then
error(string.format('%d overlay_images wereপ্রদান providedকরা হয়েছে, butকিন্তু onlyশুধুমাত্র %d mapsমানচিত্রগুলি প্রদান wereকরা providedহয়েছে', #overlays, #map))
end
local outputs = {}