[fusion-commits] r2019 - in trunk: lib text

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Dec 14 10:01:18 EST 2009


Author: madair
Date: 2009-12-14 10:01:16 -0500 (Mon, 14 Dec 2009)
New Revision: 2019

Modified:
   trunk/lib/fusion.js
   trunk/text/en.json
Log:
re #304: moving strings to lang resource bundle

Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js	2009-12-14 03:05:53 UTC (rev 2018)
+++ trunk/lib/fusion.js	2009-12-14 15:01:16 UTC (rev 2019)
@@ -645,15 +645,15 @@
             eval("o="+r.responseText);
             callback(o);
           } else {
-          if (r.status >= 400) {
-              var msg = r.transport.responseText;
-              if (msg == "") {
-                  msg = "<h2>MapGuide server is not available. Try to reload the application. If this problem persists, please contact the administrator.</h2>";
-              }
-              Fusion.reportError(new Fusion.Error(Fusion.Error.FATAL,
-                  'xml2json: invalid XML document: ' + msg + " : " + r.request.url));
-              return;
-          }
+            if (r.status >= 400) {
+                var msg = r.transport.responseText;
+                if (msg == "") {
+                    msg = OpenLayers.i18n('serverNotAvailable');
+                }
+                Fusion.reportError(new Fusion.Error(Fusion.Error.FATAL,
+                  OpenLayers.i18n('invalidXMLDocument', {'msg':msg, 'url':r.request.url})));
+                return;
+            }
 
             var options = {
               onSuccess: callback,

Modified: trunk/text/en.json
===================================================================
--- trunk/text/en.json	2009-12-14 03:05:53 UTC (rev 2018)
+++ trunk/text/en.json	2009-12-14 15:01:16 UTC (rev 2019)
@@ -6,6 +6,8 @@
                   'and have configured the settings for your system',
 'ajaxError': 'Exception occurred in AJAX callback.\nMessage: ${exception}\nLocation: ${filename} (${line})\nResponse: ${response}',
 'importFailed': 'failed to import stylesheet: ${url}',
+'serverNotAvailable': '<h2>Server not available. Try to reload the application. If this problem persists, please contact the administrator</h2>',
+'invalidXMLDocument': 'xml2json: invalid XML document: ${msg} : ${url}',
 'registerEventError': 'Error registering eventID, invalid (empty) eventID.',
 'appDefLoadFailed': 'failed to load: ${script}',
 'appDefParseError': 'failed to parse ApplicationDefinition',



More information about the fusion-commits mailing list