Module:Coordinates: திருத்தங்களுக்கு இடையிலான வேறுபாடு
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
sandbox sync per TPER at talk, bring #coordinates to module |
mal-synced? backout per issue noted at Grade I listed buildings in Dorset, getting "cannot have more than one primary tag per page" |
||
வரிசை 51:
wrappers = 'Template:Coord'
})
return coordinates[funcName](args
end
end
வரிசை 309:
parseDec
Transforms decimal format latitude and longitude into the a
structure to be used in displaying coordinates
]]
வரிசை 346:
]]
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();
வரி 353 ⟶ 354:
-- 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
வரி 387 ⟶ 400:
end
return coordinateSpec, errors
end
வரி 396 ⟶ 409:
local function formatTest(args)
local result, errors
local
local function getParam(args, lim)
வரி 421 ⟶ 434:
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
வரி 432 ⟶ 445:
elseif dmsTest(args[3], args[6]) then
-- dm logic
result, errors
args[4], args[5], nil, args[6], args['format'])
if args[8] then
வரி 443 ⟶ 456:
elseif dmsTest(args[2], args[4]) then
-- d logic
result, errors
args[3], nil, nil, args[4], args.format)
if args[6] then
வரி 469 ⟶ 482:
ret = ret .. ' ' .. errorPrinter(errors) .. '[[Category:Pages with malformed coordinate tags]]'
end
return ret
end
வரி 615 ⟶ 628:
end
local contents
local Notes = args.notes or ''
local Display = args.display and args.display:lower() or 'inline'
வரி 626 ⟶ 639:
-- Finds whether coordinates are displayed in the title.
return s:find('title') ~= nil or s == 't' or s == 'it' or s == 'ti'
end
வரி 641 ⟶ 649:
.. displaytitle(contents, Notes)
.. makeWikidataCategories()
▲ local tmp = {}
end
return text
வரி 707 ⟶ 700:
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
|