Move some more hardcoded strings to i18n.
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 24 Mar 2008 03:33:30 +0000 (03:33 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 24 Mar 2008 03:33:30 +0000 (03:33 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9116 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/bib_brief.xul
Open-ILS/xul/staff_client/server/circ/checkin.xul
Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index f532736..db7a5d3 100644 (file)
@@ -1,6 +1,9 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!-- Application: Evergreen Staff Client -->
 <!-- Screen: Brief Bib Display -->
+<!--
+vim: noet:sw=4:ts=4:
+-->
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- STYLESHEETS -->
@@ -39,7 +42,7 @@
                function my_init() {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+                               if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
                                JSAN.errorLevel = "die"; // none, warn, or die
                                JSAN.addRepository('/xul/server/');
                                JSAN.use('util.error'); g.error = new util.error();
@@ -60,7 +63,7 @@
                                JSAN.use('util.network'); g.network = new util.network();
                                JSAN.use('util.date');
 
-                               document.getElementById('caption').setAttribute('tooltiptext','Record ID = ' + docid);
+                               document.getElementById('caption').setAttribute('tooltiptext',document.getElementById('catStrings').getFormattedString('staff.cat.bib_brief.record_id' + [docid]));
 
                                if (docid > -1) {
 
                                                                                );
                                                                                var t = document.getElementById('caption').getAttribute('label');
                                                                                if (get_bool( meta.deleted() )) { 
-                                                                                       t += ' (Deleted) '; 
+                                                                                       t += ' ' + document.getElementById('catStrings').getString('staff.cat.bib_brief.deleted') + ' '; 
                                                                                        document.getElementById('caption').setAttribute('style','background: red; color: white;');
                                                                                }
                                                                                if ( ! get_bool( meta.active() ) ) { 
-                                                                                       t += ' (Inactive) '; 
+                                                                                       t += ' ' + document.getElementById('catStrings').getString('staff.cat.bib_brief.inactive') + ' '; 
                                                                                        document.getElementById('caption').setAttribute('style','background: red; color: white;');
                                                                                }
                                                                                document.getElementById('caption').setAttribute('label',t);
 
                                } else {
                                        var t = document.getElementById('caption').getAttribute('label');
-                                       t += ' (Not Cataloged) '; 
+                                       t += ' ' + document.getElementById('catStrings').getString('staff.cat.bib_brief.noncat') + ' '; 
                                        document.getElementById('caption').setAttribute('style','background: red; color: white;');
                                        document.getElementById('caption').setAttribute('label',t);
                                }
 
                        } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\ncat/bib_brief.xul\n" + E + '\n';
+                               var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['cat/bib_brief.xul', E]);
                                try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
                                alert(err_msg);
                        }
                        try {
                                JSAN.use('util.window'); var win = new util.window();
                                if (docid < 0) {
-                                       alert('Item not cataloged.');
+                                       alert(document.getElementById("catStrings").getString('staff.cat.bib_brief.noncat.alert'));
                                } else {
                                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                                        //win.open( urls.XUL_MARC_VIEW + '?noprint=1&docid=' + docid, 'marc_view', 'chrome,resizable,modal,width=400,height=400');
        ]]>
        </script>
 
+    <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
+    <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties"/>
+
        <groupbox id="groupbox" flex="1" style="overflow: auto; min-height: 100px;">
                <caption label="Record Summary" id="caption"/>
                        <html:table width="90%">
index 1a02186..2a1686a 100644 (file)
                                        document.getElementById('checkin_auto').checked = true;
                                        document.getElementById('checkin_auto').hidden = true;
                                        document.getElementById('checkin_effective_date_hbox').hidden = true;
-                                       document.getElementById('caption').setAttribute('label','Hold Capture');
+                                       document.getElementById('caption').setAttribute('label',document.getElementById('circStrings').getString('staff.circ.checkin.hold_capture'));
                                        document.getElementById('hold_capture_blurb').hidden = false;
-                                       tab_name = 'Hold Capture';
+                                       tab_name = document.getElementById('circStrings').getString('staff.circ.checkin.hold_capture');
                                } else {
-                                       tab_name = 'Item Check In';
+                                       tab_name = document.getElementById('circStrings').getString('staff.circ.checkin.check_in.tab');
                                }
 
                                JSAN.use('circ.checkin'); g.checkin = new circ.checkin();
index 7a12bdb..66f0bf1 100644 (file)
@@ -3,3 +3,8 @@ cat.batch_operation_failed=The whole batch operation failed. %1$s
 cat.copy_buckets.tab=Copy Buckets
 cat.total_bucket_items_in_bucket=Contains %1$s bucket items
 cat.results_returned=Returning %1$s hits
+staff.cat.bib_brief.record_id=Record ID = %1$s
+staff.cat.bib_brief.deleted=(Deleted)
+staff.cat.bib_brief.inactive=(Inactive)
+staff.cat.bib_brief.noncat=(Not Cataloged)
+staff.cat.bib_brief.noncat.alert=Item not cataloged.
index 0944772..0245127 100644 (file)
@@ -302,6 +302,8 @@ staff.circ.utils.route_to.no_address=We do not have a holds address for this lib
 staff.circ.utils.route_to.no_address.error=Unable to retrieve mailing address.
 staff.circ.utils.payload.author=Author: %1$s
 staff.circ.utils.payload.in_transit=%1$s is in transit.
+staff.circ.checkin.hold_capture=Hold Capture
+staff.circ.checkin.check_in.tab=Item Check In
 staff.circ.checkin.error=Check In Failed (in circ.util.checkin) (%1$s): 
 # "Circulation" - check &staff.main.menu.circ.label; in lang.dtd
 # "Offline Interface" - check &staff.main.menu.circ.offline.label; in lang.dtd