Diferencies ente revisiones de «Módulu:Coordinates»

Contenido eliminado Contenido añadido
Oriciu (alderique | contribuciones)
Módulu de coordenaes necesariu pa delles funciones de Coord, (Por traducir)
 
Oriciu (alderique | contribuciones)
Traducciones de mensaxes
Llinia 21:
--[[ Helper function, replacement for {{coord/display/title}} ]]
function displaytitle (s, notes)
local l = "[[GeographicSistema coordinatede systemCoordenaes Universal Tresversal Mercator|CoordinatesCoordenaes]]: " .. s
local co = '<span id="coordinates">' .. l .. notes .. '</span>';
return '<span style="font-size: small;">' .. co .. '</span>';
Llinia 53:
if long == "" or long == nil then
return nil, {{"parseDec", "MissingFalta longitudela llonxitú"}}
end
Llinia 113:
errors = validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, 'parseDMS', true );
if long_d == nil or long_d == "" then
table.insert(errors, {"parseDMS", "MissingFalta longitudela llonxitú" })
end
Llinia 153:
if uriComponents == "" then
-- RETURN error, should never be empty or nil
return "ERROR paramel wasparámetru emptytaba vacíu"
end
if args["name"] ~= "" and args["name"] ~= nil then
Llinia 159:
end
local geodmshtml = '<span class="geo-dms" title="MapsMapes, aerialortofotos photos, andy otherotros datadatos forpa thisesti locationllugar">'
.. '<span class="latitude">' .. coordinateSpec["dms-lat"] .. '</span> '
.. '<span class="longitude">' ..coordinateSpec["dms-long"] .. '</span>'
Llinia 180:
end
local geodechtml = '<span class="geo-dec" title="MapsMapes, aerialortofotos photos, andy otherotros datadatos forpa thisesti locationllugar">'
.. geodeclat .. ' '
.. geodeclong
Llinia 206:
 
return '<span class="plainlinks nourlexpansion">' .. globalFrame:preprocess(
'[//tools.wmflabs.org/geohack/geohack.php?language=ast?pagename={{FULLPAGENAMEE}}&params=' ..
uriComponents .. ' ' .. inner .. ']') .. '</span>'
end
Llinia 216:
local result = ""
for i,v in ipairs(errors) do
local errorHTML = '<strong class="error">CoordinatesCoordenaes: ' .. v[2] .. '</strong>'
result = result .. errorHTML .. "<br />"
end
Llinia 251:
if args[1] == "" then
-- no lat logic
return errorPrinter( {{"formatTest", "MissingFalta latitudela llatitú"}} )
elseif args[4] == "" and args[5] == "" and args[6] == "" then
-- dec logic
Llinia 266:
args[6], args[7], args[8], args[9] } , '_' );
if args[10] ~= '' then
table.insert( errors, { 'formatTest', 'ExtraHai unexpectedparámetros parametersde más' } );
end
elseif dmsTest(args[3], args[6]) then
Llinia 275:
args[6], args[7] } , '_' );
if args[8] ~= '' then
table.insert( errors, { 'formatTest', 'ExtraHai unexpectedparámetros parametersde más' } );
end
elseif dmsTest(args[2], args[4]) then
Llinia 283:
result.param = table.concat( { args[1], args[2], args[3], args[4], args[5] } , '_' );
if args[6] ~= '' then
table.insert( errors, { 'formatTest', 'ExtraHai unexpectedparámetros parametersde más' } );
end
else
-- Error
return errorPrinter( {{"formatTest", "UnknownFormatu argumentdel formatargumentu desconocíu"}} )
end
result.name = args["name"]
Llinia 294:
for _, v in ipairs( extra_param ) do
if (args[v] or '') ~= '' then
table.insert( errors, {'formatTest', 'ParameterParámetru: "' .. v .. '=" shouldtendría bede ser "' .. v .. ':"' } );
end
end
Llinia 301:
return specPrinter( args, result )
else
return specPrinter( args, result ) .. " " .. errorPrinter(errors) .. '[[CategoryCategoría:PagesUiquipedia:Páxines con withetiquetes malformedde coordinatecoordenaes tagsincorreutes]]';
end
end
--[[ Función auxiliar para convertir la coma decimal en punto decimal ]]
function formatPunt(num)
return mw.ustring.gsub(num, ",", ".")
end
--[[ Función auxilar para convertir longitud O a W ]]
function formatLongW(dir)
if dir:upper() == "O" then
return "W"
end
return dir
end
 
Línea 398 ⟶ 409:
if strong then
if lat_d < 0 then
table.insert(errors, {source, "latitudeLlatitú degreesnegativa <con 0direición with hemisphere flagN"})
end
if long_d < 0 then
table.insert(errors, {source, "longitudeLlonxitú degreesnegativa <con 0direición with hemisphere flagE"})
end
--[[
Línea 416 ⟶ 427:
if lat_d > 90 then
table.insert(errors, {source, "latitudegraos degreesde llatitú > 90"})
end
if lat_d < -90 then
table.insert(errors, {source, "latitudegraos degreesde llatitú < -90"})
end
if lat_m >= 60 then
table.insert(errors, {source, "latitudeminutos minutesde llatitú >= 60"})
end
if lat_m < 0 then
table.insert(errors, {source, "latitudeminutos minutesde llatitú < 0"})
end
if lat_s >= 60 then
table.insert(errors, {source, "latitudesegundos secondsde llatitú >= 60"})
end
if lat_s < 0 then
table.insert(errors, {source, "latitudesegundos secondsde llatitú < 0"})
end
if long_d >= 360 then
table.insert(errors, {source, "longitudegraos degreesde llonxitú >= 360"})
end
if long_d <= -360 then
table.insert(errors, {source, "longitudegraos degreesde llonxitú <= -360"})
end
if long_m >= 60 then
table.insert(errors, {source, "longitudeminutos minutesde llonxitú >= 60"})
end
if long_m < 0 then
table.insert(errors, {source, "longitudeminutos minutesde llonxitú < 0"})
end
if long_s >= 60 then
table.insert(errors, {source, "longitudesegundos secondsde llonxitú >= 60"})
end
if long_s < 0 then
table.insert(errors, {source, "longitudesegundos secondsde llonxitú < 0"})
end