Merge r11007 from trunk: Convert a few strings to entities or JS properties that...
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 31 Oct 2008 11:43:57 +0000 (11:43 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 31 Oct 2008 11:43:57 +0000 (11:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11008 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/cat/copy_buckets_quick.xul
Open-ILS/xul/staff_client/server/cat/marc_new.xul
Open-ILS/xul/staff_client/server/cat/record_buckets.xul
Open-ILS/xul/staff_client/server/cat/volume_editor.xul
Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul
Open-ILS/xul/staff_client/server/patron/bill_check_info.xul
Open-ILS/xul/staff_client/server/patron/hold_notices.xul
Open-ILS/xul/staff_client/server/patron/user_buckets.xul

index a9c5274..10bc0e0 100644 (file)
 <!ENTITY staff.cat.copy_buckets_overlay.copy_buckets.copy_buckets_transfer_to_volume.label "Transfer to Specific Volume">
 <!ENTITY staff.cat.copy_buckets_overlay.copy_buckets.copy_buckets_batch_copy_edit.label "Edit Item Attributes">
 <!ENTITY staff.cat.copy_buckets_overlay.copy_buckets.copy_buckets_batch_copy_delete.label "Delete All from Catalog">
+<!ENTITY staff.cat.copy_buckets_quick.title "Add to Bucket">
 <!ENTITY staff.cat.copy_buckets_quick.item_buckets.label "Item Buckets">
 <!ENTITY staff.cat.copy_buckets_quick.item_buckets.add_to_bucket.label "Add to Selected Bucket">
 <!ENTITY staff.cat.copy_buckets_quick.item_buckets.add_to_bucket.accesskey "A">
 <!ENTITY staff.cat.opac.menuitem.refreshinterfaces.label "Refresh All Interfaces">
 <!ENTITY staff.cat.opac.menuitem.dupnewtab.label "Duplicate in New Tab">
 <!ENTITY staff.cat.opac.menuitem.removeframe.label "Remove this Frame">
+<!ENTITY staff.cat.record_buckets.title "Record Buckets">
 <!ENTITY staff.cat.record_buckets_overlay.record_query_tab.label "Record Query">
 <!ENTITY staff.cat.record_buckets_overlay.record_query_tab.accesskey "Q">
 <!ENTITY staff.cat.record_buckets_overlay.pending_records_tab.label "Pending Records">
 <!ENTITY staff.cat.volume_copy_creator.create.accesskey "C">
 <!ENTITY staff.cat.volume_copy_creator.library_label.value "Library">
 <!ENTITY staff.cat.volume_copy_creator.num_of_volumes_label.value "# of volumes">
+<!ENTITY staff.cat.volume_editor.title "Volumes">
 <!ENTITY staff.cat.volume_editor.caption.label "Volume Editor">
 <!ENTITY staff.cat.volume_editor.modify.label "Modify">
 <!ENTITY staff.cat.volume_editor.cancel.label "Cancel">
 <!ENTITY staff.pat.barcode_entry.submit_btn.label "Submit">
 <!ENTITY staff.pat.barcode_entry.submit_btn.accesskey "S">
 <!ENTITY staff.pat.barcode_entry.retrieving.label "Retrieving...">
+<!ENTITY staff.patron.bill_cc_info.title "Credit Card Information">
 <!ENTITY staff.patron.bill_cc_info.visa.label "Visa">
 <!ENTITY staff.patron.bill_cc_info.mastercard.label "Mastercard">
 <!ENTITY staff.patron.bill_cc_info.american_express.label "American Express">
 <!ENTITY staff.patron.bill_cc_info.info.label "Credit Card Info">
 <!ENTITY staff.patron.bill_cc_info.type.label "Credit Card Type">
 <!-- "Check" is used here to indicate a payment by check, not "Verify" -->
+<!ENTITY staff.patron.bill_check_info.title "Check Info">
+<!-- "Check" is used here to indicate a payment by check, not "Verify" -->
 <!ENTITY staff.patron.bill_check_info.check_info.label "Check Information">
 <!-- "Check" is used here to indicate a payment by check, not "Verify" -->
 <!ENTITY staff.patron.bill_check_info.check_number.value "Check Number">
 <!ENTITY staff.patron.bills_overlay.unselected.value "Un-Selected:">
 <!ENTITY staff.patron.bills_overlay.voided.value "Voided:">
 <!ENTITY staff.patron.bills_overlay.auto_print.label "Auto-Print">
+<!ENTITY staff.patron.hold_notices.title "Hold Notices">
 <!ENTITY staff.patron.hold_notices.add_record_notification.label "Add Record of Notification">
 <!ENTITY staff.patron.hold_notices.add_record_notification.accesskey "A">
 <!ENTITY staff.patron.hold_notices.close_window.label "Close">
index dce25e4..3277618 100644 (file)
@@ -22,7 +22,7 @@
 <!-- OVERLAYS -->
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
-<window id="copy_buckets_win" title="Add to Bucket"
+<window id="copy_buckets_win" title="&staff.cat.copy_buckets_quick.title;"
        onload="try { my_init(); font_helper(); } catch(E) { alert(E); }" persist="height,width"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
index 8b8f397..780edc1 100644 (file)
        <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
        <script>
        <![CDATA[
+               var catStrings;
 
                function $(id) { return document.getElementById(id); }
 
                function my_init() {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+
+                               /* load translatable strings for cataloging interfaces */
+                catStrings = document.getElementById('catStrings');
+
                                if (typeof JSAN == 'undefined') { 
-                                       throw( document.getElementById('commonStrings').getString('common.jsan.missing') );
+                                       throw( $('commonStrings').getString('common.jsan.missing') );
                                }
                                JSAN.errorLevel = "die"; // none, warn, or die
                                JSAN.addRepository('/xul/server/');
@@ -50,7 +55,7 @@
                                g.error.sdump('D_TRACE','my_init() for example_template.xul');
 
                                if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-                                       try { window.xulG.set_tab_name('MARC Template'); } catch(E) { alert(E); }
+                                       try { window.xulG.set_tab_name(catStrings.getString('staff.cat.marc_new.tab_name')); } catch(E) { alert(E); }
                                }
 
                                JSAN.use('util.network'); g.network = new util.network();
                                                        var params = {
                                                                'record' : { 'marc' : marc },
                                                                'save' : {
-                                                                       'label' : $('catStrings').getString('staff.cat.marc_new.create_record.label'),
+                                                                       'label' : catStrings.getString('staff.cat.marc_new.create_record.label'),
                                                                        'func' : function(new_marcxml) {
                                                                                try {
                                                                                        var robj = g.network.simple_request(
                                                                                                'MARC_XML_RECORD_IMPORT',
-                                                                                               [ ses(), new_marcxml, $('catStrings').getString('staff.cat.marc_new.system_local.label'), 1 ]
+                                                                                               [ ses(), new_marcxml, catStrings.getString('staff.cat.marc_new.system_local.label'), 1 ]
                                                                                        );
                                                                                        if (typeof robj.ilsevent != 'undefined') throw(robj);
-                                                                                       alert($('catStrings').getString('staff.cat.marc_new.record_created.label'));
+                                                                                       alert(catStrings.getString('staff.cat.marc_new.record_created.label'));
 
                                                                                        /* Replace tab with OPAC-view of record */
 
                                                                                        };
                                                                                        xulG.set_tab(
                                                                                                xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
-                                                                                               {'tab_name': $('catStrings').getString('staff.cat.marc_new.retrieving.label')},
+                                                                                               {'tab_name': catStrings.getString('staff.cat.marc_new.retrieving.label')},
                                                                                                content_params
                                                                                        );
 
                                                                                } catch(E) {
                                                                                        g.error.standard_unexpected_error_alert(
-                                                                                               $('catStrings').getString('staff.cat.marc_new.creating_record.error'), E
+                                                                                               catStrings.getString('staff.cat.marc_new.creating_record.error'), E
                                                                                        );
                                                                                }
                                                                        }
 
                                                } catch(E) {
                                                        g.error.standard_unexpected_error_alert(
-                                                               $('catStrings').getFormattedString('staff.cat.marc_new.loading_template.error', [template_name]), E
+                                                               catStrings.getFormattedString('staff.cat.marc_new.loading_template.error', [template_name]), E
                                                        );
                                                }
 
index 24be085..decc420 100644 (file)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 <?xul-overlay href="/xul/server/cat/record_buckets_overlay.xul"?>
 
-<window id="record_buckets_win" title="Record Buckets"
+<window id="record_buckets_win" title="&staff.cat.record_buckets.title;"
        onload="try { my_init(); font_helper(); } catch(E) { alert(E); }" height="300" width="300" persist="height,width"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
                                /* 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');
 
+                               /* load translatable strings into easily referenced variables */
                 catStrings = document.getElementById('catStrings');
-                if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
+                commonStrings = document.getElementById('commonStrings');
+
+                if (typeof JSAN == 'undefined') { throw( commonStrings.getString('common.jsan.missing') ); }
 
                                JSAN.errorLevel = "die"; // none, warn, or die
                                JSAN.addRepository('/xul/server/');
                                );
        
                                if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-                                       try { window.xulG.set_tab_name('Record Buckets'); } catch(E) { alert(E); }
+                                       try { window.xulG.set_tab_name(catStrings.getString('staff.cat.record_buckets.tab_name')); } catch(E) { alert(E); }
                                }
 
                        } catch(E) {
-                               var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['cat/record_buckets.xul', E]);
+                               var err_msg = 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);
                        }
index 6784e39..303de05 100644 (file)
@@ -20,7 +20,7 @@
 
 <window id="cat_volume_editor_win" 
        onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
-       title="Volumes" height="400" width="300" persist="height,width"
+       title="&staff.cat.volume_editor.title;" height="400" width="300" persist="height,width"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 38793bb..0ddeea3 100644 (file)
@@ -229,6 +229,7 @@ staff.cat.marcedit.replace_008.label=Add/Replace 008
 staff.cat.marcedit.not_authority_field.label=Not a controlled subfield
 staff.cat.marcedit.apply_selected.label=Apply Selected
 staff.cat.marcedit.no_authority_match.label=No matching authority records found
+staff.cat.marc_new.tab_name=MARC Template
 staff.cat.marc_new.create_record.label=Create Record
 staff.cat.marc_new.system_local.label=System Local
 staff.cat.marc_new.record_created.label=Record created.
@@ -239,6 +240,7 @@ staff.cat.opac.set_marc_edit.alert=Record successfully saved.
 staff.cat.opac.set_marc_edit.std_unexpected_error=Record not likely updated.
 staff.cat.opac.refresh.function_not_implemented.alert=Not yet implemented.  Work around: Choose Duplicate in New Tab option
 staff.cat.opac.set_tab_name=Record: %1$s
+staff.cat.record_buckets.tab_name=Record Buckets
 staff.cat.record_buckets.save_file_as=Save File As
 staff.cat.record_buckets.export_records.alert=File not downloaded.
 staff.cat.record_buckets.export_records.std_unexpected_error=Records could not be exported.
index b37e2ee..af868b2 100644 (file)
@@ -244,6 +244,7 @@ staff.patron.summary.expires_on=Expires on
 staff.patron.ue.uEditInit.session_no_defined=User session is not defined
 staff.patron.ue.uEditSaveuser.error_creating_note=Error creating patron guardian or parent note
 staff.patron.ue.uEditShowSearch.search=Search would be:\n%1$s
+staff.patron.user_buckets.tab_name=User Buckets
 staff.patron.user_edit.save_user.depth_required=Depth is required on the %1$s permission.
 staff.patron.user_edit.save_user.user_modified_successfully=User %1$s [%2$s] successfully modified.\n%3$s permissions and %4$s work locations updated.
 staff.patron.user_edit.display_perm.select_one=-- Select One --
index 1edd7d5..42925dd 100644 (file)
@@ -19,7 +19,7 @@
 <!-- OVERLAYS -->
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
-<window id="patron_bill" title="CC Info"
+<window id="patron_bill" title="&staff.patron.bill_cc_info.title;"
        orient="vertical" style="overflow: auto"
        onload="try{info_init(); font_helper();}catch(E){alert(E);}"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
index fbac6cf..58b5fb1 100644 (file)
@@ -19,7 +19,7 @@
 <!-- OVERLAYS -->
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
-<window id="patron_bill" title="Check Info"
+<window id="patron_bill" title="&staff.patron.bill_check_info.title;"
        orient="vertical" style="overflow: auto"
        onload="try{info_init(); font_helper();}catch(E){alert(E);}"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
index ebf2649..6e9f73f 100644 (file)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="hold_notices_win" width="700" height="550" persist="sizemode width height"
-       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }" title="Hold Notices"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }" title="&staff.patron.hold_notices.title;"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 76248e4..3832639 100644 (file)
        <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
        <script>
        <![CDATA[
+               var patronStrings;
+
                function $(id) { return document.getElementById(id); }
                
                function my_init() {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+
+                               /* load translatable strings for patron interfaces */
+                patronStrings = document.getElementById('patronStrings');
+
                                if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
                                JSAN.errorLevel = "die"; // none, warn, or die
                                JSAN.addRepository('/xul/server/');
@@ -44,7 +50,7 @@
                                g.error.sdump('D_TRACE','my_init() for patron/user_buckets.xul');
 
                                if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-                                       try { window.xulG.set_tab_name('User Buckets'); } catch(E) { alert(E); }
+                                       try { window.xulG.set_tab_name(patronStrings.getString('staff.patron.user_buckets.tab_name')); } catch(E) { alert(E); }
                                }
 
                        } catch(E) {