Skip to content

Commit

Permalink
Merge pull request #580 from cmv/feature/additional-translations
Browse files Browse the repository at this point in the history
Additional translations and new locale widget
  • Loading branch information
DavidSpriggs authored Aug 7, 2016
2 parents b38cb8a + 749c136 commit 52973b1
Show file tree
Hide file tree
Showing 63 changed files with 1,318 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This JavaScript web app can be easily configured or used as a boilerplate/starti
- Identify
- Layer Control (Table of Contents)
- Legend
- Locale (Change the Country + Language)
- Locate Button (Geolocation)
- MapInfo
- Measure
Expand Down
3 changes: 3 additions & 0 deletions viewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
</div>
</div>
<script type="text/javascript">
var s = window.location.search, q = s.match(/locale=([^&]*)/i);
var locale = (q && q.length > 0) ? q[1] : null;
window.dojoConfig = {
locale: locale,
async: true
};
</script>
Expand Down
1 change: 0 additions & 1 deletion viewer/js/config/basemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ define([
return {
map: true, // needs a reference to the map
mode: 'agol', // mut be either 'agol' or 'custom'
title: i18n.basemaps.title, // title for widget

/* optional starting basemap
/ otherwise uses the basemap from the map
Expand Down
64 changes: 64 additions & 0 deletions viewer/js/config/nls/es/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// http://dojotoolkit.org/reference-guide/1.10/dojo/i18n.html
define({
basemaps: {
davidRumseyMap1812: 'David Rumsey 1812',
darkGrayVector: 'Gris oscuro',
earthAtNight: 'Tierra en la noche',
grayVector: 'Gris',
hybrid: 'Híbrido',
landsatShaded: 'Landsat sombreada',
nationalGeographic: 'Nat Geo',
oceans: 'Oceános',
osm: 'Open Street Map',
satellite: 'Satélite',
streets: 'Calle',
streetsNavigationVector: 'Calle (Navegación)',
streetsNightVector: 'Calle (Noche)',
streetsReliefVector: 'Calle (Relieve)',
terrain: 'Terreno',
title: 'Mapas base',
topo: 'Topográfico'
},
bookmarks: {
nullIsland: 'Isla nula',
usa: 'EE.UU.'
},
find: {
louisvillePubSafety: 'Encontrar un local de Seguridad Pública por su nombre',
sf311Incidents: 'Encuentra incidente por código/descripción'
},
identify: {
louisvillePubSafety: {
policeStation: 'Comisaría de Policía',
trafficCamera: 'Cámara de Tráfico'
}
},
viewer: {
operationalLayers: {
damageAssessment: 'Valoración de daño',
louisvillePubSafety: 'Seguridad Pública de Louisville',
restaurants: 'Restaurantes',
sf311Incidents: '311 Incidentes de San Francisco'
},
titles: {
header: 'Configurable Map Viewer',
pageTitle: 'Configurable Map Viewer — Un visor de mapas configurables', // One configurable map viewer
subHeader: 'personalizarlo a su gusto' // customize it at your will (the literal translation doesn’t sound good)
},
widgets: {
bookmarks: 'Marcadores',
directions: 'Direcciones',
draw: 'Dibujar',
editor: 'Editor',
find: 'Encontrar',
help: 'Ayuda',
identify: 'Identificar',
measure: 'Medición',
layerControl: 'Capas',
legend: 'Leyenda',
locale: 'Lugar',
print: 'Imprimir',
streetview: 'Google Street View'
}
}
});
63 changes: 63 additions & 0 deletions viewer/js/config/nls/fr/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// http://dojotoolkit.org/reference-guide/1.10/dojo/i18n.html
define({
basemaps: {
davidRumseyMap1812: 'David Rumsey 1812',
darkGrayVector: 'Gris Foncé',
earthAtNight: 'Terre la nuit',
grayVector: 'Gris',
hybrid: 'Hybride',
landsatShaded: 'Landsat Ombragée',
nationalGeographic: 'National Geographic',
oceans: 'Oceans',
osm: 'Open Street Map',
satellite: 'Photos aériennes',
streets: 'Rues',
streetsNavigationVector: 'Rues (Navigation)',
streetsNightVector: 'Rues (Nuit)',
streetsReliefVector: 'Rues (Relief)',
terrain: 'Sol',
topo: 'Topographique'
},
bookmarks: {
nullIsland: 'Île Null',
usa: 'USA'
},
find: {
louisvillePubSafety: 'Trouvez une Sécurité Publique locale par nom',
sf311Incidents: 'Trouver incident en code/description'
},
identify: {
louisvillePubSafety: {
policeStation: 'Poste de police',
trafficCamera: 'Caméra de circulation'
}
},
viewer: {
operationalLayers: {
damageAssessment: 'Évaluation des Dommages',
louisvillePubSafety: 'Louisville Sécurité Publique',
restaurants: 'Restaurants',
sf311Incidents: '311 Incidents de San Francisco'
},
titles: {
header: 'Configurable Map Viewer',
pageTitle: 'Configurable Map Viewer - Un visualiseur de cartes configurables',
subHeader: 'personalizarlo su gusto'
},
widgets: {
bookmarks: 'Géosignets',
directions: 'Directions',
draw: 'Annotations',
editor: 'Éditeur',
find: 'Rechercher',
help: 'Aide',
identify: 'Identifier',
measure: 'Mesures',
layerControl: 'Couches d\'information',
legend: 'Légende',
locale: 'Lieu',
print: 'Impression',
streetview: 'Google Street View'
}
}
});
5 changes: 4 additions & 1 deletion viewer/js/config/nls/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ define({
streetsNightVector: 'Streets (Night)',
streetsReliefVector: 'Streets (Relief)',
terrain: 'Terrain',
title: 'Basemaps',
topo: 'Topographic'
},
bookmarks: {
Expand Down Expand Up @@ -57,10 +56,14 @@ define({
measure: 'Measurement',
layerControl: 'Layers',
legend: 'Legend',
locale: 'Locale',
print: 'Print',
streetview: 'Google Street View'
}
}
},
'es': true,
'fr': true,
'pt-br': true,
'pt-pt': true
});
63 changes: 63 additions & 0 deletions viewer/js/config/nls/pt-br/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// http://dojotoolkit.org/reference-guide/1.10/dojo/i18n.html
define({
basemaps: {
davidRumseyMap1812: 'David Rumsey 1812',
darkGrayVector: 'Cinzento escuro',
earthAtNight: 'Terra à noite',
grayVector: 'Cinzento',
hybrid: 'Híbrido',
landsatShaded: 'Landsat sombreado',
nationalGeographic: 'National Geographic',
oceans: 'Oceanos',
osm: 'Open Street Map',
satellite: 'Satélite',
streets: 'Ruas',
streetsNavigationVector: 'Ruas (Navegação)',
streetsNightVector: 'Ruas (Nocturno)',
streetsReliefVector: 'Ruas (Relevo)',
terrain: 'Terreno',
topo: 'Topográfico'
},
bookmarks: {
nullIsland: 'Ilha Nula',
usa: 'EUA'
},
find: {
louisvillePubSafety: 'Encontrar um local de Segurança Pública pelo nome',
sf311Incidents: 'Encontrar incidente por código/descrição'
},
identify: {
louisvillePubSafety: {
policeStation: 'Esquadra da Polícia',
trafficCamera: 'Câmara de trânsito'
}
},
viewer: {
operationalLayers: {
damageAssessment: 'Avaliação de dano',
louisvillePubSafety: 'Segurança Pública de Louisville',
restaurants: 'Restaurantes',
sf311Incidents: 'Incidentes do 311 de São Francisco'
},
titles: {
header: 'Configurable Map Viewer',
pageTitle: 'Configurable Map Viewer — Um visualizador de mapas configurável', // One configurable map viewer
subHeader: 'personaliza-o ao teu gosto' // customize it at your will (the literal translation doesn’t sound good)
},
widgets: {
bookmarks: 'Marcadores',
directions: 'Direcções',
draw: 'Desenhar',
editor: 'Editor',
find: 'Procurar',
help: 'Ajuda',
identify: 'Identificar',
measure: 'Medir',
layerControl: 'Camadas',
legend: 'Legendas',
locale: 'Localidade',
print: 'Imprimir',
streetview: 'Google Street View'
}
}
});
2 changes: 1 addition & 1 deletion viewer/js/config/nls/pt-pt/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ define({
streetsNightVector: 'Ruas (Nocturno)',
streetsReliefVector: 'Ruas (Relevo)',
terrain: 'Terreno',
title: 'Mapas base',
topo: 'Topográfico'
},
bookmarks: {
Expand Down Expand Up @@ -56,6 +55,7 @@ define({
measure: 'Medir',
layerControl: 'Camadas',
legend: 'Legendas',
locale: 'Localidade',
print: 'Imprimir',
streetview: 'Google Street View'
}
Expand Down
14 changes: 14 additions & 0 deletions viewer/js/config/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,20 @@ define([
mapRightClickMenu: true
}
},
locale: {
include: true,
id: 'locale',
//type: 'titlePane',
//position: 0,
//open: true,
type: 'domNode',
srcNodeRef: 'geocodeDijit',
path: 'gis/dijit/Locale',
title: i18n.viewer.widgets.locale,
options: {
style: 'margin-left: 30px;'
}
},
help: {
include: true,
id: 'help',
Expand Down
3 changes: 3 additions & 0 deletions viewer/js/gis/dijit/Basemaps/nls/es/resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
define ({
title: 'Mapas base'
});
3 changes: 3 additions & 0 deletions viewer/js/gis/dijit/Basemaps/nls/fr/resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
define ({
title: 'Fond de carte'
});
3 changes: 3 additions & 0 deletions viewer/js/gis/dijit/Basemaps/nls/pt-br/resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
define ({
title: 'Mapas base'
});
3 changes: 3 additions & 0 deletions viewer/js/gis/dijit/Basemaps/nls/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ define ({
root: {
title: 'Basemaps'
},
'es': true,
'fr': true,
'pt-br': true,
'pt-pt': true
});
23 changes: 23 additions & 0 deletions viewer/js/gis/dijit/Directions/nls/es/resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
define ({
labels: {
startAtMyLocation: 'comenzará a mi ubicación',
endAtMyLocation: 'terminar en mi ubicación',
clearStops: 'paradas claras',
addStop: 'Añadir parada',
directionsToHere: 'Direcciones a aquí',
directionsFromHere: 'Direcciones de aquí',
useMyLocationAsStart: 'Usar mi ubicación como punto de inicio',
useMyLocationAsEnd: 'Usar mi ubicación como punto final',
directions: 'Direcciones'
},
errors: {
geoLocation: {
title: 'Error',
message: 'No geolocalización apoyado por su hojeanr.'
},
location: {
title: 'Error',
message: 'Hubo un problema con su ubicación: '
}
}
});
23 changes: 23 additions & 0 deletions viewer/js/gis/dijit/Directions/nls/fr/resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
define ({
labels: {
startAtMyLocation: 'commencer à mon endroit',
endAtMyLocation: 'fin à mon endroit',
clearStops: 'arrêts clairs',
addStop: 'Ajouter arrêt',
directionsToHere: 'Directions vers ici',
directionsFromHere: 'Directions d\'ici',
useMyLocationAsStart: 'Utiliser ma position comme point de départ',
useMyLocationAsEnd: 'Utiliser ma position comme point final',
directions: 'Directions'
},
errors: {
geoLocation: {
title: 'Erreur',
message: 'Géolocalisation non supporté par votre navigateur.'
},
location: {
title: 'Erreur',
message: 'Il y avait un problème pour obtenir votre position: '
}
}
});
23 changes: 23 additions & 0 deletions viewer/js/gis/dijit/Directions/nls/pt-br/resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
define({
labels: {
startAtMyLocation: 'Inicie na minha Localização',
endAtMyLocation: 'Termine na minha Localização',
clearStops: 'Limpar paradas',
addStop: 'Adicionar parada',
directionsToHere: 'Direções para aqui',
directionsFromHere: 'Direções daqui',
useMyLocationAsStart: 'Use minha Localização como ponto de início',
useMyLocationAsEnd: 'Use minha Localização como ponto final',
directions: 'Direções'
},
errors: {
geoLocation: {
title: 'Erro',
message: 'GeoLocalização não suportada no seu navegador.'
},
location: {
title: 'Erro',
message: 'Houve um problema ao buscar sua Localização: '
}
}
});
3 changes: 3 additions & 0 deletions viewer/js/gis/dijit/Directions/nls/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ define ({
}
}
},
'es': true,
'fr': true,
'pt-br': true,
'pt-pt': true
});
Loading

0 comments on commit 52973b1

Please sign in to comment.