Modhul:Coordinates: Béda antara owahan

Konten dihapus Konten ditambahkan
Tanpa ringkesan besutan
Tanpa ringkesan besutan
Larik 25:
--[[ Helper function, replacement for {{coord/display/title}} ]]
local function displaytitle(s, notes)
local l = "[[Sistem koordinatkoordhinat géografigéografis|KoordinatKoordhinat]]: " .. s
local co = '<span id="coordinates">' .. l .. notes .. '</span>';
return '<span style="font-size: small;">' .. co .. '</span>';
Larik 66:
local result = ""
for i,v in ipairs(errors) do
local errorHTML = '<strong class="error">KoordinatKoordhinat: ' .. v[2] .. '</strong>'
result = result .. errorHTML .. "<br />"
end
Larik 116:
if lat < 0 then
-- FIXME this breaks the pre-existing precision
geodeclat = tostring(coordinateSpec["dec-lat"]):sub(2) .. "°KdS"
else
geodeclat = (coordinateSpec["dec-lat"] or 0) .. "°LN"
end
 
Larik 125:
if long < 0 then
-- FIXME does not handle unicode minus
geodeclong = tostring(coordinateSpec["dec-long"]):sub(2) .. "°KlW"
else
geodeclong = (coordinateSpec["dec-long"] or 0) .. "°WE"
end
Larik 218:
local factor = 1
if direction == "KdS" or direction == "KlW" then
factor = -1
end
Larik 327:
 
local mode = coordinates.determineMode( lat, long );
coordinateSpec["dms-lat"] = convert_dec2dms( lat, "LN", "KdS", mode) -- {{coord/dec2dms|{{{1}}}|N|S|{{coord/prec dec|{{{1}}}|{{{2}}}}}}}
coordinateSpec["dms-long"] = convert_dec2dms( long, "WE", "KlW", mode) -- {{coord/dec2dms|{{{2}}}|E|W|{{coord/prec dec|{{{1}}}|{{{2}}}}}}}
if format then
Larik 353:
-- Check if specified backward
if lat_f == 'WE' or lat_f == 'KlW' then
local t_d, t_m, t_s, t_f;
t_d = lat_d;
Larik 378:
if not lat_m and not lat_s and not long_m and not long_s and #errors == 0 then
if math_mod._precision( lat_d ) > 0 or math_mod._precision( long_d ) > 0 then
if lat_f:upper() == 'KdS' then
lat_d = '-' .. lat_d;
end
if long_f:upper() == 'KlW' then
long_d = '-' .. long_d;
end
Larik 431:
return errorPrinter(errors);
end
result.param = table.concat({args[1], 'LN', args[2] or '', 'WE', args[3] or ''}, '_')
elseif dmsTest(args[4], args[8]) then
-- dms logic
Larik 480:
local ret = specPrinter(args, result)
if #errors > 0 then
ret = ret .. ' ' .. errorPrinter(errors) .. '[[CategoryKategori:PagesKaca withmawa malformedtag coordinatekoordhinat tagscacad]]'
end
return ret
Larik 496:
if snaktype == 'value' then
-- coordinates exist both here and on Wikidata, and can be compared.
ret = 'CoordinatesKoordhinat onana ing Wikidata'
elseif snaktype == 'somevalue' then
ret = 'CoordinatesKoordhinat onana Wikidataing setWikidata todisetèl unknown value'
elseif snaktype == 'novalue' then
ret = 'CoordinatesKoordhinat onana Wikidataing setWikidata todisetèl no value'
end
else
-- We have to either import the coordinates to Wikidata or remove them here.
ret = 'CoordinatesKoordhinat notora onana ing Wikidata'
end
end
if ret then
return string.format('[[CategoryKategori:%s]]', ret)
else
return ''