Mercurial > dive4elements > gnv-client
changeset 980:80a5cde45d12
Added i18n support to the mapclient.
gnv/trunk@1158 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 04 Jun 2010 11:45:39 +0000 (2010-06-04) |
parents | 96db238fc5ab |
children | 10bee74ab915 |
files | gnv/ChangeLog gnv/src/main/resources/applicationMessages.properties gnv/src/main/resources/applicationMessages_en.properties gnv/src/main/webapp/scripts/viewport.jsp |
diffstat | 4 files changed, 65 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv/ChangeLog Fri Jun 04 08:32:29 2010 +0000 +++ b/gnv/ChangeLog Fri Jun 04 11:45:39 2010 +0000 @@ -1,3 +1,10 @@ +2010-06-04 Tim Englich <tim.englich@intevation.de> + + * src/main/webapp/scripts/viewport.jsp, + src/main/resources/applicationMessages.properties, + src/main/resources/applicationMessages_en.properties: + Added i18n support to the mapclient. + 2010-06-04 Tim Englich <tim.englich@intevation.de> * src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp,
--- a/gnv/src/main/resources/applicationMessages.properties Fri Jun 04 08:32:29 2010 +0000 +++ b/gnv/src/main/resources/applicationMessages.properties Fri Jun 04 11:45:39 2010 +0000 @@ -126,3 +126,22 @@ mismatching.checksum=Ung\u00fcltiges Artefakt Dokument gefunden. no.such.factory=Ung\u00fcltiges Artefakt Dokument gefunden. java.io.ioexception..no.such.artifact=Ihr Artefakt ist ung\u00fcltig oder bereits abgelaufen. + + +# the map client + +gnviewer.mapclient.layercontrol = Layerkontrolle +gnviewer.mapclient.layercontrol.baselayer = Hintergrundlayer +gnviewer.mapclient.layercontrol.overlay = Generierte Layer +gnviewer.mapclient.legend = Legende +gnviewer.mapclient.wms.load.title = Weitere Layer hinzuf�gen +gnviewer.mapclient.wms.load.addlayer = Layer hinzuf�gen +gnviewer.mapclient.wms.load.grid.name = Name +gnviewer.mapclient.wms.load.grid.title = Titel +gnviewer.mapclient.wms.load.bt.text = Laden +gnviewer.mapclient.wms.load.bt.tooltip = L�d das Capabilities Dokument vom angegebenen Server +gnviewer.mapclient.controls.nav.previous.title = Springt zum letzten Kartenausschnitt +gnviewer.mapclient.controls.nav.next.title = Springt zum vorherigen Kartenausschnitt +gnviewer.mapclient.controls.navigate.title = Verschieben der Karte +gnviewer.mapclient.controls.zoombox.title = Zum Zoomen ziehen Sie eine Box auf, indem Sie klicken und ziehen +gnviewer.mapclient.controls.info.title = Detailinformationen zu Objekten durch Klicken in die Karte \ No newline at end of file
--- a/gnv/src/main/resources/applicationMessages_en.properties Fri Jun 04 08:32:29 2010 +0000 +++ b/gnv/src/main/resources/applicationMessages_en.properties Fri Jun 04 11:45:39 2010 +0000 @@ -124,3 +124,22 @@ mismatching.checksum=Invalid artifact found. no.such.factory=Invalid artifact found. java.io.ioexception..no.such.artifact=Your artifact is invalid or out of date. + + +# the map client + +gnviewer.mapclient.layercontrol = Layercontrol +gnviewer.mapclient.layercontrol.baselayer = Baselayer +gnviewer.mapclient.layercontrol.overlay = Overlay +gnviewer.mapclient.legend = Legend +gnviewer.mapclient.wms.load.title = Add further Layer +gnviewer.mapclient.wms.load.addlayer = Add Layer +gnviewer.mapclient.wms.load.grid.name = Name +gnviewer.mapclient.wms.load.grid.title = Title +gnviewer.mapclient.wms.load.bt.text = Load +gnviewer.mapclient.wms.load.bt.tooltip = Load the Capabilities document from the given destination. +gnviewer.mapclient.controls.nav.previous.title = Jumps to the last Mapview +gnviewer.mapclient.controls.nav.next.title = Jumps to the last Mapview +gnviewer.mapclient.controls.navigate.title = Moves the map +gnviewer.mapclient.controls.zoombox.title = Zoom by clicking an moving the mouseto generate a bix +gnviewer.mapclient.controls.info.title = Identify features by clicking \ No newline at end of file
--- a/gnv/src/main/webapp/scripts/viewport.jsp Fri Jun 04 08:32:29 2010 +0000 +++ b/gnv/src/main/webapp/scripts/viewport.jsp Fri Jun 04 11:45:39 2010 +0000 @@ -1,4 +1,7 @@ +<%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> +<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> OpenLayers.ProxyHost= "/cgi-bin/proxy.cgi?url="; +OpenLayers.Lang.setCode('<%=SessionModelFactory.getInstance().getSessionModel(request).getCurrentLocale().getLanguage() %>'); Ext.BLANK_IMAGE_URL = "scripts/openlayers/OpenLayers-2.9/theme/default/img/blank.gif"; /** @@ -38,6 +41,8 @@ var nav = new OpenLayers.Control.NavigationHistory(); + nav.previous.title = "<bean:message key="gnviewer.mapclient.controls.nav.previous.title"/>"; + nav.next.title = "<bean:message key="gnviewer.mapclient.controls.nav.next.title"/>"; map.addControl(nav); panel = new OpenLayers.Control.Panel(); @@ -47,19 +52,19 @@ navigate: new OpenLayers.Control.MouseDefaults( { displayClass: 'olControlPan', - title:'Verschieben der Karte' + title:'<bean:message key="gnviewer.mapclient.controls.navigate.title"/>' } ), zoombox: new OpenLayers.Control.ZoomBox( { displayClass: 'olControlZoomBox', - title: 'Zum Zoomen ziehen Sie eine Box auf, indem Sie klicken und ziehen' + title: '<bean:message key="gnviewer.mapclient.controls.zoombox.title"/>' } ), info : new OpenLayers.Control.WMSGetFeatureInfo({ displayClass: "olControlFeatureInfo", url: 'http://fluggs.wupperverband.de/wmsconnector/com.esri.wms.Esrimap/WV_WMS', - title: 'Identify features by clicking', + title: '<bean:message key="gnviewer.mapclient.controls.info.title"/>', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { @@ -115,19 +120,19 @@ store: store, cm: new Ext.grid.ColumnModel([ { - header: 'Name', + header: '<bean:message key="gnviewer.mapclient.wms.load.grid.name"/>', dataIndex: 'name', sortable: true }, { id: 'title', - header: 'Title', + header: '<bean:message key="gnviewer.mapclient.wms.load.grid.title"/>', dataIndex: 'title', sortable: true }]), renderTo: 'capgrid', bbar: [{ - text: 'Add Layer', + text: '<bean:message key="gnviewer.mapclient.wms.load.addlayer"/>', handler: addLayer }] }); @@ -135,7 +140,7 @@ id: 'wmspanel', border: true, region: 'east', - title: 'WMS Capabilities', + title: '<bean:message key="gnviewer.mapclient.wms.load.title"/>', collapsible: false, split: false, contentEl: 'cap', @@ -153,8 +158,8 @@ id: 'capbutton', region: 'west', handler: updateCapabilities, - text: 'Lade', - tooltip: 'Lade GetCapabilities Dokument', + text: '<bean:message key="gnviewer.mapclient.wms.load.bt.text"/>', + tooltip: '<bean:message key="gnviewer.mapclient.wms.load.bt.tooltip"/>', renderTo: 'urlbutton' }); @@ -169,7 +174,7 @@ border: true, enableDD: true, region: "east", - title: "LayerTree", + title: "<bean:message key="gnviewer.mapclient.layercontrol"/>", width: 200, split: true, collapsible: false, @@ -182,9 +187,11 @@ nodeType: "async", children: [{ nodeType: "gx_baselayercontainer", + text: "<bean:message key="gnviewer.mapclient.layercontrol.baselayer"/>", expanded: true }, { nodeType: "gx_overlaylayercontainer", + text: "<bean:message key="gnviewer.mapclient.layercontrol.overlay"/>", expanded: true, loader: { filter: function(record) { @@ -206,7 +213,7 @@ id: 'legendpanel', dynamic: true, border: true, - title: 'Legende', + title: '<bean:message key="gnviewer.mapclient.legend"/>', collapsible: false, split: false, defaults: { @@ -216,8 +223,7 @@ bodyStyle: 'padding:5px', width: 250, autoScroll: true, - region: 'east' - //layerStore: mapPanel.layers + region: 'east', }); @@ -252,8 +258,7 @@ new Ext.Panel({ renderTo: "mapcontainer", layout: "border", - width: 700, - height: 420, + height: 400, items: [mapPanel, mylegend] });