[Mapbender-commits] r5563 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Sat Feb 20 09:50:30 EST 2010
Author: astrid_emde
Date: 2010-02-20 09:50:29 -0500 (Sat, 20 Feb 2010)
New Revision: 5563
Modified:
trunk/mapbender/http/php/mod_gazetteerMetadata.php
Log:
i18n and some repairs
Modified: trunk/mapbender/http/php/mod_gazetteerMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_gazetteerMetadata.php 2010-02-20 14:46:54 UTC (rev 5562)
+++ trunk/mapbender/http/php/mod_gazetteerMetadata.php 2010-02-20 14:50:29 UTC (rev 5563)
@@ -110,6 +110,24 @@
var metadataPopup;
+function i18nInit(){
+ parent.Mapbender.events.localize.register(function(){
+ window.location.reload();
+ });
+}
+
+
+function init(){
+ if (parent.Mapbender.events.init.done){
+ i18nInit();
+ }
+ else{
+ parent.Mapbender.events.init.register(function(){
+ i18nInit();
+ });
+ }
+}
+
var loadWmsAndZoomCallback = function (opt) {
if (typeof opt === "object" && opt.success) {
@@ -117,7 +135,7 @@
var wms = map.wms[map.wms.length - 1];
if (wms === null) {
- opt.msg = "Ein unbekannter Fehler ist aufgetreten.";
+ opt.msg = "<?php echo _mb("An error occured."); ?>";
}
else {
var wmsId = wms.wms_id;
@@ -129,10 +147,7 @@
if (addwms_showWMS > 0) {
try {
- var msg = "Der hinzugeladene Kartendienst " +
- "verfügt über mehr als " + addwms_showWMS +
- " Ebenen. Die Ebenen des Dienstes werden " +
- "<b>nicht</b> aktiviert.";
+ var msg = "<?php echo _mb("The added Service has more than"); ?> " + addwms_showWMS + " <?php echo _mb("layer. The layer of the MapService will NOT be activated."); ?>";
parent.Mapbender.Modules.dialogManager.openDialog({
content: msg,
@@ -183,19 +198,18 @@
var msg = typeof opt.msg === "string" ? opt.msg : "";
if (typeof opt !== "object" || !opt.success) {
- msg = "Ein unbekannter Fehler ist aufgetreten. ";
+ msg = "<?php echo _mb("An error occured."); ?>";
}
else {
var map = parent.getMapObjByName(myTarget);
var wms = map.wms[map.wms.length - 1];
if (wms !== null) {
- msg = "Der folgende Dienst wurde zu 'Aktive Dienste' " +
- "hinzugefügt:<br><br>";
+ msg = "<?php echo _mb("The following Service has been added"); ?>:<br><br>";
msg += "<b>" + wms.wms_title + "</b><br><br>";
}
else {
- msg = "Ein unbekannter Fehler ist aufgetreten. ";
+ msg = "<?php echo _mb("An error occured."); ?>";
}
}
try {
@@ -217,7 +231,7 @@
keywordPopup.destroy();
}
keywordPopup = new parent.mb_popup({
- title : "SelectKeyword",
+ title : "<?php echo _mb("Select a keyword"); ?>",
url : "../php/mod_SelectKeyword.php",
width : 550,
height : 260,
@@ -232,7 +246,7 @@
// metadataPopup.destroy();
// }
metadataPopup = new parent.mb_popup({
- title : "Metadata",
+ title : "<?php echo _mb("Metadata"); ?>",
url : "../php/mod_layerMetadata.php?id=" + layerId,
width : 450,
height : 600,
@@ -250,7 +264,7 @@
return false;
}
else{
- document.getElementById("resultDivTag").innerHTML = "<table><tr><td><img src='../img/indicator_wheel.gif'></td><td>Searching...</td></tr></table>";
+ document.getElementById("resultDivTag").innerHTML = "<table><tr><td><img src='../img/indicator_wheel.gif'></td><td><?php echo _mb("Searching"); ?>...</td></tr></table>";
var ind = parent.getMapObjIndexByName('mapframe1');
parent.mb_ajax_json(
@@ -300,7 +314,7 @@
"});";
}
text += "<img name='add_wms' style='cursor: pointer;' src='" + imgUrl + "' ";
- text += "border='0' title='Load' ";
+ text += "border='0' title='<?php echo _mb("Load"); ?>' ";
text += "onclick='" + onclickFunction + "'>";
if (typeof(resultObj.layer_name) !== "undefined") {
@@ -325,7 +339,7 @@
"});";
}
text += "<img src='../img/tree_zoom.png' ";
- text += "border='0' title='WMS zu aktiven Diensten hinzufügen und auf Ausschnitt zoomen' ";
+ text += "title='<?php echo _mb("Add WMS and zoom to extent"); ?>' ";
text += "onclick='" + onclickFunction + "'>";
text += "</td><td>";
text += "<a href='#' ";
@@ -418,12 +432,12 @@
</script>
</head>
-<body leftmargin="2" topmargin="0" bgcolor="#ffffff">
+<body leftmargin="2" topmargin="0" bgcolor="#ffffff" onload='init();'>
<form name='form1' target='result' onsubmit='return validate();'>
<p>
<input class='textfield' id='metadataSearchString' name='search' type='text' style='width:110px'>
-<img src="../img/add.png" style="cursor: pointer;vertical-align:middle;" title="keywords" onclick="openKeywordPopup();">
+<img src="../img/add.png" style="cursor: pointer;vertical-align:middle;" title="<?php echo _mb("keywords") ?>" onclick="openKeywordPopup();">
<input type='submit' name='send' value='ok'>
</p>
</form>
More information about the Mapbender_commits
mailing list