[open-ils-commits] SPAM: r9133 - in
trunk/Open-ILS/xul/staff_client/server: cat locale/en-US
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 24 23:57:51 EDT 2008
Author: dbs
Date: 2008-03-24 23:22:42 -0400 (Mon, 24 Mar 2008)
New Revision: 9133
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/bib_brief.xul
trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js
trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.xul
trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
Log:
Start bringing i18n to the copy browser.
Repair a typo in bib_brief.xul
Modified: trunk/Open-ILS/xul/staff_client/server/cat/bib_brief.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/bib_brief.xul 2008-03-25 01:18:41 UTC (rev 9132)
+++ trunk/Open-ILS/xul/staff_client/server/cat/bib_brief.xul 2008-03-25 03:22:42 UTC (rev 9133)
@@ -63,7 +63,7 @@
JSAN.use('util.network'); g.network = new util.network();
JSAN.use('util.date');
- document.getElementById('caption').setAttribute('tooltiptext',document.getElementById('catStrings').getFormattedString('staff.cat.bib_brief.record_id' + [docid]));
+ document.getElementById('caption').setAttribute('tooltiptext',document.getElementById('catStrings').getFormattedString('staff.cat.bib_brief.record_id', [docid]));
if (docid > -1) {
Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2008-03-25 01:18:41 UTC (rev 9132)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2008-03-25 03:22:42 UTC (rev 9133)
@@ -1,4 +1,5 @@
dump('entering cat.copy_browser.js\n');
+// vim:noet:sw=4:ts=4:
if (typeof cat == 'undefined') cat = {};
cat.copy_browser = function (params) {
@@ -38,7 +39,9 @@
],
'cmd_broken' : [
['command'],
- function() { alert('Not Yet Implemented'); }
+ function() {
+ alert(document.getElementById('commonStrings').getString('common.unimplemented'));
+ }
],
'cmd_show_my_libs' : [
['command'],
@@ -193,7 +196,7 @@
if (edit==0) return; // no read-only view for this interface
- var title = 'Add Item';
+ var title = document.getElementById('catStrings').getString('staff.cat.copy_browser.add_item.title');
JSAN.use('util.window'); var win = new util.window();
var w = win.open(
@@ -207,7 +210,7 @@
w.refresh = function() { obj.refresh_list(); }
w.xulG = { 'doc_id':obj.docid, 'ou_ids' : list, 'copy_shortcut' : copy_shortcut };
} catch(E) {
- obj.error.standard_unexpected_error_alert('copy browser -> add copies',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.add_item.error'),E);
}
}
],
@@ -235,7 +238,7 @@
cat.util.add_copies_to_bucket( list );
} catch(E) {
- obj.error.standard_unexpected_error_alert('copy browser -> add copies to bucket',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.add_items_bucket.error'),E);
}
}
],
@@ -264,13 +267,13 @@
try {
cat.util.replace_barcode(list[i]);
} catch(E) {
- obj.error.standard_unexpected_error_alert('Barcode ' +list[i] + ' not likely replaced.',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getFormattedString('staff.cat.copy_browser.replace_barcode.failed', [list[i]]),E);
}
}
obj.refresh_list();
} catch(E) {
- obj.error.standard_unexpected_error_alert('copy browser -> replace barcode',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.replace_barcode.error'),E);
obj.refresh_list();
}
}
@@ -299,7 +302,7 @@
obj.refresh_list();
} catch(E) {
- obj.error.standard_unexpected_error_alert('Copy Browser -> Edit Items',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_items.error'),E);
}
}
],
@@ -323,7 +326,20 @@
}
);
- var r = obj.error.yns_alert('Are you sure you would like to delete ' + (list.length != 1 ? 'these ' + list.length + ' items' : 'this one item') + '?', 'Delete Items?', 'Delete', 'Cancel', null, 'Check here to confirm this action');
+ var delete_msg;
+ if (list.length != 1) {
+ delete_msg = document.getElementById('catStrings').getFormattedString('staff.cat.copy_browser.delete_items.confirm.plural', [list.length]);
+ } else {
+ delete_msg = document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.confirm');
+ }
+ var r = obj.error.yns_alert(
+ delete_msg,
+ document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.title'),
+ document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.delete'),
+ document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.cancel'),
+ null,
+ document.getElementById('commonStrings').getString('common.confirm')
+ );
if (r == 0) {
var acn_hash = {}; var acn_list = [];
@@ -344,7 +360,7 @@
[ ses(), acn_list, true ],
null,
{
- 'title' : 'Override Delete Failure?',
+ 'title' : document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.override'),
'overridable_events' : [
1208 /* TITLE_LAST_COPY */,
1227 /* COPY_DELETE_WARNING */,
@@ -355,13 +371,13 @@
if (typeof robj.ilsevent != 'undefined') {
if ( (robj.ilsevent != 0) && (robj.ilsevent != 1227 /* COPY_DELETE_WARNING */) && (robj.ilsevent != 1208 /* TITLE_LAST_COPY */) ) throw(robj);
}
- alert('Action complete.');
+ alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.complete'));
obj.refresh_list();
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('copy browser -> delete items',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.error'),E);
obj.refresh_list();
}
}
@@ -390,11 +406,11 @@
obj.data.stash('temp_barcodes_for_labels');
xulG.new_tab(
xulG.url_prefix( urls.XUL_SPINE_LABEL ),
- { 'tab_name' : 'Spine Labels' },
+ { 'tab_name' : document.getElementById('catStrings').getString('staff.cat.copy_browser.print_spine.tab') },
{}
);
} catch(E) {
- obj.error.standard_unexpected_error_alert('copy browser -> Spine Labels',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.print_spine.error'),E);
}
}
],
@@ -432,11 +448,11 @@
}
if (edit==0) {
- alert("You don't have permission to add volumes to that library.");
+ alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.add_volume.permission_error'));
return; // no read-only view for this interface
}
- var title = 'Add Volume/Item';
+ var title = document.getElementById('catStrings').getString('staff.cat.copy_browser.add_volume.title');
JSAN.use('util.window'); var win = new util.window();
var w = win.open(
@@ -450,7 +466,7 @@
w.refresh = function() { obj.refresh_list() };
w.xulG = { 'doc_id' : obj.docid, 'ou_ids' : list };
} catch(E) {
- obj.error.standard_unexpected_error_alert('copy browser -> add volumes',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.add_volume.error'),E);
}
}
],
@@ -494,7 +510,7 @@
}
if (edit==0) {
- alert("You don't have permission to edit this volume.");
+ alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_volume.permission_error'));
return; // no read-only view for this interface
}
@@ -506,7 +522,12 @@
}
);
- var title = list.length == 1 ? 'Volume' : 'Volumes';
+ var title;
+ if (list.length == 1) {
+ title = document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_volume.title');
+ } else {
+ title = document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_volume.title.plural');
+ }
JSAN.use('util.window'); var win = new util.window();
//obj.data.volumes_temp = js2JSON( list );
@@ -549,20 +570,20 @@
if (typeof r.ilsevent != 'undefined') {
switch(Number(r.ilsevent)) {
case 1705 /* VOLUME_LABEL_EXISTS */ :
- alert("Edit failed: You tried to change a volume's callnumber to one that is already in use for the given library. You should transfer the items to the desired callnumber instead.");
+ alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_volume.failed'));
break;
default: throw(r);
}
} else {
- alert('Volumes modified.');
+ alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_volume.success'));
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('volume update error: ',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_volume.error'),E);
}
obj.refresh_list();
} catch(E) {
- obj.error.standard_unexpected_error_alert('Copy Browser -> Volume Edit',E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.edit_volume.exception'),E);
}
}
],
Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.xul 2008-03-25 01:18:41 UTC (rev 9132)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.xul 2008-03-25 03:22:42 UTC (rev 9133)
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<!-- Application: Evergreen Staff Client -->
<!-- Screen: Copy Browser -->
+<!--
+vim:noet:sw=4:ts=4:
+-->
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- STYLESHEETS -->
@@ -25,10 +28,10 @@
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- BEHAVIOR -->
- <script type="text/javascript">
+ <script type="text/javascript">
var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
</script>
- <scripts id="openils_util_scripts"/>
+ <scripts id="openils_util_scripts"/>
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script>
@@ -36,7 +39,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("The JSAN library object is missing.");
+ }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
@@ -61,7 +66,8 @@
]]>
</script>
- <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
+ <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
<commandset id="cat_copy_browser">
<command id="save_columns" />
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties 2008-03-25 01:18:41 UTC (rev 9132)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties 2008-03-25 03:22:42 UTC (rev 9133)
@@ -8,3 +8,29 @@
staff.cat.bib_brief.inactive=(Inactive)
staff.cat.bib_brief.noncat=(Not Cataloged)
staff.cat.bib_brief.noncat.alert=Item not cataloged.
+staff.cat.copy_browser.add_item.title=Add Item
+staff.cat.copy_browser.add_item.error=copy browser -> add copies
+staff.cat.copy_browser.add_items_bucket.error=copy browser -> add copies to bucket
+staff.cat.copy_browser.replace_barcode.failed=Barcode %1$s not likely replaced.
+staff.cat.copy_browser.replace_barcode.error=copy browser -> replace barcode
+staff.cat.copy_browser.edit_items.error=Copy Browser -> Edit Items
+staff.cat.copy_browser.delete_items.confirm.plural=Are you sure you would like to delete these %1$s items?
+staff.cat.copy_browser.delete_items.confirm=Are you sure you would like to delete this item?
+staff.cat.copy_browser.delete_items.title=Delete Items?
+staff.cat.copy_browser.delete_items.delete=Delete
+staff.cat.copy_browser.delete_items.cancel=Cancel
+staff.cat.copy_browser.delete_items.override=Override Delete Failure?
+staff.cat.copy_browser.delete_items.complete=Action complete.
+staff.cat.copy_browser.delete_items.error=copy browser -> delete items
+staff.cat.copy_browser.print_spine.tab=Spine Labels
+staff.cat.copy_browser.print_spine.error=copy browser -> Spine Labels
+staff.cat.copy_browser.add_volume.permission_error=You do not have permission to add volumes to that library.
+staff.cat.copy_browser.add_volume.title=Add Volume/Item
+staff.cat.copy_browser.add_volume.error=copy browser -> add volumes
+staff.cat.copy_browser.edit_volume.permission_error=You don't have permission to edit this volume.
+staff.cat.copy_browser.edit_volume.title=Volume
+staff.cat.copy_browser.edit_volume.title.plural=Volumes
+staff.cat.copy_browser.edit_volume.failed=Edit failed: You tried to change a volume's callnumber to one that is already in use for the given library. You should transfer the items to the desired callnumber instead.
+staff.cat.copy_browser.edit_volume.success=Volumes modified.
+staff.cat.copy_browser.edit_volume.error=volume update error:
+staff.cat.copy_browser.edit_volume.exception=Copy Browser -> Volume Edit
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties 2008-03-25 01:18:41 UTC (rev 9132)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties 2008-03-25 03:22:42 UTC (rev 9133)
@@ -12,6 +12,7 @@
common.barcode.status.warning.blocked=Blocked
common.barcode.status.warning.unknown=with an unknown code: %1$s
common.date.invalid=Invalid Date
+common.unimplemented=Not yet implemented
lang.version=remote v1
openils.global_util.clear_cache.error=Problem clearing the cache: %1$s
openils.global_util.clipboard.error=Clipboard action failed: %1$s
More information about the open-ils-commits
mailing list