[open-ils-commits] r9266 - in trunk/Open-ILS: web/opac/locale/en-US
xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 8 11:43:46 EDT 2008
Author: dbs
Date: 2008-04-08 11:06:30 -0400 (Tue, 08 Apr 2008)
New Revision: 9266
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.js
trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul
Log:
i18n for copy_buckets.js and copy_buckets.xul
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2008-04-08 04:18:33 UTC (rev 9265)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2008-04-08 15:06:30 UTC (rev 9266)
@@ -1804,3 +1804,4 @@
<!ENTITY staff.cat.copy_browser.holdings_maintenance.save_columns.label "Save Columns">
<!ENTITY staff.cat.copy_browser.holdings_maintenance.cmd_refresh_list.label "Refresh Listing">
<!ENTITY staff.cat.copy_browser.holdings_maintenance.cmd_refresh_list.accesskey "R">
+<!ENTITY staff.cat.copy_buckets.window_title "Copy Buckets">
Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.js 2008-04-08 04:18:33 UTC (rev 9265)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.js 2008-04-08 15:06:30 UTC (rev 9266)
@@ -1,3 +1,4 @@
+// vim:noet:sw=4:ts=4:
dump('entering cat.copy_buckets.js\n');
if (typeof cat == 'undefined') cat = {};
@@ -19,7 +20,7 @@
if (this.first_pause) {
this.first_pause = false;
} else {
- alert("Action completed.");
+ alert($('catStrings').getString('staff.cat.copy_buckets.render_pending_copies.complete'));
}
var obj = this;
obj.list1.clear();
@@ -66,7 +67,7 @@
if (typeof params.on_retrieve == 'function') { params.on_retrieve(row); }
} catch(E) {
- obj.error.standard_unexpected_error_alert('Error retrieving details for item with copy id =' + row.my.acp_id, E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getFormattedString('staff.cat.copy_buckets.retrieve_row.error', [row.my.acp_id]), E);
}
}
);
@@ -166,7 +167,10 @@
function(e) {
return function() {
JSAN.use('util.widgets'); JSAN.use('util.functional');
- var items = [ ['Choose a bucket...',''], ['Retrieve shared bucket...',-1] ].concat(
+ var items = [
+ [$('catStrings').getString('staff.cat.copy_buckets.menulist.render.choose_bucket'),''],
+ [$('catStrings').getString('staff.cat.copy_buckets.menulist.render.retrieve_bucket'),-1]
+ ].concat(
util.functional.map_list(
obj.network.simple_request(
'BUCKET_RETRIEVE_VIA_USER',
@@ -196,7 +200,7 @@
function change_bucket(ev) {
var bucket_id = ev.target.value;
if (bucket_id < 0 ) {
- bucket_id = window.prompt('Enter bucket number:');
+ bucket_id = window.prompt($('catStrings').getString('staff.cat.copy_buckets.menulist.change_bucket.prompt'));
ev.target.value = bucket_id;
ev.target.setAttribute('value',bucket_id);
}
@@ -207,9 +211,9 @@
);
if (typeof bucket.ilsevent != 'undefined') {
if (bucket.ilsevent == 1506 /* CONTAINER_NOT_FOUND */) {
- alert('Could not find a bucket with ID = ' + bucket_id);
+ alert($('catStrings').getFormattedString('staff.cat.copy_buckets.menulist.change_bucket.undefined', [bucket_id]));
} else {
- obj.error.standard_unexpected_error_alert('Error retrieving bucket. Did you use a valid bucket id?',bucket);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.menulist.change_bucket.error'),bucket);
}
return;
}
@@ -273,7 +277,7 @@
obj.list2.append( item );
} catch(E) {
- obj.error.standard_unexpected_error_alert('Addition likely failed.',E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_add.error'), E);
}
}
}
@@ -301,7 +305,7 @@
obj.list2.append( item );
} catch(E) {
- obj.error.standard_unexpected_error_alert('Deletion likely failed.',E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_sel_add.error'), E);
}
}
@@ -335,10 +339,10 @@
[ ses(), 'copy', bucket_item_id ]);
if (typeof robj == 'object') throw robj;
} catch(E) {
- obj.error.standard_unexpected_error_alert('Deletion likely failed.',E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_delete_item.error'), E);
}
- }
- alert("Action completed.");
+ }
+ alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_delete_item.complete'));
setTimeout(
function() {
JSAN.use('util.widgets');
@@ -353,15 +357,15 @@
try {
var bucket = obj.controller.view.bucket_menulist.value;
var name = obj.bucket_id_name_map[ bucket ];
- var conf = window.confirm('Delete the bucket named ' + name + '?');
+ var conf = window.confirm($('catStrings').getFormattedString('staff.cat.copy_buckets.copy_buckets_delete_bucket.confirm', [name]));
if (!conf) return;
obj.list2.clear();
var robj = obj.network.simple_request('BUCKET_DELETE',[ses(),'copy',bucket]);
if (typeof robj == 'object') throw robj;
- alert("Action completed.");
+ alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_delete_bucket.complete'));
obj.controller.render('copy_buckets_menulist_placeholder');
} catch(E) {
- obj.error.standard_unexpected_error_alert('Bucket deletion likely failed.',E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_delete_bucket.error'),E);
}
}
],
@@ -369,7 +373,11 @@
['command'],
function() {
try {
- var name = prompt('What would you like to name the bucket?','','Bucket Creation');
+ var name = prompt(
+ $('catStrings').getString('staff.cat.copy_buckets.copy_buckets_new_bucket.prompt'),
+ '',
+ $('catStrings').getString('staff.cat.copy_buckets.copy_buckets_new_bucket.title')
+ );
if (name) {
var bucket = new ccb();
@@ -381,13 +389,13 @@
if (typeof robj == 'object') {
if (robj.ilsevent == 1710 /* CONTAINER_EXISTS */) {
- alert('You already have a bucket with that name.');
+ alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_new_bucket.container_exists'));
return;
}
throw robj;
}
- alert('Bucket "' + name + '" created.');
+ alert($('catStrings').getFormattedString('staff.cat.copy_buckets.copy_buckets_new_bucket.success', [name]));
obj.controller.render('copy_buckets_menulist_placeholder');
obj.controller.view.bucket_menulist.value = robj;
@@ -399,7 +407,7 @@
);
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Bucket creation failed.',E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_new_bucket.error'),E);
}
}
],
@@ -474,7 +482,8 @@
err += $('catStrings').getString('cat.batch_operation_failed') + '\n';
alert(err);
break;
- default: obj.error.standard_unexpected_error_alert('Batch Item Deletion',robj);
+ default:
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.batch.error'), robj);
}
}
@@ -499,7 +508,7 @@
obj.data.stash_retrieve();
if (!obj.data.marked_volume) {
- alert('Please mark a volume as the destination from within the copy browser and then try this again.');
+ alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_transfer_to_volume.no_volume'));
return;
}
@@ -512,11 +521,14 @@
var volume = obj.network.simple_request('FM_ACN_RETRIEVE.authoritative',[ obj.data.marked_volume ]);
- var msg = 'Transfer the items in bucket "';
- msg += obj.controller.view.bucket_menulist.getAttribute('label') + '" ';
- msg += 'from their original volumes to ';
- msg += obj.data.hash.aou[ volume.owning_lib() ].shortname() + "'s volume labelled ";
- msg += '"' + volume.label() + '" on the following record?';
+ var msg = $('catStrings').getFormattedString(
+ 'staff.cat.copy_buckets.copy_buckets_transfer_to_volume.confirm',
+ [
+ obj.controller.view.bucket_menulist.getAttribute('label'),
+ volume.label(),
+ obj.data.hash.aou[ volume.owning_lib() ].shortname()
+ ]
+ );
JSAN.use('cat.util'); cat.util.transfer_copies( {
'copy_ids' : copy_ids,
@@ -535,13 +547,13 @@
);
} catch(E) {
- obj.error.standard_unexpected_error_alert('Items not likely transferred.',E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.copy_buckets_transfer_to_volume.error'), E);
}
}
],
'cmd_broken' : [
['command'],
- function() { alert('Not Yet Implemented'); }
+ function() { alert($('commonStrings').getString('common.unimplemented')); }
],
'cmd_copy_buckets_print' : [
['command'],
@@ -664,7 +676,7 @@
}
obj.list2.full_retrieve();
} catch(E) {
- obj.error.standard_unexpected_error_alert('Copy Status from Copy Buckets',E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.cmd_export_to_copy_status.error'), E);
}
}
],
@@ -698,7 +710,7 @@
};
return item;
} catch(E) {
- obj.error.standard_unexpected_error_alert('List building failed.',E);
+ obj.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_buckets.prep_item_for_list.error'), E);
return null;
}
Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul 2008-04-08 04:18:33 UTC (rev 9265)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul 2008-04-08 15:06:30 UTC (rev 9266)
@@ -12,7 +12,7 @@
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@@ -20,7 +20,7 @@
<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
<?xul-overlay href="/xul/server/cat/copy_buckets_overlay.xul"?>
-<window id="copy_buckets_win" title="Copy Buckets"
+<window id="copy_buckets_win" title="&staff.cat.copy_buckets.window_title;"
onload="try { my_init(); font_helper(); } catch(E) { alert(E); }" height="600" width="800" persist="height,width"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
@@ -75,6 +75,7 @@
<messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale' -->/cat.properties"/>
<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale' -->/common.properties"/>
<commandset id="copy_buckets_cmds">
<command id="sel_clip1" />
More information about the open-ils-commits
mailing list