i18n patch from Craig Ricciuto:
[Evergreen.git] / Open-ILS / xul / staff_client / server / cat / record_buckets.xul
index 6779bb0..24be085 100644 (file)
@@ -12,7 +12,7 @@
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- LOCALIZATION -->
 <!DOCTYPE window PUBLIC "" ""[
-       <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+       <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
 ]>
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@@ -41,9 +41,9 @@
                                /* ugly hack so we don't have to upgrade the chrome for quick buckets */
                                if (typeof xulG == 'undefined') location.href = String(location.href).replace(/record_buckets.xul/,'record_buckets_quick.xul');
 
-                catStrings = document.getElementById('catStrings');    
+                catStrings = document.getElementById('catStrings');
+                if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
 
-                if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
                                JSAN.errorLevel = "die"; // none, warn, or die
                                JSAN.addRepository('/xul/server/');
                                JSAN.use('util.error'); g.error = new util.error();
@@ -72,9 +72,7 @@
                                }
 
                        } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\n" 
-                                       + 'cat.record_buckets.xul\n' + E + '\n';
+                               var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['cat/record_buckets.xul', E]);
                                try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
                                alert(err_msg);
                        }
@@ -85,6 +83,7 @@
 
     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
     <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale' -->/cat.properties"/>
+    <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
 
        <commandset id="record_buckets_cmds">
                <command id="sel_clip0" disabled="true"/>