-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrads.js
More file actions
214 lines (201 loc) · 9.83 KB
/
trads.js
File metadata and controls
214 lines (201 loc) · 9.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
var msgs =
{
'fr':
{
computer_needed: 'Vous avez besoin d\'un ordinateur avec souris pour utiliser cette fonction',
line_explain: 'Cliquez sur les points du parcours',
grid_explain: 'Double-cliquez sur le coin supérieur droit de la grille',
grid_explain_draw: 'Dessinez la zone couverte par la grille',
square_size: 'Taille d\'un carré (mètres)',
link_explain: 'Ce bouton génère un lien pour partager la grille ou le parcours. Vous pouvez créer votre première grille en cliquant sur "Créer grille" et votre premier parcours en cliquant sur "Créer parcours"',
quickgrid_explain: 'Quickgrid : se repérer par rapport à un quadrillage ou à un parcours. Pour un résultat optimal, dessinez la grille ou le parcours sur ordinateur, puis chargez le lien sur mobile.\n\nVIE PRIVÉE: Votre localisation est utilisée pour centrer la carte, elle n\'est pas transmise au serveur. Si vous utilisez un service externe de localisation (ex : Google), votre position peut lui être transmise. Les parcours que vous tracez sont stockées sur jsonblob.com et accessible à tout qui connaît le lien public compliqué . Nous enregistrons la date et l\'heure de votre passage, le pays de votre adresse IP (sans transmission à un serveur tiers) ainsi qu\'une empreinte (fonction sha1) de votre adresse IP, afin de gérer au mieux ce service. Plus d\'infos : https://docs.my-poppy.eu/privacy.html.\n\nFourni sans aucune garantie. Référez-vous au code source sur GitHub (ccloquet/quickgrid)',
close_to: 'vous semblez près de :',
grid_choose: 'Choisissez le carroyage qui vous convient:',
perso_size_between: 'ou entrez une taille de carré personnalisée (entre ',
and: 'et',
out_of_br_area: 'HORS<br>ZONE',
out_of_area: 'HORS ZONE',
gps_error: 'ERREUR<br>▷ ACTIVEZ LE GPS / VÉRIFIEZ VIE PRIVÉE',
update_error: 'POSITION INVALIDE<br>▷ ATTENDEZ 1 MINUTE OU <i class="fa fa-refresh"></i> LA PAGE',
acquiring_hint: '<br><span style="color:yellow" class="blink">check GPS/privacy, use Chrome/Safari</span>',
update: 'Màj:',
unknown: 'INCONNU',
adress: 'Adresse',
acquiring: 'Localisation en cours',
grid_short: 'Grille',
generate_short: 'Générer',
parcours_short: 'Parcours',
KML_short: 'KML',
waiting: 'En attente des données...',
error_url: 'Une erreur est survenue, le lien n\'est pas valide',
or: ' ou ',
},
'en':
{
computer_needed: 'You need a computer with a mouse to use this function',
line_explain: 'Click on the track points',
grid_explain: 'Double-click on the top right corner of the grid',
grid_explain_draw: 'Draw the area covered by the grid',
square_size: 'Size of a square (meters)',
link_explain: 'This button generates a link to share the grid or the track. You can generate your first grid by clicking on "Create grid" and your first track by clicking on "Create track"',
quickgrid_explain: 'Quickgrid: locate yourself wrt a grid or a track. For an optimal result, draw the grid or the track from a computer, then load the link on mobile.\n\nPRIVACY: Your location is used to center the map, it is not sent to the server. If you use an external location service (eg: Google), your location may be sent to it. The track you draw are stored on jsonblob.com and accessibles to anyone knowing the complicated public link. We record the date and time of your usage, the country of your IP adress (without transmission to a third party server), and a hash (sha1) of your IP adress, to manage the service. More info on: https://docs.my-poppy.eu/privacy.html.\n\nNo warranty of any kind. Take a look at the source code on GitHub (ccloquet/quickgrid)',
close_to: 'you seem close to:',
grid_choose: 'Choose the grid that suits you:',
perso_size_between: 'or indicate a square size (between ',
and: 'and',
out_of_br_area: 'OUT OF<br>AREA',
out_of_area: 'OUT OF AREA',
gps_error: 'ERROR<br>▷ ENABLE GPS OR CHECK PRIVACY',
update_error: 'INVALID LOCATION<br>▷ PLEASE WAIT A MINUTE OR <i class="fa fa-refresh"></i> PAGE',
update: 'Update:',
update: 'Update:',
unknown: 'UNKNOWN',
adress: 'Adress',
acquiring: 'Acquiring position',
grid_short: 'Grid',
generate_short: 'Make',
parcours_short: 'Track',
KML_short: 'KML',
waiting: 'Waiting for data...',
error_url: 'An error occurred, the link is not valid',
or: ' or ',
},
'nl':
{
computer_needed: 'Om deze functie te gebruiken heeft u een computer met muis nodig',
line_explain: 'Klik op de punten van het traject',
grid_explain: 'Dubbel-klik op de rechtsbovenste hoek van de rooster',
grid_explain_draw: 'Teken de door de rooster gedekte zone',
square_size: 'Breedte van een vierkant (meters)',
link_explain: 'Dit knop maakt een link om de rooster of het traject te kunnen delen. U kan uw eerste rooster maken door op "Maak rooster" te klikken, en uw eerste traject door op "Teken traject" te klikken',
quickgrid_explain: 'Quickgrid: hou je positie bij met behulp van een rooster of een parcours. Voor een optimaal resultaat teken je het rooster of het parcours op computer en open je het op een mobiel toestel via de link.\n\nPRIVACY: Uw locatie wordt gebruikt om de kaart te centreren, ze wordt niet naar de server gestuurd. Gebruikt u een externe locatieservice (bv. Google), dan kan uw locatie via hen wel doorgegeven worden. De trajecten die u tekent worden op jsonblob.com opgeslagen en worden toegankelijk voor wie de (ingewikkelde) link kent. Om u zo goed mogelijk van dienst te kunnen zijn, slaan wij de datum en het uur van uw bezoek aan onze toepassing op, het land van uw IP-adres (zonder inmenging van een externe dienst), en uw ‘digitale vingerafdruk’ (functie sha1), uw IP adres. Meer info: https://docs.my-poppy.eu/privacy.html.\n\nGeleverd zonder garantie. Bekijk de broncode op GitHub (ccloquet/quickgrid)',
close_to: 'u schijnt dichtbij van:',
grid_choose: 'Kies de rooster die u past:',
perso_size_between: 'of voer een gepersonaliseerde vierkant breedte in (tussen ',
and: 'en',
out_of_br_area: 'BUITEN<br>ZONE',
out_of_area: 'BUITEN ZONE',
gps_error: 'FOUT<br>▷ SCHAKEL GPS IN OF VERIFIEER PRIVACY',
update_error: 'ONGELDIGE LOCATIE<br>▷ WACHT 1 MINUUT OF <i class="fa fa-refresh"></i> PAGINA',
update: 'Update:',
unknown: 'ONBEKEND',
adress: 'Adres',
acquiring: 'Bezig uw localisatie te bepalen',
grid_short: 'Rooster',
generate_short: 'Maak',
parcours_short: 'Traject',
KML_short: 'KML',
waiting: 'Aan het wachten voor data...',
error_url: 'Een fout is gebeurd. De link is ongeldig',
or: ' of '
}
}
var titles =
{
'fr':
{
'btn-grid': 'Créer une grille',
'btn-line': 'Créer un parcours',
'btn-upload': 'Utiliser un parcours existant en KML ou GPX',
'btn-link': 'Générer un lien pour envoyer aux personnes sur le terrain',
'btn-kml': 'Télécharger au format KML'
},
'en':
{
'btn-grid': 'Make a grid',
'btn-line': 'Make a track',
'btn-upload': 'Use an existing track (KML or GPX)',
'btn-link': 'Generate a link to send to the people on the field',
'btn-kml': 'Download in KML format'
},
'nl':
{
'btn-grid': 'Een rooster maken',
'btn-line': 'Een traject tekenen',
'btn-upload': 'Een KML of GPX bestand gebruiken',
'btn-link': 'Een link maken om naar de personen op het terrein te sturen',
'btn-kml': 'Download in KML formaat'
}
}
var htmls =
{
'fr':
{
'btn-grid': '① Créer grille',
'btn-line': '① Créer parcours',
'btn-upload': '① Importer parcours',
'btn-link': '② Générer un lien',
'btn-kml': '③ Télécharger KML',
//'div-accuracy': 'Nous vous avons trouvé avec une précision de',
'myaccuracy': '[ localisation en cours ]',
'mywgs84': '[ localisation en cours ]',
//'div-latlon': 'Latitude/longitude',
'myaddress_0': 'Touchez pour l\'adresse',
'qrcode-use-link': 'Utilisez ce lien sur smartphone pour connaître votre position',
'qrcode-close': 'OK',
'div-demo': 'Version de démo gratuite',
},
'en':
{
'btn-grid': '① Make grid',
'btn-line': '① Make track',
'btn-upload': '① Import track',
'btn-link': '② Make link',
'btn-kml': '③ Download KML',
//'div-accuracy': 'We found you with an accuracy of',
'myaccuracy': '[ trying to retrieve your location ]',
'mywgs84': '[ trying to retrieve your location ]',
//'div-latlon': 'Latitude/longitude',
'myaddress_0': 'Tap to retrieve address',
'qrcode-use-link': 'Use this link on smartphone to know where you are',
'qrcode-close': 'OK',
'div-demo': 'Free demo version',
},
'nl':
{
'btn-grid': '① Maak rooster',
'btn-line': '① Teken traject',
'btn-upload': '① Importeer traject',
'btn-link': '② Deel link',
'btn-kml': '③ Download KML',
//'div-accuracy': 'We hebben u gevonden met eet nauwkeurigheid van:',
'myaccuracy': '[ bezig uw locatie te bepalen ]',
'mywgs84': '[ bezig uw locatie te bepalen ]',
//'div-latlon': 'Breedtegraad/Lengtegraad',
'myaddress_0': 'Tap om het adres te bepalen',
'qrcode-use-link': 'Gebruik deze link op smartphone om uw locatie te bepalen',
'qrcode-close': 'OK',
'div-demo': 'Gratis demo versie',
},
}
var msg = msgs['en'],
title = titles['en'],
html = htmls['en']
var lang = navigator.language || navigator.userLanguage;
var mylang = lang.substr(0,2)
function translate(mylang)
{
if (mylang in msgs)
{
msg = msgs[mylang]
title = titles[mylang]
html = htmls[mylang]
}
for (var id in title)
{
if( title.hasOwnProperty( id ) )
{
$('#' + id).attr('title', title[id])
}
}
for (var id in html)
{
if( html.hasOwnProperty( id ) )
{
console.log(id)
$('#' + id).text(html[id])
}
}
$('.my_or').text(msgs['or'])
}
translate(mylang)