From 34398abf28222d70508fe56ef11b87819220751f Mon Sep 17 00:00:00 2001 From: Jade Freeman Date: Sat, 15 Nov 2014 07:42:06 -0500 Subject: [PATCH] nls support --- viewer/js/gis/dijit/Identify.js | 11 +++++++---- viewer/js/gis/dijit/Identify/nls/resource.js | 14 ++++++++++++++ .../js/gis/dijit/Identify/templates/Identify.html | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 viewer/js/gis/dijit/Identify/nls/resource.js diff --git a/viewer/js/gis/dijit/Identify.js b/viewer/js/gis/dijit/Identify.js index 9d804b277..a724b5648 100644 --- a/viewer/js/gis/dijit/Identify.js +++ b/viewer/js/gis/dijit/Identify.js @@ -13,14 +13,17 @@ define([ 'esri/tasks/IdentifyParameters', 'esri/dijit/PopupTemplate', 'dojo/text!./Identify/templates/Identify.html', + 'dojo/i18n!./Identify/nls/resource', + 'dijit/form/Form', 'dijit/form/FilteringSelect', 'xstyle/css!./Identify/css/Identify.css' -], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, MenuItem, lang, array, all, topic, Memory, IdentifyTask, IdentifyParameters, PopupTemplate, IdentifyTemplate) { +], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, MenuItem, lang, array, all, topic, Memory, IdentifyTask, IdentifyParameters, PopupTemplate, IdentifyTemplate, i18n) { return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], { widgetsInTemplate: true, templateString: IdentifyTemplate, baseClass: 'gis_IdentifyDijit', + i18n: i18n, mapClickMode: null, identifies: {}, @@ -110,7 +113,7 @@ define([ this.mapRightClick = evt; })); this.mapRightClickMenu.addChild(new MenuItem({ - label: 'Identify here', + label: this.i18n.rightClickMenuItem.label, onClick: lang.hitch(this, 'handleRightClick') })); }, @@ -140,7 +143,7 @@ define([ })); if (identifies.length > 0) { - this.map.infoWindow.setTitle('Identifying...'); + this.map.infoWindow.setTitle( this.i18n.mapInfoWindow.identifyingTitle ); this.map.infoWindow.setContent('
'); this.map.infoWindow.show(mapPoint); all(identifies).then(lang.hitch(this, 'identifyCallback', identifiedlayers), lang.hitch(this, 'identifyError')); @@ -408,7 +411,7 @@ define([ this.identifyLayerDijit.set('disabled', (identifyItems.length < 1)); if (identifyItems.length > 0) { identifyItems.unshift({ - name: '*** All Visible Layers ***', + name: this.i18n.labels.allVisibleLayers, id: '***' }); if (!id) { diff --git a/viewer/js/gis/dijit/Identify/nls/resource.js b/viewer/js/gis/dijit/Identify/nls/resource.js new file mode 100644 index 000000000..54093328c --- /dev/null +++ b/viewer/js/gis/dijit/Identify/nls/resource.js @@ -0,0 +1,14 @@ +define ({ + root: { + labels: { + selectLayer: 'Choose "All Visible Layers" or a single layer for identify:', + allVisibleLayers: '*** All Visible Layers ***' + }, + rightClickMenuItem: { + label: 'Identify here' + }, + mapInfoWindow: { + identifyingTitle: 'Identifying...' + } + } +}); \ No newline at end of file diff --git a/viewer/js/gis/dijit/Identify/templates/Identify.html b/viewer/js/gis/dijit/Identify/templates/Identify.html index 7b96e4d4a..603aa7579 100644 --- a/viewer/js/gis/dijit/Identify/templates/Identify.html +++ b/viewer/js/gis/dijit/Identify/templates/Identify.html @@ -1,7 +1,7 @@
-
+