Commit 3d986ff2 authored by Geoffrey Preud'homme's avatar Geoffrey Preud'homme 🐸
Browse files

Merge branch '63-make-coordinates-in-ip-tool-link-to-osm' into 'master'

Resolve "Make coordinates in IP tool link to OSM"

Closes #63

See merge request !37
parents bd23641f 44d85297
Pipeline #13244 passed with stages
in 4 minutes and 4 seconds
---
Password: كلمة السر
Time to crack: لنحاول فك الشيفرة
Warning: تحذير
......@@ -205,10 +204,11 @@ Chosen password is not strong enough.: Chosen password is not strong enough.
<i>passphrase</i> instead, which is longer but doesn't require a mix of
capitals, symbols and numbers.
Username and/or password are incorrect.: Username and/or password are incorrect.
'Your IP address is: ': 'عنوان بروتوكول الانترنت الـ IPالخاص بك هو: '
'ISP: ': 'مزود خدمة الانترنت: '
'Country: ': 'البلد: '
'City: ': 'المدينة: '
'Latitude: ': 'خط العرض: '
'Longitude: ': 'خط الطول: '
Click to open in map: للفتح في الخريطة
Not found: غير موجود
......@@ -209,3 +209,5 @@ Username and/or password are incorrect.: Username and/or password are incorrect.
'City: ': 'City: '
'Latitude: ': 'Latitude: '
'Longitude: ': 'Longitude: '
Click to open in map: Click to open in map
Not found: Not found
......@@ -204,3 +204,5 @@ Username and/or password are incorrect.: Usuario y/o clave incorrecto.
'City: ': 'Ciudad: '
'Latitude: ': 'Latitud: '
'Longitude: ': 'Longitud: '
Click to open in map: Haga clic para abrir en un mapa
Not found: No se ha encontrado
......@@ -173,3 +173,5 @@ Thank you for signing up.: ممنونیم که ثبت نام کردید.
'City: ': 'شهر: '
'Latitude: ': 'عرض جغرافیایی: '
'Longitude: ': 'عرض جغرافیایی: '
Click to open in map: برای باز کردن در نقشه، کلیک کنید
Not found: پیدا نشد
......@@ -230,3 +230,5 @@ Thank you for signing up.: Merci pour votre inscription.
'City: ': 'Ville: '
'Latitude: ': 'Latitude: '
'Longitude: ': 'Longitude: '
Click to open in map: Cliquez pour visualiser sur une carte
Not found: Non trouvée
......@@ -34,15 +34,16 @@ html
span.icon
i.loader
li
strong= __("Latitude: ")
span#user_latitude
span.icon
i.loader
li
strong= __("Longitude: ")
span#user_longitude
span.icon
i.loader
a#location(target="_blank")
strong= __("Latitude: ")
span#user_latitude
span.icon
i.loader
= ", "
strong= __("Longitude: ")
span#user_longitude
span.icon
i.loader
if debug
script(type="text/javascript" src=`${js_path}ip.js`)
......@@ -59,31 +60,38 @@ html
var user_isp = document.getElementById("user_isp");
if (! data.isp) {
data.isp = "Not found";
data.isp = '!{__("Not found")}';
}
user_isp.textContent = data.isp;
var country_name = document.getElementById("user_country_name");
if (! data.country_name) {
data.country_name = "Not found";
data.country_name = '!{__("Not found")}';
}
country_name.textContent = data.country_name
var city = document.getElementById("user_city");
if (! data.city) {
data.city = "Not found";
data.city = '!{__("Not found")}';
}
city.textContent = data.city;
if (data.latitude && data.longitude) {
var location = document.getElementById("location");
location.href = `https://www.openstreetmap.org/?mlat=${data.latitude}&mlon=${data.longitude}&zoom=11&layers=M`;
location.title = '!{__("Click to open in map")}';
}
city.textContent = data.city
var latitude = document.getElementById("user_latitude");
if (! data.latitude) {
data.latitude = "Not found";
data.latitude = '!{__("Not found")}';
}
latitude.textContent = data.latitude
latitude.textContent = data.latitude;
var longitude = document.getElementById("user_longitude");
if (! data.longitude) {
data.longitude = "Not found";
data.longitude = '!{__("Not found")}';
}
longitude.textContent = data.longitude
longitude.textContent = data.longitude;
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment