વિભાગ:Coordinates: આવૃત્તિઓ વચ્ચેનો તફાવત
Content deleted Content added
imported>Andy M. Wang sync again, typo fix |
imported>Andy M. Wang Undid revision 739248415 by Andy M. Wang (talk): compatibility issues remaining with Module:HS listed building |
||
લીટી ૫૧:
wrappers = 'Template:Coord'
})
return coordinates[funcName](args
end
end
લીટી ૩૦૯:
parseDec
Transforms decimal format latitude and longitude into the a
structure to be used in displaying coordinates
]]
લીટી ૩૪૬:
]]
local function parseDMS( lat_d, lat_m, lat_s, lat_f, long_d, long_m, long_s, long_f, format )
local coordinateSpec
lat_f = lat_f:upper();
Line ૩૫૩ ⟶ ૩૫૪:
-- Check if specified backward
if lat_f == 'E' or lat_f == 'W' then
local t_d, t_m, t_s, t_f;
t_d = lat_d;
t_m = lat_m;
t_s = lat_s;
t_f = lat_f;
lat_d = long_d;
lat_m = long_m;
lat_s = long_s;
lat_f = long_f;
long_d = t_d;
long_m = t_m;
long_s = t_s;
long_f = t_f;
end
Line ૩૮૭ ⟶ ૪૦૦:
end
return coordinateSpec, errors
end
Line ૩૯૬ ⟶ ૪૦૯:
local function formatTest(args)
local result, errors
local
local function getParam(args, lim)
Line ૪૨૧ ⟶ ૪૩૪:
elseif dmsTest(args[4], args[8]) then
-- dms logic
result, errors
args[5], args[6], args[7], args[8], args.format)
if args[10] then
Line ૪૩૨ ⟶ ૪૪૫:
elseif dmsTest(args[3], args[6]) then
-- dm logic
result, errors
args[4], args[5], nil, args[6], args['format'])
if args[8] then
Line ૪૪૩ ⟶ ૪૫૬:
elseif dmsTest(args[2], args[4]) then
-- d logic
result, errors
args[3], nil, nil, args[4], args.format)
if args[6] then
Line ૪૬૯ ⟶ ૪૮૨:
ret = ret .. ' ' .. errorPrinter(errors) .. '[[Category:Pages with malformed coordinate tags]]'
end
return ret
end
Line ૬૧૫ ⟶ ૬૨૮:
end
local contents
local Notes = args.notes or ''
local Display = args.display and args.display:lower() or 'inline'
Line ૬૨૬ ⟶ ૬૩૯:
-- Finds whether coordinates are displayed in the title.
return s:find('title') ~= nil or s == 't' or s == 'it' or s == 'ti'
end
Line ૬૪૧ ⟶ ૬૪૯:
.. displaytitle(contents, Notes)
.. makeWikidataCategories()
▲ local tmp = {}
end
return text
Line ૭૦૭ ⟶ ૭૦૦:
for i, v in ipairs(frame.args) do
if i ~= 1 then
if not mw.ustring.find(frame.args[1], (mw.ustring.match(frame.args[i], '^(.-:)') or '')) then frame.args[1] = mw.ustring.gsub(frame.args[1], '(params=.-)_? ', '%1_'..frame.args[i]..' ', 1) end
end
end
|