Skip to content

Commit a9ff7f2

Browse files
committed
Completes localzation
Signed-off-by: Daniel Kastl <[email protected]>
1 parent aae85af commit a9ff7f2

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

config/locales/en.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,14 @@ en:
9393
# Localize for use in Javascript
9494
gtt_js:
9595
control:
96-
geocoding: "Geocoding"
96+
geocoding: "Location search"
97+
geolocation: "My location"
9798
maximize: "Zoom to all features"
9899
upload: "Upload GeoJSON"
100+
fullscreen: "Toggle full-screen"
101+
rotate: "Reset rotation"
102+
zoom-in: "Zoom in"
103+
zoom-out: "Zoom out"
99104
modal:
100105
load: "Load"
101106
cancel: "Cancel"

src/components/gtt-client.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,12 @@ export class GttClient {
309309
this.setGeolocation(this.map)
310310
this.parseHistory()
311311

312-
this.map.addControl (new FullScreen())
313-
this.map.addControl (new Rotate())
312+
this.map.addControl (new FullScreen({
313+
tipLabel: this.i18n.control.fullscreen
314+
}))
315+
this.map.addControl (new Rotate({
316+
tipLabel: this.i18n.control.rotate
317+
}))
314318

315319
// Control button
316320
const maximizeCtrl = new Button({
@@ -494,7 +498,7 @@ export class GttClient {
494498
width: 380,
495499
modal: true,
496500
buttons: {
497-
'Load': function() {
501+
[mapObj.i18n.modal.load]: function() {
498502
const geojson_input = document.querySelector('#dialog-geojson-upload textarea') as HTMLInputElement
499503
const data = geojson_input.value
500504
if (data !== null) {
@@ -510,7 +514,7 @@ export class GttClient {
510514
}
511515
$(this).dialog('close')
512516
},
513-
'Cancel': function() {
517+
[mapObj.i18n.modal.cancel]: function() {
514518
$(this).dialog('close')
515519
}
516520
}

0 commit comments

Comments
 (0)