i18n for copy details and circulation summary screens
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 2 Feb 2008 21:15:51 +0000 (21:15 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 2 Feb 2008 21:15:51 +0000 (21:15 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8585 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/circ/circ_summary.xul
Open-ILS/xul/staff_client/server/circ/copy_details.xul
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index c5bd8b1..8d5638f 100644 (file)
 <!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">
+<!ENTITY staff.circ.circ_summary.caption "Last Few Circulations">
+<!ENTITY staff.circ.circ_summary.retrieve_last.label "Retrieve Last Patron">
+<!ENTITY staff.circ.circ_summary.retrieve_last.accesskey "L">
+<!ENTITY staff.circ.circ_summary.retrieve_all.label "Retrieve All These Patrons">
+<!ENTITY staff.circ.circ_summary.retrieve_all.accesskey "A">
+<!ENTITY staff.circ.circ_summary.done.label "Done">
+<!ENTITY staff.circ.circ_summary.done.accesskey "D">
+<!ENTITY staff.circ.copy_details.hold_caption "Captured for Hold">
+<!ENTITY staff.circ.copy_details.transit_caption "In Transit">
+<!ENTITY staff.circ.copy_details.circ_caption "Last or Current Circulation">
+<!ENTITY staff.circ.copy_details.r_last.label "Retrieve Last Patron">
+<!ENTITY staff.circ.copy_details.r_last.accesskey "L">
+<!ENTITY staff.circ.copy_details.r_hold.label "Retrieve Hold Patron">
+<!ENTITY staff.circ.copy_details.r_hold.accesskey "H">
+<!ENTITY staff.circ.copy_details.done.label "Done">
+<!ENTITY staff.circ.copy_details.done.accesskey "D">
index 9b0988c..47e60f1 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!-- Application: Evergreen Staff Client -->
 <!-- Screen: Brief Bib Display -->
 
@@ -12,7 +12,7 @@
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- LOCALIZATION -->
 <!DOCTYPE window PUBLIC "" ""[
-       <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+       <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
 ]>
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@@ -42,7 +42,9 @@
                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();
                <iframe id="mid" style="overflow: auto;"/>
                <splitter><grippy/></splitter>
                <groupbox flex="1" id="circs" style="overflow: auto;">
-                       <caption label="Last Few Circulations"/>
+                       <caption label="&staff.circ.circ_summary.caption;"/>
                </groupbox>
                <hbox>
-                       <button id="r_last" label="Retrieve Last Patron" accesskey="L" oncommand="retrieve_last();"/>
-                       <button id="r_all" label="Retrieve All These Patrons" accesskey="A" oncommand="retrieve_all();"/>
+                       <button id="r_last" label="&staff.circ.circ_summary.retrieve_last.label;" accesskey="&staff.circ.circ_summary.retrieve_last.accesskey;" oncommand="retrieve_last();"/>
+                       <button id="r_all" label="&staff.circ.circ_summary.retrieve_all.label;" accesskey="&staff.circ.circ_summary.retrieve_all.accesskey;" oncommand="retrieve_all();"/>
                        <spacer flex="1"/>
-                       <button label="Done" accesskey="D" oncommand="window.close();"/>
+                       <button label="&staff.circ.circ_summary.done.label;" accesskey="&staff.circ.circ_summary.done.accesskey;" oncommand="window.close();"/>
                </hbox>
        </vbox>
 
index 1fa277f..a7387ae 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!-- Application: Evergreen Staff Client -->
 <!-- Screen: Brief Bib Display -->
 
@@ -12,7 +12,7 @@
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- LOCALIZATION -->
 <!DOCTYPE window PUBLIC "" ""[
-       <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+       <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
 ]>
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@@ -42,7 +42,9 @@
                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();
 
                                // uber method
                                var robj = g.network.simple_request('FM_ACP_DETAILS', [ ses(), g.copy_id ] );
-                               if (typeof robj.ilsevent != 'undefined') throw(robj);
-                               if (robj.copy) g.copy = robj.copy; else throw(robj);
+                               if (typeof robj.ilsevent != 'undefined') {
+                                       throw(robj);
+                               }
+                               if (robj.copy) {
+                                       g.copy = robj.copy;
+                               } else {
+                                       throw(robj);
+                               }
                                g.hold = robj.hold; g.transit = robj.transit; g.circ = robj.circ; g.callnumber = robj.volume;
-                               if (g.hold) $('hold_caption').setAttribute('tooltiptext','Hold ID = ' + g.hold.id());
-                               if (g.transit) $('transit_caption').setAttribute('tooltiptext','Transit ID = ' + g.transit.id());
-                               if (g.circ) $('circ_caption').setAttribute('tooltiptext','Circ ID = ' + g.circ.id());
+                               var tt_msg = '';
+                               if (g.hold) {
+                                       tt_msg = $('circStrings').getFormattedString('staff.circ.copy_details.hold', [g.hold.id()]);
+                                       $('hold_caption').setAttribute('tooltiptext', tt_msg);
+                               }
+                               if (g.transit) {
+                                       tt_msg = $('circStrings').getFormattedString('staff.circ.copy_details.transit', [g.transit.id()]);
+                                       $('transit_caption').setAttribute('tooltiptext', tt_msg);
+                               }
+                               if (g.circ) {
+                                       tt_msg = $('circStrings').getFormattedString('staff.circ.copy_details.circ', [g.circ.id()]);
+                                       $('circ_caption').setAttribute('tooltiptext', tt_msg);
+                               }
 
                                //g.callnumber = g.network.simple_request('FM_ACN_RETRIEVE',[ g.copy.call_number() ]);
                                //if (typeof g.callnumber.ilsevent != 'undefined') throw(g.callnumber);
                                        $('circ').setAttribute('src',urls.XUL_CIRC_BRIEF); // + '?no_border=1');
                                        get_contentWindow($('circ')).xulG = { 'no_border' : 1 };
                                        if (g.circ.checkin_time()) {
-                                               $('circ_caption').setAttribute('label','Last Circulation');
+                                               $('circ_caption').setAttribute('label', $('circStrings').getString('staff.circ.copy_details.last_circ'));
                                        } else {
-                                               $('circ_caption').setAttribute('label','Current Circulation');
+                                               $('circ_caption').setAttribute('label', $('circStrings').getString('staff.circ.copy_details.current_circ'));
                                        }
                                } else {
-                                       $('circ_caption').setAttribute('label','This item has yet to circulate.');
+                                       $('circ_caption').setAttribute('label', $('circStrings').getString('staff.circ.copy_details.no_circ'));
                                        $('circ').hidden = true;
                                }
 
                                        g.list.append( { 'row' : { 'my' : { 'atc' : g.transit, } } });
        
                                } else {
-                                       $('transit_caption').setAttribute('label','This item is not in transit.');
+                                       $('transit_caption').setAttribute('label', $('circStrings').getString('staff.circ.copy_details.not_transit'));
                                        $('transit').hidden = true;
                                }
 
        
                                        JSAN.use('patron.util'); 
                                        var au_obj = patron.util.retrieve_fleshed_au_via_id( ses(), g.hold.usr() );
-                                       $('patron_name').setAttribute('value', au_obj.family_name() + ', ' + au_obj.first_given_name() + ' : ' + au_obj.card().barcode() );
+                                       $('patron_name').setAttribute('value', $('circStrings').getFormattedString('staff.circ.copy_details.user_details', [au_obj.family_name(), au_obj.first_given_name(), au_obj.card().barcode()]) );
 
                                } else {
                                        if (g.copy.status() == 8 /* ON HOLDS SHELF */) {
-                                               $('hold_caption').setAttribute('label','This item is not captured for a hold, however its status is incorrectly set to "On Holds Shelf".  Please check this item in to correct the status.');
+                                               $('hold_caption').setAttribute('label', $('circStrings').getString('staff.circ.copy_details.bad_hold_status'));
                                        } else {
-                                               $('hold_caption').setAttribute('label','This item is not captured for a hold.');
+                                               $('hold_caption').setAttribute('label', $('circStrings').getString('staff.circ.copy_details.no_hold'));
                                        }
                                        $('hold').hidden = true;
                                }
        ]]>
        </script>
 
+       <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+
        <vbox flex="1" style="overflow: auto;">
                <vbox style="border: none; overflow: none; min-height: 80;">
                        <iframe flex="1" id="top" style="overflow: none; min-height: 80;"/>
                </vbox>
                <splitter><grippy/></splitter>
                <groupbox flex="1" id="holds" style="overflow: none; min-height: 80;">
-                       <caption id="hold_caption" label="Captured for Hold"/>
+                       <caption id="hold_caption" label="&staff.circ.copy_details.hold_caption;"/>
                        <label id="patron_name" class="patronNameLarge"/>
                        <tree id="hold" flex="1" enableColumnDrag="true"/>
                        <spacer FIXME="label and tree get swapped without this"/>
                </groupbox>
                <splitter><grippy/></splitter>
                <groupbox flex="1" id="transits" style="overflow: none; min-height: 80;">
-                       <caption id="transit_caption" label="In Transit"/>
+                       <caption id="transit_caption" label="&staff.circ.copy_details.transit_caption;"/>
                        <tree id="transit" flex="1" enableColumnDrag="true"/>
                </groupbox>
                <splitter><grippy/></splitter>
                <groupbox flex="1" id="circs" style="overflow: none; min-height: 80;">
-                       <caption id="circ_caption" label="Last/Current Circulation" style="font-weight: bold"/>
+                       <caption id="circ_caption" label="&staff.circ.copy_details.circ_caption;" style="font-weight: bold"/>
                        <iframe id="circ" style="min-height: 80" flex="1"/>
                </groupbox>
        </vbox>
        <hbox>
-               <button id="r_last" label="Retrieve Last Patron" accesskey="L" oncommand="retrieve_last_patron();"/>
-               <button id="r_hold" label="Retrieve Hold Patron" accesskey="H" oncommand="retrieve_hold_patron();"/>
+               <button id="r_last" label="&staff.circ.copy_details.r_last.label;" accesskey="&staff.circ.copy_details.r_last.accesskey;" oncommand="retrieve_last_patron();"/>
+               <button id="r_hold" label="&staff.circ.copy_details.r_hold.label;" accesskey="&staff.circ.copy_details.r_hold.accesskey;" oncommand="retrieve_hold_patron();"/>
                <spacer flex="1"/>
-               <button id="done" label="Done" accesskey="D" oncommand="window.close();"/>
+               <button id="done" label="&staff.circ.copy_details.done.label;" accesskey="&staff.circ.copy_details.done.accesskey;" oncommand="window.close();"/>
        </hbox>
 
 </window>
index 29518d8..fb4b96c 100644 (file)
@@ -63,3 +63,14 @@ staff.circ.checkout.suggest_offline=Check Out Failed.  If you wish to use the of
 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.
+staff.circ.copy_details.hold=Hold ID = %1$s
+staff.circ.copy_details.transit=Transit ID = %1$s
+staff.circ.copy_details.circ=Circulation ID = %1$s
+staff.circ.copy_details.last_circ=Last Circulation
+staff.circ.copy_details.current_circ=Current Circulation
+staff.circ.copy_details.no_circ=This item has yet to circulate.
+staff.circ.copy_details.not_transit=This item is not in transit.
+# Displays user info: "Family name, First name : Barcode"
+staff.circ.copy_details.user_details=%1$s, %2$s : %3$s
+staff.circ.copy_details.bad_hold_status=This item is not captured for a hold, however its status is incorrectly set to "On Holds Shelf".  Please check this item in to correct the status.
+staff.circ.copy_details.no_hold=This item is not captured for a hold.