Skip to content

Commit 602b2b3

Browse files
authored
Merge pull request #316 from geostarters/lang_es
update spanish texts and fix language code (`es`, not `sp`)
2 parents 43f47db + c2d46ee commit 602b2b3

File tree

1 file changed

+62
-47
lines changed

1 file changed

+62
-47
lines changed

src/L.Routing.Localization.js

Lines changed: 62 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
(function() {
22
'use strict';
3+
4+
var spanish = {
5+
directions: {
6+
N: 'norte',
7+
NE: 'noreste',
8+
E: 'este',
9+
SE: 'sureste',
10+
S: 'sur',
11+
SW: 'suroeste',
12+
W: 'oeste',
13+
NW: 'noroeste',
14+
SlightRight: 'leve giro a la derecha',
15+
Right: 'derecha',
16+
SharpRight: 'giro pronunciado a la derecha',
17+
SlightLeft: 'leve giro a la izquierda',
18+
Left: 'izquierda',
19+
SharpLeft: 'giro pronunciado a la izquierda',
20+
Uturn: 'media vuelta'
21+
},
22+
instructions: {
23+
// instruction, postfix if the road is named
24+
'Head':
25+
['Derecho {dir}', ' sobre {road}'],
26+
'Continue':
27+
['Continuar {dir}', ' en {road}'],
28+
'TurnAround':
29+
['Dar vuelta'],
30+
'WaypointReached':
31+
['Llegó a un punto del camino'],
32+
'Roundabout':
33+
['Tomar {exitStr} salida en la rotonda', ' en {road}'],
34+
'DestinationReached':
35+
['Llegada a destino'],
36+
'Fork': ['En el cruce gira a {modifier}', ' hacia {road}'],
37+
'Merge': ['Incorpórate {modifier}', ' hacia {road}'],
38+
'OnRamp': ['Gira {modifier} en la salida', ' hacia {road}'],
39+
'OffRamp': ['Toma la salida {modifier}', ' hacia {road}'],
40+
'EndOfRoad': ['Gira {modifier} al final de la carretera', ' hacia {road}'],
41+
'Onto': 'hacia {road}'
42+
},
43+
formatOrder: function(n) {
44+
return n + 'º';
45+
},
46+
ui: {
47+
startPlaceholder: 'Inicio',
48+
viaPlaceholder: 'Via {viaNumber}',
49+
endPlaceholder: 'Destino'
50+
},
51+
units: {
52+
meters: 'm',
53+
kilometers: 'km',
54+
yards: 'yd',
55+
miles: 'mi',
56+
hours: 'h',
57+
minutes: 'min',
58+
seconds: 's'
59+
}
60+
};
61+
362
L.Routing = L.Routing || {};
463

564
L.Routing.Localization = L.Class.extend({
@@ -208,53 +267,9 @@
208267
}
209268
},
210269

211-
'sp': {
212-
directions: {
213-
N: 'norte',
214-
NE: 'noreste',
215-
E: 'este',
216-
SE: 'sureste',
217-
S: 'sur',
218-
SW: 'suroeste',
219-
W: 'oeste',
220-
NW: 'noroeste'
221-
},
222-
instructions: {
223-
// instruction, postfix if the road is named
224-
'Head':
225-
['Derecho {dir}', ' sobre {road}'],
226-
'Continue':
227-
['Continuar {dir}', ' en {road}'],
228-
'SlightRight':
229-
['Leve giro a la derecha', ' sobre {road}'],
230-
'Right':
231-
['Derecha', ' sobre {road}'],
232-
'SharpRight':
233-
['Giro pronunciado a la derecha', ' sobre {road}'],
234-
'TurnAround':
235-
['Dar vuelta'],
236-
'SharpLeft':
237-
['Giro pronunciado a la izquierda', ' sobre {road}'],
238-
'Left':
239-
['Izquierda', ' en {road}'],
240-
'SlightLeft':
241-
['Leve giro a la izquierda', ' en {road}'],
242-
'WaypointReached':
243-
['Llegó a un punto del camino'],
244-
'Roundabout':
245-
['Tomar {exitStr} salida en la rotonda', ' en {road}'],
246-
'DestinationReached':
247-
['Llegada a destino'],
248-
},
249-
formatOrder: function(n) {
250-
return n + 'º';
251-
},
252-
ui: {
253-
startPlaceholder: 'Inicio',
254-
viaPlaceholder: 'Via {viaNumber}',
255-
endPlaceholder: 'Destino'
256-
}
257-
},
270+
'es': spanish,
271+
'sp': spanish,
272+
258273
'nl': {
259274
directions: {
260275
N: 'noordelijke',

0 commit comments

Comments
 (0)