i18n for checkout and circulation info interfaces
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 2 Feb 2008 19:53:18 +0000 (19:53 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 2 Feb 2008 19:53:18 +0000 (19:53 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8584 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/circ/checkout.xul
Open-ILS/xul/staff_client/server/circ/checkout_overlay.xul
Open-ILS/xul/staff_client/server/circ/circ_brief.xul
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index 5c13238..c5bd8b1 100644 (file)
@@ -5,6 +5,7 @@
 <!ENTITY common.check_date.description "Check today's date above.">
 <!ENTITY common.check_barcode.description "Check barcode?">
 <!ENTITY common.date_helper 'or choose one of these'>
+<!ENTITY common.date_helper.normal 'Normal'>
 <!ENTITY common.date_helper.3_days 'Today + 3 days'>
 <!ENTITY common.date_helper.7_days 'Today + 7 days'>
 <!ENTITY common.date_helper.14_days 'Today + 14 days'>
 <!ENTITY staff.circ.checkin_overlay.do_not_alert_on_precat.label "Ignore Pre-cataloged Items">
 <!ENTITY staff.circ.checkin_overlay.checkin_auto.label "Auto-Print Hold and Transit Slips">
 <!ENTITY staff.circ.checkin_overlay.checkin_auto.accesskey "P">
+<!ENTITY staff.circ.checkout_overlay.duedate_menu.label "Normal">
+<!ENTITY staff.circ.checkout_overlay.duedate_menu.accesskey "u">
+<!ENTITY staff.circ.checkout_overlay.barcode.accesskey "C">
+<!ENTITY staff.circ.checkout_overlay.export.accesskey "">
+<!ENTITY staff.circ.checkout_overlay.export.label "Export">
+<!ENTITY staff.circ.checkout_overlay.sel_clip.label "Copy to Clipboard">
+<!ENTITY staff.circ.checkout_overlay.save_columns.label "Save Columns">
+<!ENTITY staff.circ.checkout_overlay.strict_barcode.label "Strict Barcode">
+<!ENTITY staff.circ.circ_brief.patron_id.label "Circ ID: ">
+<!ENTITY staff.circ.circ_brief.add_billing.label "Add Billing">
+<!ENTITY staff.circ.circ_brief.xact_start.label "Check Out Time">
+<!ENTITY staff.circ.circ_brief.due_date.label "Due Date">
+<!ENTITY staff.circ.circ_brief.stop_fines_time.label "Stop Fines Time">
+<!ENTITY staff.circ.circ_brief.checkin_time.label "Check In Time">
+<!ENTITY staff.circ.circ_brief.circ_lib.label "Check Out Library">
+<!ENTITY staff.circ.circ_brief.renewal.label "Renewal">
+<!ENTITY staff.circ.circ_brief.stop_fines.label "Stop Fines Reason">
+<!ENTITY staff.circ.circ_brief.checkin_lib.label "Check In Library">
index ceab3c1..c620adb 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"-->
 ]>
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@@ -35,7 +35,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();
index aa2e79d..1eef372 100644 (file)
@@ -1,6 +1,6 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE overlay PUBLIC "" ""[
-       <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+       <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
 ]>
 <overlay id="checkout_overlay" 
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
@@ -31,7 +31,7 @@
                control="checkout_barcode_entry_textbox"/>
 -->
        <hbox id="checkout_menu_placeholder" flex="0"/>
-       <label accesskey="C" control="checkout_barcode_entry_textbox"/>
+       <label accesskey="&staff.circ.checkout_overlay.barcode.accesskey;" control="checkout_barcode_entry_textbox"/>
        <textbox id="checkout_barcode_entry_textbox"/>
        <button id="checkout_submit_barcode_button" 
                label="&staff.patron_display.checkout.submit_label;" 
                accesskey="&staff.patron_display.checkout.submit_label.accesskey;"/>
        <spacer flex="1"/>
        <hbox id="duedate_hbox">
-               <label value="Due Date" accesskey="u" control="checkout_duedate_menu"/>
+               <label value="&staff.circ.checkout_overlay.duedate_menu.label;" accesskey="&staff.circ.checkout_overlay.duedate_menu.accesskey;" control="checkout_duedate_menu"/>
                <menulist id="checkout_duedate_menu" editable="true">
                        <menupopup>
-                               <menuitem label="Normal" selected="true"/>
-                               <menuitem label="Today + 3 days" />
-                               <menuitem label="Today + 7 days" />
-                               <menuitem label="Today + 14 days" />
-                               <menuitem label="Today + 30 days" />
+                               <menuitem label="&common.date_helper.normal;" selected="true"/>
+                               <menuitem label="&common.date_helper.3_days;" />
+                               <menuitem label="&common.date_helper.7_days;" />
+                               <menuitem label="&common.date_helper.14_days;" />
+                               <menuitem label="&common.date_helper.30_days;" />
                        </menupopup>
                </menulist>
        </hbox>
                command="cmd_checkout_print"
                accesskey="&staff.patron_display.checkout.print_receipt_label.accesskey;"/>
        <button id="checkout_export" 
-               label="Export"
+               label="&staff.circ.checkout_overlay.export.label;"
                command="cmd_checkout_export"
-               accesskey=""/>
-       <button id="clip_button" disabled="true" command="sel_clip" label="Copy to Clipboard" />
-       <button id="save_col_btn" command="save_columns" label="Save Columns" />
-       <checkbox id="strict_barcode" label="Strict Barcode" checked="false" persist="checked"/> 
+               accesskey="&staff.circ.checkout_overlay.export.accesskey;"/>
+       <button id="clip_button" disabled="true" command="sel_clip" label="&staff.circ.checkout_overlay.sel_clip.label;" />
+       <button id="save_col_btn" command="save_columns" label="&staff.circ.checkout_overlay.save_columns.label;" />
+       <checkbox id="strict_barcode" label="&staff.circ.checkout_overlay.strict_barcode.label;" checked="false" persist="checked"/> 
        <spacer id="pcii3s" flex="1"/>
        <checkbox id="checkout_auto" persist="checked"
                label="&staff.patron_display.checkout.auto_print_label;" 
index 85cef1c..c7fbb9e 100644 (file)
@@ -37,7 +37,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();
                                                $('circ_lib').value = r_circ.circ_lib() ? g.data.hash.aou[ r_circ.circ_lib() ].shortname() : '';
                                                $('xact_start').value = r_circ.xact_start() ? r_circ.xact_start().toString().substr(0,16).replace(/T/,' ') : '';
                                                $('due_date').value = r_circ.due_date() ? r_circ.due_date().toString().substr(0,10) : '';
-                                               $('circ_lib').setAttribute('tooltiptext','Check Out Staff ID = ' + r_circ.circ_staff() );
+                                               $('circ_lib').setAttribute('tooltiptext', document.getElementById('circStrings').getFormattedString('staff.circ.circ_brief.staff_out_id', [r_circ.circ_staff()]) );
                                                $('checkin_lib').value = r_circ.checkin_lib() ? g.data.hash.aou[ r_circ.checkin_lib() ].shortname() : '';
                                                $('checkin_time').value = r_circ.checkin_time() ? r_circ.checkin_time().toString().substr(0,16).replace(/T/,' ') : '';
-                                               $('checkin_lib').setAttribute('tooltiptext','Check In Staff ID = ' + r_circ.checkin_staff() );
+                                               $('checkin_lib').setAttribute('tooltiptext', document.getElementById('circStrings').getFormattedString('staff.circ.circ_brief.staff_in_id', [r_circ.checkin_staff()]) );
                                                $('id').value = r_circ.id() ? r_circ.id() : '';
                                                $('stop_fines').value = r_circ.stop_fines() ? r_circ.stop_fines() : '';
                                                $('stop_fines_time').value = r_circ.stop_fines_time() ? r_circ.stop_fines_time().toString().substr(0,16).replace(/T/,' ') : '';
@@ -78,7 +78,7 @@
                                                });
 
                                        } catch(E) {
-                                               g.error.standard_unexpected_error_alert('Failure rendering circ.',E);
+                                               g.error.standard_unexpected_error_alert(document.getElementById('circStrings').getString('staff.circ.circ_brief.failure'), E);
                                        }
                                }
 
@@ -91,8 +91,7 @@
                                }
 
                        } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\ncirc/circ_brief.xul\n" + E + '\n';
+                               var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['circ/circ_brief.xul', E]);
                                try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
                                alert(err_msg);
                        }
        ]]>
        </script>
 
+       <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+
        <groupbox id="gb" flex="1" style="overflow: auto;">
                <caption id="caption"/>
                <hbox>
                        <label id="patron_name" class="patronNameLarge" flex="1"/>
-                       <label value="Circ ID: "/><label id="id"/>
-                       <button id="add_billing" disabled="true" label="Add Billing" oncommand="g.add_billing();"/>
+                       <label value="&staff.circ.circ_brief.patron_id.label;"/><label id="id"/>
+                       <button id="add_billing" disabled="true" label="&staff.circ.circ_brief.add_billing.label;" oncommand="g.add_billing();"/>
                </hbox>
                <grid flex="1">
                        <columns>
                        </columns>
                        <rows>
                                <row>
-                                       <label style="font-weight: bold" value="Check Out Time"/><label id="xact_start"/>
-                                       <label style="font-weight: bold" value="Due Date"/><label id="due_date"/>
-                                       <label style="font-weight: bold" value="Stop Fines Time"/><label id="stop_fines_time"/>
-                                       <label style="font-weight: bold" value="Check In Time"/><label id="checkin_time"/>
+                                       <label style="font-weight: bold" value="&staff.circ.circ_brief.xact_start.label;"/><label id="xact_start"/>
+                                       <label style="font-weight: bold" value="&staff.circ.circ_brief.due_date.label;"/><label id="due_date"/>
+                                       <label style="font-weight: bold" value="&staff.circ.circ_brief.stop_fines_time.label;"/><label id="stop_fines_time"/>
+                                       <label style="font-weight: bold" value="&staff.circ.circ_brief.checkin_time.label;"/><label id="checkin_time"/>
                                </row>
                                <row>
-                                       <label style="font-weight: bold" value="Check Out Lib"/><label id="circ_lib"/>
-                                       <label style="font-weight: bold" value="Renewal"/><label id="renewal"/>
-                                       <label style="font-weight: bold" value="Stop Fines Reason"/><label id="stop_fines"/>
-                                       <label style="font-weight: bold" value="Check In Lib"/><label id="checkin_lib"/>
+                                       <label style="font-weight: bold" value="&staff.circ.circ_brief.circ_lib.label;"/><label id="circ_lib"/>
+                                       <label style="font-weight: bold" value="&staff.circ.circ_brief.renewal.label;"/><label id="renewal"/>
+                                       <label style="font-weight: bold" value="&staff.circ.circ_brief.stop_fines.label;"/><label id="stop_fines"/>
+                                       <label style="font-weight: bold" value="&staff.circ.circ_brief.checkin_lib.label;"/><label id="checkin_lib"/>
                                </row>
                        </rows>
                </grid>
index 1fed274..29518d8 100644 (file)
@@ -60,3 +60,6 @@ staff.circ.checkout.permission_denied=Permission Denied = %1$s
 # "Circulation" - check &staff.main.menu.circ.label; in lang.dtd
 # "Offline Interface" - check &staff.main.menu.circ.offline.label; in lang.dtd
 staff.circ.checkout.suggest_offline=Check Out Failed.  If you wish to use the offline interface, in the top menubar select Circulation -> Offline Interface
+staff.circ.circ_brief.staff_out_id=Check Out Staff ID = %1$s
+staff.circ.circ_brief.staff_in_id=Check In Staff ID = %1$s
+staff.circ.circ_brief.failure=Failure rendering circulation.