[open-ils-commits] r7706 - in trunk/Open-ILS: web/opac/locale/en-US
xul/staff_client/chrome/content/OpenILS
xul/staff_client/chrome/content/circ
xul/staff_client/chrome/content/main
xul/staff_client/chrome/locale/en-US
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Aug 18 05:05:41 EDT 2007
Author: miker
Date: 2007-08-18 05:01:23 -0400 (Sat, 18 Aug 2007)
New Revision: 7706
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.js
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.xul
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkout.js
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkout.xul
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_in_house_use.js
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_in_house_use.xul
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_register.js
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_register.xul
trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.xul
trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/cat.properties
trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/circ.properties
trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/common.properties
Log:
* Big messagecatalog-ization for offline mode (Dan Scott)
* Inline comment support for messagecatalog properties fields (miker)
* Attempt at replacing escaped characters in getFormattedString() (miker)
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2007-08-18 09:01:23 UTC (rev 7706)
@@ -2,8 +2,17 @@
<!ENTITY lang.description "English">
<!ENTITY lang.author "PINES">
-<!ENTITY common.enter "Enter">
+<!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.3_days 'Today + 3 days'>
+<!ENTITY common.date_helper.7_days 'Today + 7 days'>
+<!ENTITY common.date_helper.14_days 'Today + 14 days'>
+<!ENTITY common.date_helper.30_days 'Today + 30 days'>
+<!ENTITY common.due_date.description 'Enter the item due date:'>
+<!ENTITY common.enter.label "Enter">
<!ENTITY common.enter.accesskey "E">
+<!ENTITY common.enter_barcode.description 'Enter the item barcode:'>
<!ENTITY common.title "Title">
<!ENTITY common.author "Author">
<!ENTITY common.subject "Subject">
@@ -18,6 +27,15 @@
<!ENTITY common.of "of">
<!ENTITY common.cancel "Cancel">
<!ENTITY common.library "Library">
+<!ENTITY common.step1.label 'Step 1)'>
+<!ENTITY common.step2.accesskey '2'>
+<!ENTITY common.step2.label 'Step 2)'>
+<!ENTITY common.step3.accesskey '3'>
+<!ENTITY common.step3.label 'Step 3)'>
+<!ENTITY common.step4.accesskey '4'>
+<!ENTITY common.step4.label 'Step 4)'>
+<!ENTITY common.step5.label 'Step 5)'>
+<!ENTITY common.step6.label 'Step 6)'>
<!ENTITY common.username "Username">
<!ENTITY common.username.label "Username:">
<!ENTITY common.password "Password">
@@ -319,40 +337,42 @@
<!ENTITY staff.circ.offline.cmd_exit.accesskey 'x'>
<!ENTITY staff.circ.offline.cmd_exit.label 'Exit'>
<!ENTITY staff.circ.offline_checkin.main.label 'Standalone Check In'>
-<!ENTITY staff.circ.offline_checkin.step1.description "Check today's date above.">
-<!ENTITY staff.circ.offline_checkin.step1.label 'Step 1)'>
-<!ENTITY staff.circ.offline_checkin.step2.accesskey '2'>
-<!ENTITY staff.circ.offline_checkin.step2.description 'Enter the item barcode:'>
-<!ENTITY staff.circ.offline_checkin.step2.label 'Step 2)'>
<!ENTITY staff.circ.offline_checkin.step2a.accesskey 'E'>
<!ENTITY staff.circ.offline_checkin.step2a.label 'Enter'>
-<!ENTITY staff.circ.offline_checkin.step2b.label 'Check barcode?'>
<!ENTITY staff.circ.offline_checkin.step3.description 'Repeat Steps 2 until done.'>
-<!ENTITY staff.circ.offline_checkin.step3.label 'Step 3)'>
<!ENTITY staff.circ.offline.finish.description 'Finish'>
-<!ENTITY staff.circ.offline_checkin.step4.label 'Step 4)'>
<!ENTITY staff.circ.offline.print.description 'Print receipt?'>
<!ENTITY staff.circ.offline_checkout.main.label 'Standalone Check Out'>
-<!ENTITY staff.circ.offline_checkout.step1.description "Check today's date above.">
-<!ENTITY staff.circ.offline_checkout.step1.label 'Step 1)'>
-<!ENTITY staff.circ.offline_checkout.step2.accesskey '2'>
<!ENTITY staff.circ.offline_checkout.step2.description "Enter the patron's barcode:">
-<!ENTITY staff.circ.offline_checkout.step2.label 'Step 2)'>
-<!ENTITY staff.circ.offline_checkout.step3.accesskey '3'>
-<!ENTITY staff.circ.offline_checkout.step3.description 'Enter the item due date:'>
-<!ENTITY staff.circ.offline_checkout.step3.label 'Step 3)'>
-<!ENTITY staff.circ.offline_checkout.step4.accesskey '4'>
-<!ENTITY staff.circ.offline_checkout.step4.description 'Enter the item barcode:'>
-<!ENTITY staff.circ.offline_checkout.step4.label 'Step 4)'>
<!ENTITY staff.circ.offline_checkout.step5.description 'Repeat Steps 3 and 4 until done.'>
-<!ENTITY staff.circ.offline_checkout.step5.label 'Step 5)'>
-<!ENTITY staff.circ.offline_checkout.step6.label 'Step 6)'>
-<!ENTITY staff.circ.offline_checkout.date_helper 'or choose one of these'>
-<!ENTITY staff.circ.offline_checkout.date_helper.3_days 'Today + 3 days'>
-<!ENTITY staff.circ.offline_checkout.date_helper.7_days 'Today + 7 days'>
-<!ENTITY staff.circ.offline_checkout.date_helper.14_days 'Today + 14 days'>
-<!ENTITY staff.circ.offline_checkout.date_helper.30_days 'Today + 30 days'>
-<!ENTITY staff.circ.offline_checkout.strict_barcode.label 'Check barcode?'>
+<!ENTITY staff.circ.offline_in_house_use.main.label 'Standalone In House Use'>
+<!ENTITY staff.circ.offline_in_house_use.uses.label 'Enter the number of uses for the item:'>
+<!ENTITY staff.circ.offline_in_house_use.step4.description 'Repeat Steps 2 and 3 until done.'>
+<!ENTITY staff.circ.offline_register.main.label 'Standalone Patron Registration'>
+<!ENTITY staff.circ.offline_register.x_home_ou.label 'Home Library:'>
+<!ENTITY staff.circ.offline_register.x_profile.label 'Profile:'>
+<!ENTITY staff.circ.offline_register.barcode.label 'New Barcode:'>
+<!ENTITY staff.circ.offline_register.passwd.label 'New Password:'>
+<!ENTITY staff.circ.offline_register.family_name.label 'Last Name:'>
+<!ENTITY staff.circ.offline_register.first_given_name.label 'First Name:'>
+<!ENTITY staff.circ.offline_register.dob.label 'Date of Birth:'>
+<!ENTITY staff.circ.offline_register.x_ident_type.label 'Ident Type:'>
+<!ENTITY staff.circ.offline_register.ident_value.label 'Ident Value:'>
+<!ENTITY staff.circ.offline_register.billing_address.label 'Billing Address'>
+<!ENTITY staff.circ.offline_register.street1.label 'Line 1'>
+<!ENTITY staff.circ.offline_register.street2.label 'Line 2'>
+<!ENTITY staff.circ.offline_register.city.label 'City'>
+<!ENTITY staff.circ.offline_register.state.label 'State'>
+<!ENTITY staff.circ.offline_register.state.default_value 'GA'>
+<!ENTITY staff.circ.offline_register.post_code.label 'Postal Code'>
+<!ENTITY staff.circ.offline_register.country.label 'Country'>
+<!ENTITY staff.circ.offline_register.country.default_value 'USA'>
+<!ENTITY staff.circ.offline_register.submit.accesskey 'S'>
+<!ENTITY staff.circ.offline_register.submit.label 'Save patron registration'>
+<!ENTITY staff.circ.offline_renew.main.label 'Standalone Renew'>
+<!ENTITY staff.circ.offline_renew.p_barcode.description "(Optional) Enter the patron's barcode:">
+<!ENTITY staff.circ.offline_renew.step5.label 'Repeat Steps 3 and 4 until done.'>
+
<!ENTITY staff.circ.checkin.caption 'Check In'>
<!ENTITY staff.circ.checkin.scan_label 'Enter Barcode:'>
<!ENTITY staff.circ.checkin.scan_label.accesskey 'a'>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul 2007-08-18 09:01:23 UTC (rev 7706)
@@ -4,7 +4,7 @@
<overlay id="openils_util_overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script>dump('Loading OpenILS/util_overlay.xul\n');</script>
+ <script>dump('Loading OpenILS/util_overlay_offline.xul\n');</script>
<scripts id="openils_util_scripts">
<script type="text/javascript" src="../main/constants.js" />
<script type="text/javascript" src="util/utils.js" />
@@ -12,7 +12,7 @@
<script type="text/javascript" src="util/md5.js" />
<script type="text/javascript" src="util/JSON.js" />
</scripts>
- <script>dump('Loaded OpenILS/util_overlay.xul\n');</script>
+ <script>dump('Loaded OpenILS/util_overlay_offline.xul\n');</script>
</overlay>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.js 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.js 2007-08-18 09:01:23 UTC (rev 7706)
@@ -3,8 +3,8 @@
function my_init() {
try {
- commonStrings = document.getElementById('commonStrings');
- circStrings = document.getElementById('circStrings');
+ commonStrings = $('commonStrings');
+ circStrings = $('circStrings');
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(commonStrings.getString('common.jsan.missing')); }
@@ -40,7 +40,7 @@
if (file._file.exists()) { g.delta = file.get_object()[0]; file.close(); } else { g.delta = 0; }
} catch(E) {
- var err_msg = commonStrings.getFormattedMessage('common.exception', ["circ/offline_checkin.xul", E]);
+ var err_msg = commonStrings.getFormattedString('common.exception', ["circ/offline_checkin.xul", E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.xul 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkin.xul 2007-08-18 09:01:23 UTC (rev 7706)
@@ -29,22 +29,20 @@
<script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
<script type="text/javascript" src="offline_checkin.js"/>
-
<messagecatalog id="commonStrings" src="chrome://open_ils_staff_client/locale/common.properties"/>
<messagecatalog id="circStrings" src="chrome://open_ils_staff_client/locale/circ.properties"/>
-
<groupbox flex="1">
<caption label="&staff.circ.offline_checkin.main.label;"/>
<hbox flex="1">
<vbox flex="1">
<hbox>
- <label value="&staff.circ.offline_checkin.step1.label;" style="font-weight: bold" />
- <description>&staff.circ.offline_checkin.step1.description;</description>
+ <label value="&common.step1.label;" style="font-weight: bold" />
+ <description>&common.check_date.description;</description>
</hbox>
<hbox>
- <label value="&staff.circ.offline_checkin.step2.label;" style="font-weight: bold" accesskey="&staff.circ.offline_checkin.step2.accesskey;" control="i_barcode"/>
- <description>&staff.circ.offline_checkin.step2.description;</description>
+ <label value="&common.step2.label;" style="font-weight: bold" accesskey="&common.step2.accesskey;" control="i_barcode"/>
+ <description>&common.enter_barcode.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
@@ -52,15 +50,15 @@
</hbox>
<hbox>
<spacer flex="1"/>
- <description>&staff.circ.offline_checkin.step2b.label;</description>
+ <description>&common.check_barcode.description;</description>
<checkbox id="strict_i_barcode" persist="checked"/>
</hbox>
<hbox>
- <label value="&staff.circ.offline_checkin.step3.label;" style="font-weight: bold"/>
+ <label value="&common.step3.label;" style="font-weight: bold"/>
<description>&staff.circ.offline_checkin.step3.description;</description>
</hbox>
<hbox>
- <label value="&staff.circ.offline_checkin.step4.label;" style="font-weight: bold"/>
+ <label value="&common.step4.label;" style="font-weight: bold"/>
<description>&staff.circ.offline.finish.description;</description>
</hbox>
<hbox>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkout.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkout.js 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkout.js 2007-08-18 09:01:23 UTC (rev 7706)
@@ -3,8 +3,8 @@
function my_init() {
try {
- commonStrings = document.getElementById('commonStrings');
- circStrings = document.getElementById('circStrings');
+ commonStrings = $('commonStrings');
+ circStrings = $('circStrings');
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(commonStrings.getString('common.jsan.missing')); }
@@ -104,15 +104,18 @@
}
}
+
if (g.data.bad_patrons[barcode]) {
- var msg = '';
+ var code;
switch(g.data.bad_patrons[barcode]) {
- case 'L' : msg = circStrings.getFormattedString('circ.offline_checkout.barcode.flagged.lost', [g.data.bad_patrons_date.substr(0,15), barcode]); break;
- case 'E' : msg = circStrings.getFormattedString('circ.offline_checkout.barcode.flagged.expired', [g.data.bad_patrons_date.substr(0,15), barcode]); break;
- case 'B' : msg = circStrings.getFormattedString('circ.offline_checkout.barcode.flagged.barred', [g.data.bad_patrons_date.substr(0,15), barcode]); break;
- case 'D' : msg = circStrings.getFormattedString('circ.offline_checkout.barcode.flagged.blocked', [g.data.bad_patrons_date.substr(0,15), barcode]); break;
- default : msg = circStrings.getFormattedString('circ.offline_checkout.barcode.flagged.unknown', [g.data.bad_patrons_date.substr(0,15), barcode, g.data.bad_patrons[barcode]]); break;
+ case 'L' : code = commonStrings.getString('common.barcode.status.warning.lost'); break;
+ case 'E' : code = commonStrings.getString('common.barcode.status.warning.expired'); break;
+ case 'B' : code = commonStrings.getString('common.barcode.status.warning.barred'); break;
+ case 'D' : code = commonStrings.getString('common.barcode.status.warning.blocked'); break;
+ default : code = commonStrings.getFormattedString('common.barcode.status.warning.blocked', [g.data.bad_patrons[barcode]]); break;
}
+
+ var msg = commonStrings.getFormattedString('common.barcode.status.warning', [g.data.bad_patrons_date.substr(0,15), barcode, code]);
var r = g.error.yns_alert(msg,circStrings.getString('circ.barcode.warning'),commonStrings.getString('common.ok'),commonStrings.getString('common.clear'),null,commonStrings.getString('common.confirm'));
if (r == 1) {
setTimeout(
@@ -131,7 +134,7 @@
function check_date(ev) {
JSAN.use('util.date');
try {
- if (! util.date.check('YYYY-MM-DD',ev.target.value) ) { throw(circStrings.getString('circ.offline_checkout.date.invalid')); }
+ if (! util.date.check('YYYY-MM-DD',ev.target.value) ) { throw(commonStrings.getString('common.date.invalid')); }
if (util.date.check_past('YYYY-MM-DD',ev.target.value) ) { throw(circStrings.getString('circ.offline_checkout.date.early')); }
if (util.date.formatted_date(new Date(),'%F') == ev.target.value) { throw(circStrings.getString('circ.offline_checkout.date.early')); }
} catch(E) {
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkout.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkout.xul 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_checkout.xul 2007-08-18 09:01:23 UTC (rev 7706)
@@ -29,21 +29,19 @@
<script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
<script type="text/javascript" src="offline_checkout.js"/>
-
<messagecatalog id="commonStrings" src="chrome://open_ils_staff_client/locale/common.properties"/>
<messagecatalog id="circStrings" src="chrome://open_ils_staff_client/locale/circ.properties"/>
-
<groupbox flex="1">
<caption label="&staff.circ.offline_checkout.main.label;"/>
<hbox flex="1">
<vbox flex="1">
<hbox>
- <label value="&staff.circ.offline_checkout.step1.label;" style="font-weight: bold" />
- <description>&staff.circ.offline_checkout.step1.description;</description>
+ <label value="&common.step1.label;" style="font-weight: bold" />
+ <description>&common.check_date.description;</description>
</hbox>
<hbox>
- <label value="&staff.circ.offline_checkout.step2.label;" style="font-weight: bold" accesskey="&staff.circ.offline_checkout.step2.accesskey;" control="p_barcode"/>
+ <label value="&common.step2.label;" style="font-weight: bold" accesskey="&common.step2.accesskey;" control="p_barcode"/>
<description>&staff.circ.offline_checkout.step2.description;</description>
</hbox>
<hbox>
@@ -52,12 +50,12 @@
</hbox>
<hbox>
<spacer flex="1"/>
- <description>&staff.circ.offline_checkout.strict_barcode.label;</description>
+ <description>&common.check_barcode.description;</description>
<checkbox id="strict_p_barcode" persist="checked"/>
</hbox>
<hbox>
- <label value="&staff.circ.offline_checkout.step3.label;" style="font-weight: bold" accesskey="&staff.circ.offline_checkout.step3.accesskey;" control="duedate"/>
- <description>&staff.circ.offline_checkout.step3.description;</description>
+ <label value="&common.step3.label;" style="font-weight: bold" accesskey="&common.step3.accesskey;" control="duedate"/>
+ <description>&common.due_date.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
@@ -67,21 +65,21 @@
<spacer flex="1"/>
<menulist id="duedate_menu">
<menupopup>
- <menuitem label="&staff.circ.offline_checkout.date_helper;" value="0"/>
- <menuitem label="&staff.circ.offline_checkout.date_helper.3_days;" value="3"/>
- <menuitem label="&staff.circ.offline_checkout.date_helper.7_days;" value="7"/>
- <menuitem label="&staff.circ.offline_checkout.date_helper.14_days;" value="14"/>
- <menuitem label="&staff.circ.offline_checkout.date_helper.30_days;" value="30"/>
+ <menuitem label="&common.date_helper;" value="0"/>
+ <menuitem label="&common.date_helper.3_days;" value="3"/>
+ <menuitem label="&common.date_helper.7_days;" value="7"/>
+ <menuitem label="&common.date_helper.14_days;" value="14"/>
+ <menuitem label="&common.date_helper.30_days;" value="30"/>
</menupopup>
</menulist>
</hbox>
<hbox>
- <label value="&staff.circ.offline_checkout.step4.label;" style="font-weight: bold" accesskey="&staff.circ.offline_checkout.step4.accesskey;" control="i_barcode"/>
- <description>&staff.circ.offline_checkout.step4.description;</description>
+ <label value="&common.step4.label;" style="font-weight: bold" accesskey="&common.step4.accesskey;" control="i_barcode"/>
+ <description>&common.enter_barcode.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
- <hbox><textbox id="i_barcode"/><button id="enter" label="&common.enter;" accesskey="&common.enter.accesskey;"/></hbox>
+ <hbox><textbox id="i_barcode"/><button id="enter" label="&common.enter.label;" accesskey="&common.enter.accesskey;"/></hbox>
</hbox>
<hbox>
<spacer flex="1"/>
@@ -89,15 +87,15 @@
</hbox>
<hbox>
<spacer flex="1"/>
- <description>&staff.circ.offline_checkout.strict_barcode.label;</description>
+ <description>&common.check_barcode.description;</description>
<checkbox id="strict_i_barcode" persist="checked"/>
</hbox>
<hbox>
- <label value="&staff.circ.offline_checkout.step5.label;" style="font-weight: bold"/>
+ <label value="&common.step5.label;" style="font-weight: bold"/>
<description>&staff.circ.offline_checkout.step5.description;</description>
</hbox>
<hbox>
- <label value="&staff.circ.offline_checkout.step6.label;" style="font-weight: bold"/>
+ <label value="&common.step6.label;" style="font-weight: bold"/>
<description>&staff.circ.offline.finish.description;</description>
</hbox>
<hbox>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_in_house_use.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_in_house_use.js 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_in_house_use.js 2007-08-18 09:01:23 UTC (rev 7706)
@@ -1,14 +1,20 @@
+var commonStrings;
+var circStrings;
+
function my_init() {
try {
+ commonStrings = document.getElementById('commonStrings');
+ circStrings = document.getElementById('circStrings');
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw(commonStrings.getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
JSAN.use('util.error'); g.error = new util.error();
g.error.sdump('D_TRACE','my_init() for offline_checkout.xul');
if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
- try { window.xulG.set_tab_name('Standalone'); } catch(E) { alert(E); }
+ try { window.xulG.set_tab_name(circStrings.getString('circ.standalone')); } catch(E) { alert(E); }
}
JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
@@ -31,8 +37,7 @@
if (file._file.exists()) { g.delta = file.get_object()[0]; file.close(); } else { g.delta = 0; }
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\ncirc/offline_in_house_use.xul\n" + E + '\n';
+ var err_msg = commonStrings.getFormattedString('common.exception', ["circ/offline_in_house_use.xul", E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
@@ -51,7 +56,7 @@
function handle_enter(ev) {
JSAN.use('util.barcode');
if ( ($('strict_i_barcode').checked) && (! util.barcode.check($('i_barcode').value)) ) {
- var r = g.error.yns_alert('This barcode has a bad checkdigit.','Barcode Warning','Ok','Clear',null,'Check here to confirm this message');
+ var r = g.error.yns_alert(circStrings.getString('circ.bad_checkdigit'),circStrings.getString('circ.barcode.warning'),commonStrings.getString('common.ok'),commonStrings.getString('common.clear'),null,commonStrings.getString('common.confirm'));
if (r == 1) {
setTimeout(
function() {
@@ -77,6 +82,7 @@
my.type = 'in_house_use';
my.timestamp = parseInt( new Date().getTime() / 1000) + g.delta;
+ /* I18N to-do: enable localized date formats */
my.use_time = util.date.formatted_date(new Date(),"%F %H:%M:%s");
var i_barcode = $('i_barcode').value;
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_in_house_use.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_in_house_use.xul 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_in_house_use.xul 2007-08-18 09:01:23 UTC (rev 7706)
@@ -29,17 +29,20 @@
<script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
<script type="text/javascript" src="offline_in_house_use.js"/>
+ <messagecatalog id="commonStrings" src="chrome://open_ils_staff_client/locale/common.properties"/>
+ <messagecatalog id="circStrings" src="chrome://open_ils_staff_client/locale/circ.properties"/>
+
<groupbox flex="1">
- <caption label="Standalone In House Use"/>
+ <caption label="&staff.circ.offline_in_house_use.main.label;"/>
<hbox flex="1">
<vbox flex="1">
<hbox>
- <label value="Step 1)" style="font-weight: bold" />
- <description>Check today's date above.</description>
+ <label value="&common.step1.label;" style="font-weight: bold" />
+ <description>&common.check_date.description;</description>
</hbox>
<hbox>
- <label value="Step 2)" style="font-weight: bold" accesskey="2" control="count"/>
- <description>Enter the number of uses for the item:</description>
+ <label value="&common.step2.label;" style="font-weight: bold" accesskey="&common.step2.accesskey;" control="count"/>
+ <description>&staff.circ.offline_in_house_use.uses.label;</description>
</hbox>
<hbox>
<spacer flex="1"/>
@@ -47,35 +50,35 @@
</hbox>
<hbox>
- <label value="Step 3)" style="font-weight: bold" accesskey="3" control="i_barcode"/>
- <description>Enter the item barcode:</description>
+ <label value="&common.step3.label;" style="font-weight: bold" accesskey="&common.step3.accesskey;" control="i_barcode"/>
+ <description>&common.enter_barcode.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
- <hbox><textbox id="i_barcode"/><button id="enter" label="Enter" accesskey="E"/></hbox>
+ <hbox><textbox id="i_barcode"/><button id="enter" label="&common.enter.label;" accesskey="&common.enter.accesskey;"/></hbox>
</hbox>
<hbox>
<spacer flex="1"/>
- <description>Check barcode?</description>
+ <description>&common.check_barcode.description;</description>
<checkbox id="strict_i_barcode" persist="checked"/>
</hbox>
<hbox>
- <label value="Step 4)" style="font-weight: bold"/>
- <description>Repeat Steps 2 and 3 until done.</description>
+ <label value="&common.step4.label;" style="font-weight: bold"/>
+ <description>&staff.circ.offline_in_house_use.step4.description;</description>
</hbox>
<hbox>
- <label value="Step 5)" style="font-weight: bold"/>
- <description>Finish</description>
+ <label value="&common.step5.label;" style="font-weight: bold"/>
+ <description>&staff.circ.offline.finish.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
- <description>Print receipt?</description>
+ <description>&staff.circ.offline.print.description;</description>
<checkbox id="print_receipt" persist="checked"/>
</hbox>
<hbox>
<spacer flex="1"/>
- <button id="cancel" label="Cancel" oncommand="g.list.clear()"/>
- <button id="submit" label="Save these transactions" accesskey="S" />
+ <button id="cancel" label="&common.cancel;" oncommand="g.list.clear()"/>
+ <button id="submit" label="&common.save_transactions.label;" accesskey="&common.save_transactions.accesskey;" />
</hbox>
</vbox>
<splitter>
@@ -85,7 +88,7 @@
<tree id="checkout_list" flex="1" enableColumnDrag="true"/>
<hbox id="checkout_bottom_ui">
<spacer flex="1"/>
- <button id="delete" label="Delete selected transaction" oncommand="alert('Not Yet Implemented');"/>
+ <button id="delete" label="&common.delete_transactions.label;" oncommand="alert('&common.unimplemented;');"/>
</hbox>
</vbox>
</hbox>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_register.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_register.js 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_register.js 2007-08-18 09:01:23 UTC (rev 7706)
@@ -1,7 +1,13 @@
+var commonStrings;
+var circStrings;
+
function my_init() {
try {
+ commonStrings = $('commonStrings');
+ circStrings = $('circStrings');
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+ if (typeof JSAN == 'undefined') { throw(commonStrings.getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
JSAN.use('util.error'); g.error = new util.error();
@@ -10,7 +16,7 @@
JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
- try { window.xulG.set_tab_name('Standalone'); } catch(E) { alert(E); }
+ try { window.xulG.set_tab_name(circStrings.getString('circ.standalone')); } catch(E) { alert(E); }
}
$('barcode').addEventListener('change',test_patron,false);
@@ -28,7 +34,7 @@
ml = util.widgets.make_menulist( list_data[0], list_data[1] );
ml.setAttribute('id','home_ou'); $('x_home_ou').appendChild(ml);
} else {
- errors += 'Missing library list.\n';
+ errors += circStrings.getString('circ.offline_register.missing.library.list') + "\n";
}
file = new util.file('offline_pgt_list');
@@ -37,7 +43,7 @@
ml = util.widgets.make_menulist( list_data[0], list_data[1] );
ml.setAttribute('id','profile'); $('x_profile').appendChild(ml);
} else {
- errors += 'Missing profile list.\n';
+ errors += circStrings.getString('circ.offline_register.missing.profile.list') + "\n";
}
file = new util.file('offline_cit_list');
@@ -46,7 +52,7 @@
ml = util.widgets.make_menulist( list_data[0], list_data[1] );
ml.setAttribute('id','ident_type'); $('x_ident_type').appendChild(ml);
} else {
- errors += 'Missing identification type list.\n';
+ errors += circStrings.getString('circ.offline_register.missing.id.type.list') + "\n";
}
file = new util.file('offline_asv_list');
@@ -54,11 +60,11 @@
list_data = file.get_object(); file.close();
render_surveys('x_surveys', list_data);
} else {
- errors += 'Missing required surveys.\n';
+ errors += circStrings.getString('circ.offline_register.missing.required.surveys');
}
if (errors != '') {
- alert('ERROR: Offline patron registration requires some server-generated files. Please login periodically to retrieve these files.\n' + errors);
+ alert(circStrings.getString('circ.offline_register.missing.files.error') + errors);
location.href = 'about:blank';
}
@@ -71,8 +77,7 @@
if (file._file.exists()) { g.delta = file.get_object()[0]; file.close(); } else { g.delta = 0; }
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\ncirc/offline_register.xul\n" + E + '\n';
+ var err_msg = commonStrings.getFormattedString('common.exception', ["circ/offline_register.xul", E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
@@ -85,7 +90,7 @@
var barcode = ev.target.value;
JSAN.use('util.barcode');
if ( ! util.barcode.check(ev.target.value) ) {
- var r = g.error.yns_alert('This barcode has a bad checkdigit.','Barcode Warning','Ok','Clear',null,'Check here to confirm this message');
+ var r = g.error.yns_alert(circStrings.getString('circ.bad_checkdigit'),circStrings.getString('circ.barcode.warning'),commonStrings.getString('common.ok'),commonStrings.getString('common.clear'),null,commonStrings.getString('common.confirm'));
if (r == 1) {
setTimeout(
function() {
@@ -97,15 +102,17 @@
}
if (g.data.bad_patrons[barcode]) {
- var msg = 'Warning: As of ' + g.data.bad_patrons_date.substr(0,15) + ', this barcode (' + barcode + ') was flagged ';
+ var code;
switch(g.data.bad_patrons[barcode]) {
- case 'L' : msg += 'Lost'; break;
- case 'E' : msg += 'Expired'; break;
- case 'B' : msg += 'Barred'; break;
- case 'D' : msg += 'Blocked'; break;
- default : msg += ' with an unknown code: ' + g.data.bad_patrons[barcode]; break;
+ case 'L' : code = commonStrings.getString('common.barcode.status.warning.lost'); break;
+ case 'E' : code = commonStrings.getString('common.barcode.status.warning.expired'); break;
+ case 'B' : code = commonStrings.getString('common.barcode.status.warning.barred'); break;
+ case 'D' : code = commonStrings.getString('common.barcode.status.warning.blocked'); break;
+ default : code = commonStrings.getFormattedString('common.barcode.status.warning.blocked', [g.data.bad_patrons[barcode]]); break;
}
- var r = g.error.yns_alert(msg,'Barcode Warning','Ok','Clear',null,'Check here to confirm this message');
+
+ var msg = commonStrings.getFormattedString('common.barcode.status.warning', [g.data.bad_patrons_date.substr(0,15), barcode, code]);
+ var r = g.error.yns_alert(msg,circStrings.getString('circ.barcode.warning'),commonStrings.getString('common.ok'),commonStrings.getString('common.clear'),null,commonStrings.getString('common.confirm'));
if (r == 1) {
setTimeout(
function() {
@@ -127,9 +134,9 @@
function check_date(value) {
JSAN.use('util.date');
try {
- if (! util.date.check('YYYY-MM-DD',value) ) { throw('Invalid Date'); }
- if (! util.date.check_past('YYYY-MM-DD',value) ) { throw('Patron needs to be born yesterday.'); }
- if ( util.date.formatted_date(new Date(),'%F') == value) { throw('Happy birthday! You need to be more than 0 days old.'); }
+ if (! util.date.check('YYYY-MM-DD',value) ) { throw(commonStrings.getString('common.date.invalid')); }
+ if (! util.date.check_past('YYYY-MM-DD',value) ) { throw(circStrings.getString('circ.offline_register.future.birth.date')); }
+ if ( util.date.formatted_date(new Date(),'%F') == value) { throw(circStrings.getString('circ.offline_register.invalid.birth.date')); }
} catch(E) {
alert(E);
value = '';
@@ -157,7 +164,7 @@
x_gb.appendChild(x_hb);
var x_spacer = document.createElement('spacer'); x_spacer.setAttribute('flex','1');
x_hb.appendChild(x_spacer);
- var x_ml = util.widgets.make_menulist( [ ['Choose a response...',''] ].concat(question.answers) );
+ var x_ml = util.widgets.make_menulist( [ [circStrings.getString('circ.offline_register.survey.prompt'),''] ].concat(question.answers) );
x_ml.setAttribute('name','survey'); x_hb.appendChild(x_ml);
}
}
@@ -174,91 +181,91 @@
function check_patron(obj) {
var errors = '';
if (! obj.user.billing_address.post_code ) {
- errors += 'Missing Address : Postal Code\n';
+ errors += circStrings.getString('circ.offline_register.missing.post_code') + "\n";
$('post_code').focus();
$('post_code').parentNode.setAttribute('style','background-color: red');
} else {
$('post_code').parentNode.setAttribute('style','');
}
if (! obj.user.billing_address.state ) {
- errors += 'Missing Address : State\n';
+ errors += circStrings.getString('circ.offline_register.missing.state') + "\n";
$('state').focus();
$('state').parentNode.setAttribute('style','background-color: red');
} else {
$('state').parentNode.setAttribute('style','');
}
if (! obj.user.billing_address.city ) {
- errors += 'Missing Address : City\n';
+ errors += circStrings.getString('circ.offline_register.missing.city') + "\n";
$('city').focus();
$('city').parentNode.setAttribute('style','background-color: red');
} else {
$('city').parentNode.setAttribute('style','');
}
if (! obj.user.billing_address.street1 ) {
- errors += 'Missing Address : Line 1\n';
+ errors += circStrings.getString('circ.offline_register.missing.street1') + "\n";
$('street1').focus();
$('street1').parentNode.setAttribute('style','background-color: red');
} else {
$('street1').parentNode.setAttribute('style','');
}
if (! obj.user.ident_value ) {
- errors += 'Missing Identification Value\n';
+ errors += circStrings.getString('circ.offline_register.missing.ident_value') + "\n";
$('ident_value').focus();
$('ident_value').parentNode.setAttribute('style','background-color: red');
} else {
$('ident_value').parentNode.setAttribute('style','');
}
if (! obj.user.ident_type ) {
- errors += 'Missing Identification Type\n';
+ errors += circStrings.getString('circ.offline_register.missing.ident_type') + "\n";
$('ident_type').focus();
$('ident_type').parentNode.setAttribute('style','background-color: red');
} else {
$('ident_type').parentNode.setAttribute('style','');
}
if (! obj.user.dob ) {
- errors += 'Missing Date of Birth\n';
+ errors += circStrings.getString('circ.offline_register.missing.dob') + "\n";
$('dob').focus();
$('dob').parentNode.parentNode.setAttribute('style','background-color: red');
} else {
$('dob').parentNode.parentNode.setAttribute('style','');
}
if (! obj.user.first_given_name ) {
- errors += 'Missing First Name\n';
+ errors += circStrings.getString('circ.offline_register.missing.first_given_name') + "\n";
$('first_given_name').focus();
$('first_given_name').parentNode.setAttribute('style','background-color: red');
} else {
$('first_given_name').parentNode.setAttribute('style','');
}
if (! obj.user.family_name ) {
- errors += 'Missing Last Name\n';
+ errors += circStrings.getString('circ.offline_register.missing.family_name') + "\n";
$('family_name').focus();
$('family_name').parentNode.setAttribute('style','background-color: red');
} else {
$('family_name').parentNode.setAttribute('style','');
}
if (! obj.user.passwd ) {
- errors += 'Missing Password\n';
+ errors += circStrings.getString('circ.offline_register.missing.passwd') + "\n";
$('passwd').focus();
$('passwd').parentNode.setAttribute('style','background-color: red');
} else {
$('passwd').parentNode.setAttribute('style','');
}
if (! obj.user.card.barcode ) {
- errors += 'Missing Barcode\n';
+ errors += circStrings.getString('circ.offline_register.missing.barcode') + "\n";
$('barcode').focus();
$('barcode').parentNode.setAttribute('style','background-color: red');
} else {
$('barcode').parentNode.setAttribute('style','');
}
if (! obj.user.profile ) {
- errors += 'Missing Profile\n';
+ errors += circStrings.getString('circ.offline_register.missing.profile') + "\n";
$('profile').focus();
$('profile').parentNode.setAttribute('style','background-color: red');
} else {
$('profile').parentNode.setAttribute('style','');
}
if (! obj.user.home_ou ) {
- errors += 'Missing Home Library\n';
+ errors += circStrings.getString('circ.offline_register.missing.home_ou') + "\n";
$('home_ou').focus();
$('home_ou').parentNode.setAttribute('style','background-color: red');
} else {
@@ -302,7 +309,7 @@
try {
check_patron(obj);
} catch(E) {
- alert('Please fix the following:\n' + E);
+ alert(circStrings.getString('circ.offline_register.missing.alert') + "\n" + E);
return;
}
@@ -311,7 +318,7 @@
file.append_object(obj);
file.close();
- alert('Patron Registration Saved');
+ alert(circStrings.getString('circ.offline_register.patron.saved'));
$('passwd').value = parseInt(Math.random()*8999+1000);
$('barcode').value = ''; $('ident_value').value = ''; $('first_given_name').value = '';
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_register.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_register.xul 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_register.xul 2007-08-18 09:01:23 UTC (rev 7706)
@@ -29,17 +29,20 @@
<script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
<script type="text/javascript" src="offline_register.js"/>
+ <messagecatalog id="commonStrings" src="chrome://open_ils_staff_client/locale/common.properties"/>
+ <messagecatalog id="circStrings" src="chrome://open_ils_staff_client/locale/circ.properties"/>
+
<groupbox flex="1">
- <caption label="Standalone Patron Registration"/>
+ <caption label="&staff.circ.offline_register.main.label;"/>
<grid>
<columns><column/><column/></columns>
<rows>
<row>
- <label value="Home Library:"/>
+ <label value="&staff.circ.offline_register.x_home_ou.label;"/>
<hbox id="x_home_ou"/>
</row>
<row>
- <label value="Profile:"/>
+ <label value="&staff.circ.offline_register.x_profile.label;"/>
<hbox id="x_profile"/>
</row>
<row>
@@ -53,33 +56,33 @@
<columns><column/><column/></columns>
<rows>
<row>
- <label value="New Barcode:"/>
+ <label value="&staff.circ.offline_register.barcode.label;"/>
<textbox id="barcode"/>
</row>
<row>
- <label value="New Password:"/>
+ <label value="&staff.circ.offline_register.passwd.label;"/>
<textbox id="passwd"/>
</row>
<row><label value=" "/></row>
<row>
- <label value="Last Name:"/>
+ <label value="&staff.circ.offline_register.family_name.label;"/>
<textbox id="family_name"/>
</row>
<row>
- <label value="First Name:"/>
+ <label value="&staff.circ.offline_register.first_given_name.label;"/>
<textbox id="first_given_name"/>
</row>
<row>
- <label value="Date of Birth:"/>
+ <label value="&staff.circ.offline_register.dob.label;"/>
<textbox id="dob" style="font-family: monospace;"/>
</row>
<row><label value=" "/></row>
<row>
- <label value="Ident Type:"/>
+ <label value="&staff.circ.offline_register.x_ident_type.label;"/>
<hbox id="x_ident_type"/>
</row>
<row>
- <label value="Ident Value:"/>
+ <label value="&staff.circ.offline_register.ident_value.label;"/>
<textbox id="ident_value"/>
</row>
</rows>
@@ -91,31 +94,31 @@
<columns><column/><column/></columns>
<rows>
<row>
- <label value="Billing Address"/>
+ <label value="&staff.circ.offline_register.billing_address.label;"/>
</row>
<row>
- <label value="Line 1"/>
+ <label value="&staff.circ.offline_register.street1.label;"/>
<textbox id="street1"/>
</row>
<row>
- <label value="Line 2"/>
+ <label value="&staff.circ.offline_register.street2.label;"/>
<textbox id="street2"/>
</row>
<row>
- <label value="City"/>
+ <label value="&staff.circ.offline_register.city.label;"/>
<textbox id="city"/>
</row>
<row>
- <label value="State"/>
- <textbox id="state" value="GA"/>
+ <label value="&staff.circ.offline_register.state.label;"/>
+ <textbox id="state" value="&staff.circ.offline_register.state.default_value;"/>
</row>
<row>
- <label value="Postal Code"/>
+ <label value="&staff.circ.offline_register.post_code.label;"/>
<textbox id="post_code"/>
</row>
<row hidden="true">
- <label value="Country"/>
- <textbox id="country" value="USA"/>
+ <label value="&staff.circ.offline_register.country.label;"/>
+ <textbox id="country" value="&staff.circ.offline_register.country.default_value;"/>
</row>
<row><label value=" "/></row>
</rows>
@@ -125,8 +128,8 @@
</hbox>
<hbox>
<spacer flex="1"/>
- <button id="cancel" label="Cancel" />
- <button id="submit" label="Save patron registration" accesskey="S" />
+ <button id="cancel" label="&common.cancel;" />
+ <button id="submit" label="&staff.circ.offline_register.submit.label;" accesskey="&staff.circ.offline_register.submit.accesskey;" />
</hbox>
</groupbox>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.xul 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/circ/offline_renew.xul 2007-08-18 09:01:23 UTC (rev 7706)
@@ -29,17 +29,20 @@
<script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
<script type="text/javascript" src="offline_renew.js"/>
+ <messagecatalog id="commonStrings" src="chrome://open_ils_staff_client/locale/common.properties"/>
+ <messagecatalog id="circStrings" src="chrome://open_ils_staff_client/locale/circ.properties"/>
+
<groupbox flex="1">
- <caption label="Standalone Renew"/>
+ <caption label="&staff.circ.offline_renew.main.label;"/>
<hbox flex="1">
<vbox flex="1">
<hbox>
- <label value="Step 1)" style="font-weight: bold" />
- <description>Check today's date above.</description>
+ <label value="&common.step1.label;" style="font-weight: bold" />
+ <description>&common.check_date.description;</description>
</hbox>
<hbox>
- <label value="Step 2)" style="font-weight: bold" accesskey="2" control="p_barcode"/>
- <description>(Optional) Enter the patron's barcode:</description>
+ <label value="&common.step2.label;" style="font-weight: bold" accesskey="&common.step2.accesskey;" control="p_barcode"/>
+ <description>&staff.circ.offline_renew.p_barcode.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
@@ -47,12 +50,12 @@
</hbox>
<hbox>
<spacer flex="1"/>
- <description>Check barcode?</description>
+ <description>&common.check_barcode.description;</description>
<checkbox id="strict_p_barcode" persist="checked"/>
</hbox>
<hbox>
- <label value="Step 3)" style="font-weight: bold" accesskey="3" control="duedate"/>
- <description>Enter the item due date:</description>
+ <label value="&common.step3.label;" style="font-weight: bold" accesskey="&common.step3.accesskey;" control="duedate"/>
+ <description>&common.due_date.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
@@ -62,44 +65,44 @@
<spacer flex="1"/>
<menulist id="duedate_menu">
<menupopup>
- <menuitem label="or choose one of these" value="0"/>
- <menuitem label="Today + 3 days" value="3"/>
- <menuitem label="Today + 7 days" value="7"/>
- <menuitem label="Today + 14 days" value="14"/>
- <menuitem label="Today + 30 days" value="30"/>
+ <menuitem label="&common.date_helper;" value="0"/>
+ <menuitem label="&common.date_helper.3_days;" value="3"/>
+ <menuitem label="&common.date_helper.7_days;" value="7"/>
+ <menuitem label="&common.date_helper.14_days;" value="14"/>
+ <menuitem label="&common.date_helper.30_days;" value="30"/>
</menupopup>
</menulist>
</hbox>
<hbox>
- <label value="Step 4)" style="font-weight: bold" accesskey="4" control="i_barcode"/>
- <description>Enter the item barcode:</description>
+ <label value="&common.step4.label;" style="font-weight: bold" accesskey="&common.step4.accesskey;" control="i_barcode"/>
+ <description>&common.enter_barcode.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
- <hbox><textbox id="i_barcode"/><button id="enter" label="Enter" accesskey="E"/></hbox>
+ <hbox><textbox id="i_barcode"/><button id="enter" label="&common.enter.label;" accesskey="&common.enter.accesskey;"/></hbox>
</hbox>
<hbox>
<spacer flex="1"/>
- <description>Check barcode?</description>
+ <description>&common.check_barcode.description;</description>
<checkbox id="strict_i_barcode" persist="checked"/>
</hbox>
<hbox>
- <label value="Step 5)" style="font-weight: bold"/>
- <description>Repeat Steps 3 and 4 until done.</description>
+ <label value="&common.step5.label;" style="font-weight: bold"/>
+ <description>&staff.circ.offline_renew.step5.label;</description>
</hbox>
<hbox>
- <label value="Step 6)" style="font-weight: bold"/>
- <description>Finish</description>
+ <label value="&common.step6.label;" style="font-weight: bold"/>
+ <description>&staff.circ.offline.finish.description;</description>
</hbox>
<hbox>
<spacer flex="1"/>
- <description>Print receipt?</description>
+ <description>&staff.circ.offline.print.description;</description>
<checkbox id="print_receipt" persist="checked"/>
</hbox>
<hbox>
<spacer flex="1"/>
- <button id="cancel" label="Cancel" />
- <button id="submit" label="Save these transactions" accesskey="S" />
+ <button id="cancel" label="&common.cancel;" />
+ <button id="submit" label="&common.save_transactions.label;" accesskey="&common.save_transactions.accesskey;" />
</hbox>
</vbox>
<splitter>
@@ -109,7 +112,7 @@
<tree id="checkout_list" flex="1" enableColumnDrag="true"/>
<hbox id="checkout_bottom_ui">
<spacer flex="1"/>
- <button id="delete" label="Delete selected transaction" oncommand="alert('Not Yet Implemented');"/>
+ <button id="delete" label="&common.delete_transactions.label;" oncommand="alert('&common.unimplemented;');"/>
</hbox>
</vbox>
</hbox>
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml 2007-08-18 09:01:23 UTC (rev 7706)
@@ -63,9 +63,38 @@
<![CDATA[
var lines = str.split("\n");
var props = {};
+ var line = '';
+ var in_comment = false;
+
for (var l in lines) {
- var line = lines[l];
+ line += lines[l];
+ // handle multi-line comments
+ if (line.indexOf('/*') >= 0) in_comment = true;
+
+ if (in_comment && line.indexOf('*/') > 0) {
+ var comment_start = line.indexOf('/*');
+ var comment_end = line.indexOf('*/');
+ line = line.substring(0, comment_start) + line.substring(0, comment_end + 2);
+ in_comment = false;
+ } else if (in_comment) continue;
+
+ // get rid of entire-line comments
+ if (line.indexOf('#') == 0) {
+ line = '';
+ continue;
+ }
+
+ // handle end-of-line comments
+ var end_comment = line.indexOf('//');
+ if (end_comment >= 0) line = line.substring(0, end_comment);
+
+ // and line concatenation
+ if (line.charAt(line.lenth - 1) == '\\') {
+ line = line.substring(0,line.lenth - 1);
+ continue;
+ }
+
var eq_pos = line.indexOf('=');
if (eq_pos < 0) continue;
@@ -91,6 +120,7 @@
} while ( cont == true );
props[k] = v;
+ line = '';
}
return props;
@@ -120,8 +150,24 @@
try {
var str = this._props[key]; if (!str) throw("messageCatalog: Failed to get string " + key + " in bundle.");
var these = [ str ].concat(params);
- var val = this.sprintf.apply(this,these);
- return val;
+ var v = this.sprintf.apply(this,these);
+
+ // The standard set of replacables
+ v = v.replace(/\\\\/g, '\\');
+ v = v.replace(/\\b/g, '\b');
+ v = v.replace(/\\f/g, '\f');
+ v = v.replace(/\\r/g, '\r');
+ v = v.replace(/\\t/g, '\t');
+ v = v.replace(/\\v/g, '\v');
+ v = v.replace(/\\n/g, '\n');
+
+ // replace unicode escapes
+ v = v.replace(
+ /\\u([0-9a-f]{4})/gi,
+ function (r,s) { return String.fromCharCode(s); }
+ );
+
+ return v;
} catch(e) {
alert("*** Failed to get string " + key + " in bundle: " + this.src + "\n");
throw(e);
@@ -255,6 +301,7 @@
var value = valueIndex ? a[valueIndex.slice(0, -1)] : a[i++];
switch (type) {
+ case 'S':
case 's': return formatString(String(value), leftJustify, minWidth, precision, zeroPad);
case 'c': return formatString(String.fromCharCode(+value), leftJustify, minWidth, precision, zeroPad);
case 'b': return formatBaseX(value, 2, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/cat.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/cat.properties 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/cat.properties 2007-08-18 09:01:23 UTC (rev 7706)
@@ -1,6 +1,6 @@
-cat.bib_record=Bib Record: %1$S
+cat.bib_record=Bib Record: %1$s
cat.save_record=Save Record
cat.save.success=Record successfully saved.
cat.save.failure=Record not likely updated.
-cat.record.counter=Record %1$S of %2$S
+cat.record.counter=Record %1$s of %2$s
cat.preference.error=Preference not likely updated.
Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/circ.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/circ.properties 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/circ.properties 2007-08-18 09:01:23 UTC (rev 7706)
@@ -7,13 +7,35 @@
circ.offline_checkout.nonbarcoded=or choose a non-barcoded option...
circ.offline_checkout.items=Enter the number of items:
circ.offline_checkout.download.warning=WARNING: The non-barcode types have not been downloaded from the server. You should log in to retrieve these.
-circ.offline_checkout.barcode.flagged.lost=Warning: As of %1$S, this barcode (%2$S) was flagged Lost.
-circ.offline_checkout.barcode.flagged.expired=Warning: As of %1$S, this barcode (%2$S) was flagged Expired.
-circ.offline_checkout.barcode.flagged.barred=Warning: As of %1$S, this barcode (%2$S) was flagged Barred.
-circ.offline_checkout.barcode.flagged.blocked=Warning: As of %1$S, this barcode (%2$S) was flagged Blocked.
-circ.offline_checkout.barcode.flagged.unknown=Warning: As of %1$S, this barcode (%2$S) was flagged with an unknown code: %3$S.
-circ.offline_checkout.date.invalid=Invalid Date
+circ.offline_checkout.barcode.flagged.lost=Warning: As of %1$s, this barcode (%2$s) was flagged Lost.
+circ.offline_checkout.barcode.flagged.expired=Warning: As of %1$s, this barcode (%2$s) was flagged Expired.
+circ.offline_checkout.barcode.flagged.barred=Warning: As of %1$s, this barcode (%2$s) was flagged Barred.
+circ.offline_checkout.barcode.flagged.blocked=Warning: As of %1$s, this barcode (%2$s) was flagged Blocked.
+circ.offline_checkout.barcode.flagged.unknown=Warning: As of %1$s, this barcode (%2$s) was flagged with an unknown code: %3$s.
circ.offline_checkout.date.early=Due date needs to be after today.
circ.offline_checkout.required_field=Required Field
circ.offline_checkout.valid_count=Please try again and enter a valid count.
circ.offline_checkout.required_value=Required Value
+circ.offline_register.future.birth.date=Patron needs to be born yesterday.
+circ.offline_register.invalid.birth.date=Happy birthday! You need to be more than 0 days old.
+circ.offline_register.survey.prompt=Choose a response...
+circ.offline_register.missing.post_code=Missing Address : Postal Code
+circ.offline_register.missing.state=Missing Address : State
+circ.offline_register.missing.city=Missing Address : City
+circ.offline_register.missing.street1=Missing Address : Line 1
+circ.offline_register.missing.ident_value=Missing Identification Value
+circ.offline_register.missing.ident_type=Missing Identification Type
+circ.offline_register.missing.dob=Missing Date of Birth
+circ.offline_register.missing.first_given_name=Missing First Name
+circ.offline_register.missing.family_name=Missing Last Name
+circ.offline_register.missing.passwd=Missing Password
+circ.offline_register.missing.barcode=Missing Barcode
+circ.offline_register.missing.profile=Missing Profile
+circ.offline_register.missing.home_ou=Missing Home Library
+circ.offline_register.missing.alert=Please fix the following:
+circ.offline_register.patron.saved=Patron Registration Saved
+circ.offline_register.missing.library.list=Missing library list.
+circ.offline_register.missing.profile.list=Missing profile list.
+circ.offline_register.missing.id.type.list=Missing identification type list.
+circ.offline_register.missing.required.surveys=Missing required surveys.
+circ.offline_register.missing.files.error=ERROR: Offline patron registration requires some server-generated files. Please login periodically to retrieve these files.
Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/common.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/common.properties 2007-08-18 08:14:22 UTC (rev 7705)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/common.properties 2007-08-18 09:01:23 UTC (rev 7706)
@@ -1,6 +1,13 @@
-common.exception=!! This software has encountered an error. Please tell your friendly system administrator or software developer the following:\n%1$S\n%2$S\n
+common.exception=!! This software has encountered an error. Please tell your friendly system administrator or software developer the following:\n%1$s\n%2$s\n
common.jsan.missing=The JSAN library object is missing.
common.ok=Ok
common.clear=Clear
common.confirm=Check here to confirm this message.
common.error.default=Please report that this happened.
+common.barcode.status.warning=Warning: As of %1$s, this barcode (%2$s) was flagged %3.
+common.barcode.status.warning.lost=Lost
+common.barcode.status.warning.expired=Expired
+common.barcode.status.warning.barred=Barred
+common.barcode.status.warning.blocked=Blocked
+common.barcode.status.warning.unknown=with an unknown code: %1$s
+common.date.invalid=Invalid Date
More information about the open-ils-commits
mailing list