[open-ils-commits] r9653 - in branches/acq-experiment: .
Open-ILS/examples Open-ILS/src/extras
Open-ILS/xul/staff_client/server/cat
Open-ILS/xul/staff_client/server/locale/en-US
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed May 21 10:44:05 EDT 2008
Author: erickson
Date: 2008-05-21 10:44:04 -0400 (Wed, 21 May 2008)
New Revision: 9653
Added:
branches/acq-experiment/Open-ILS/examples/extract-IDL-permissions.xsl
branches/acq-experiment/Open-ILS/src/extras/reconcile-perms.sh
Modified:
branches/acq-experiment/
branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/opac.xul
branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.js
branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.xul
branches/acq-experiment/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
branches/acq-experiment/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
Log:
Merged revisions 9641-9642,9649-9650,9652 via svnmerge from
svn://svn.open-ils.org/ILS/trunk
........
r9641 | miker | 2008-05-19 14:01:23 -0400 (Mon, 19 May 2008) | 1 line
simple xslt (with embeded usage info) for extracting perms from the IDL permacrud definitions
........
r9642 | miker | 2008-05-19 14:17:07 -0400 (Mon, 19 May 2008) | 1 line
script to find new perms from permacrud that are not in the permission seed data yet
........
r9649 | dbs | 2008-05-20 23:42:34 -0400 (Tue, 20 May 2008) | 8 lines
Patch from Craig Ricciuto:
opac.xul changes:
* Finished converting JavaScript strings
cat.properties changes:
* Added the strings from opac.xul
........
r9650 | dbs | 2008-05-21 00:23:02 -0400 (Wed, 21 May 2008) | 16 lines
i18n patch from Craig Ricciuto:
Changes for record_buckets.xul:
- converted hard-coded strings in the JavaScript to be stored in the DTD.
- No XML strings to change.
Changes for record_buckets.js:
- Removed trailing commas in places
- Converted all hard-coded strings to use JavaScript from the .properties file(s)
Changes for cat.properties:
- Added the property string names/values from record_buckets.js/.xul
Changes for common.properties:
- Added a common string that appear multiple times in record_buckets.js to here.
........
r9652 | dbs | 2008-05-21 10:30:54 -0400 (Wed, 21 May 2008) | 7 lines
i18n patch from Craig Ricciuto (Laurentian University):
opac.xul: Converted a string that was missed
record_buckets.js: Converted a string that was missed
cat.properties: Added the variables and values for the missed strings from above files
........
Property changes on: branches/acq-experiment
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-9634
+ /trunk:1-9652
Copied: branches/acq-experiment/Open-ILS/examples/extract-IDL-permissions.xsl (from rev 9652, trunk/Open-ILS/examples/extract-IDL-permissions.xsl)
===================================================================
--- branches/acq-experiment/Open-ILS/examples/extract-IDL-permissions.xsl (rev 0)
+++ branches/acq-experiment/Open-ILS/examples/extract-IDL-permissions.xsl 2008-05-21 14:44:04 UTC (rev 9653)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
+
+<!--
+ USAGE:
+ xsltproc extract-IDL-permissions.xsl fm_IDL.xml|perl -e 'while(<>){s/^\s+(.*)\s+$/$1/o;print("$1\n")unless(/^\s*$/ || /\s+/)}'|sort -u|less
+-->
+
+ <xsl:template match="//permacrud:actions/*">
+ <xsl:if test="@permission">
+ <xsl:call-template name="output-tokens">
+ <xsl:with-param name="list"><xsl:value-of select="@permission"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="output-tokens">
+ <xsl:param name="list" />
+ <xsl:variable name="newlist" select="normalize-space($list)" />
+ <xsl:variable name="first" select="substring-before($newlist, '|')" />
+ <xsl:variable name="remaining" select="substring-after($list, '|')" />
+ <xsl:choose test="$first">
+ <xsl:when test="$first">
+ <xsl:value-of select="$first" /><xsl:text>
+</xsl:text>
+ <xsl:if test="$remaining">
+ <xsl:call-template name="output-tokens">
+ <xsl:with-param name="list" select="$remaining" />
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$list" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
Copied: branches/acq-experiment/Open-ILS/src/extras/reconcile-perms.sh (from rev 9652, trunk/Open-ILS/src/extras/reconcile-perms.sh)
===================================================================
--- branches/acq-experiment/Open-ILS/src/extras/reconcile-perms.sh (rev 0)
+++ branches/acq-experiment/Open-ILS/src/extras/reconcile-perms.sh 2008-05-21 14:44:04 UTC (rev 9653)
@@ -0,0 +1,17 @@
+#!/bin/bash
+pushd . >/dev/null 2>/dev/null
+cd `dirname $0`
+
+xsltproc ../../examples/extract-IDL-permissions.xsl ../../examples/fm_IDL.xml|perl -e 'while(<>){s/^\s+(.*)\s+$/$1/o;print("$1\n")unless(/^\s*$/ || /\s+/)}'|sort -u > /tmp/oils_permacrud_perm_list
+grep -A1 perm_list ../sql/Pg/950.data.seed-values.sql|grep "'"|cut -f2 -d"'"|sort -u > /tmp/oils_sql_perm_list
+
+echo "New permissions from permacrud:"
+echo
+
+diff -pu /tmp/oils_sql_perm_list /tmp/oils_permacrud_perm_list |grep '^+'|cut -f2 -d'+'|grep -v '^$'
+
+echo
+
+popd >/dev/null 2>/dev/null
+
+
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/opac.xul
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/opac.xul 2008-05-21 14:30:54 UTC (rev 9652)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/opac.xul 2008-05-21 14:44:04 UTC (rev 9653)
@@ -32,6 +32,8 @@
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script>
<![CDATA[
+ function $(id) { return document.getElementById(id); }
+ function $w(id,text) { if ($(id)) util.widgets.set_text($(id),text); }
var docid; var marc_html; var top_pane; var bottom_pane; var opac_frame;
var browser_frame; var browser_obj; var browser_win;
@@ -44,7 +46,7 @@
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( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
@@ -66,8 +68,7 @@
set_opac();
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\ncat/opac.xul\n" + E + '\n';
+ var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/opac.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
@@ -84,7 +85,7 @@
'docid' : docid,
'set_tab_name' : function(n) {
if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
- try { window.xulG.set_tab_name('Bib Record: ' + n); } catch(E) { alert(E); }
+ try { window.xulG.set_tab_name($("catStrings").getFormattedString('staff.cat.opac.set_tab_name', [n])); } catch(E) { alert(E); }
} else {
dump('no set_tab_name\n');
}
@@ -126,10 +127,10 @@
if (typeof r.ilsevent != 'undefined') {
throw(r);
} else {
- alert('Record successfully saved.');
+ alert( $("catStrings").getString('staff.cat.opac.set_marc_edit.alert') );
}
} catch(E) {
- g.error.standard_unexpected_error_alert('Record not likely updated.',E);
+ g.error.standard_unexpected_error_alert( $("catStrings").getString('staff.cat.opac.set_marc_edit.std_unexpected_error'), E );
}
}
},
@@ -320,10 +321,14 @@
}
function refresh() {
- alert('Not yet implemented. Work around: Choose Duplicate in New Tab option');
+ alert( $("catStrings").getString('staff.cat.opac.refresh.function_not_implemented.alert') );
}
]]>
</script>
+
+ <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><command id="cmd_forward"/><command id="cmd_back"/></commandset>
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.js
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.js 2008-05-21 14:30:54 UTC (rev 9652)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.js 2008-05-21 14:44:04 UTC (rev 9653)
@@ -1,5 +1,7 @@
dump('entering cat.record_buckets.js\n');
+function $(id) { return document.getElementById(id); }
+
if (typeof cat == 'undefined') cat = {};
cat.record_buckets = function (params) {
@@ -18,7 +20,7 @@
var nsIFilePicker = Components.interfaces.nsIFilePicker;
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance( nsIFilePicker );
- fp.init( window, "Save File As", nsIFilePicker.modeSave );
+ fp.init( window, $("catStrings").getString('staff.cat.record_buckets.save_file_as'), nsIFilePicker.modeSave );
if (defaultFileName)
fp.defaultString = defaultFileName;
@@ -60,11 +62,11 @@
if (file) {
persist.saveURI(uri,null,null,null,null,file);
} else {
- alert("File not downloaded.");
+ alert( $("catStrings").getString('staff.cat.record_buckets.export_records.alert') );
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Records could not be exported.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets.export_records.std_unexpected_error'), E);
}
};
@@ -79,7 +81,7 @@
if (this.first_pause) {
this.first_pause = false;
} else {
- alert("Action completed.");
+ alert( $("commonStrings").getString('common.action_complete'));
}
var obj = this;
obj.list1.clear();
@@ -104,7 +106,7 @@
'publisher' : { 'hidden' : false },
'pubdate' : { 'hidden' : false },
'isbn' : { 'hidden' : false },
- 'tcn' : { 'hidden' : false },
+ 'tcn' : { 'hidden' : false }
}
);
@@ -122,7 +124,8 @@
if (typeof params.on_retrieve == 'function') { params.on_retrieve(row); }
} catch(E) {
- obj.error.standard_unexpected_error_alert('Error retrieving mvr for record with id =' + row.my.docid, E);
+ obj.error.standard_unexpected_error_alert(
+ $("catStrings").getFormattedString('staff.cat.record_buckets.retrieve_row.std_unexpected_error', [row.my.docid]), E);
}
}
);
@@ -156,7 +159,7 @@
} catch(E) {
alert('FIXME: ' + E);
}
- },
+ }
}
);
@@ -185,7 +188,7 @@
} catch(E) {
alert('FIXME: ' + E);
}
- },
+ }
}
);
@@ -218,7 +221,7 @@
} catch(E) {
alert('FIXME: ' + E);
}
- },
+ }
}
);
@@ -273,10 +276,13 @@
[ ses(), obj.data.list.au[0].id() ]
);
if (typeof buckets.ilsevent != 'undefined') {
- obj.error.standard_unexpected_error_alert('Could not retrieve your buckets.',buckets);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets.buckets.std_unexpected_error'), buckets);
return;
}
- var items = [ ['Choose a bucket...',''], ['Retrieve shared bucket...',-1] ].concat(
+ var items = [
+ [$("catStrings").getString('staff.cat.record_buckets.menulist_placeholder.item1'),''],
+ [$("catStrings").getString('staff.cat.record_buckets.menulist_placeholder.item2'),-1]
+ ].concat(
util.functional.map_list(
util.functional.filter_list(
buckets.biblio,
@@ -308,7 +314,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.record_buckets.change_bucket.bucket_id'));
ev.target.value = bucket_id;
ev.target.setAttribute('value',bucket_id);
}
@@ -332,7 +338,7 @@
if (bucket.ilsevent == 1506 /* CONTAINER_NOT_FOUND */) {
alert('Could not find a bucket with ID = ' + 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.record_buckets.change_bucket.error'),bucket);
}
return;
}
@@ -505,7 +511,7 @@
alert(js2JSON(E));
}
}
- alert("Action completed.");
+ alert( $("commonStrings").getString('common.action_complete'));
setTimeout(
function() {
JSAN.use('util.widgets');
@@ -520,12 +526,12 @@
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.record_buckets.delete_bucket_named', [name]));
if (!conf) return;
obj.list2.clear();
var robj = obj.network.simple_request('BUCKET_DELETE',[ses(),'biblio',bucket]);
if (typeof robj == 'object') throw robj;
- alert("Action completed.");
+ alert( $("commonStrings").getString('common.action_complete'));
var x = document.getElementById('info_box');
x.setAttribute('hidden','true');
obj.controller.view.cmd_record_buckets_delete_bucket.setAttribute('disabled','true');
@@ -544,7 +550,7 @@
);
} catch(E) {
- alert('FIXME -- ' + E);
+ alert('FIXME: ' + E);
}
}
],
@@ -552,7 +558,11 @@
['command'],
function() {
try {
- var name = prompt('What would you like to name the bucket?','','Bucket Creation');
+ var name = prompt(
+ $("catStrings").getString('staff.cat.record_buckets.new_bucket.bucket_prompt'),
+ '',
+ $("catStrings").getString('staff.cat.record_buckets.new_bucket.bucket_prompt_title')
+ );
if (name) {
var bucket = new cbreb();
@@ -564,15 +574,14 @@
if (typeof robj == 'object') {
if (robj.ilsevent == 1710 /* CONTAINER_EXISTS */) {
- alert('You already have a bucket with that name.');
+ alert($("catStrings").getString('staff.cat.record_buckets.new_bucket.same_name_alert'));
return;
}
throw robj;
}
+ alert($("catStrings").getFormattedString('staff.cat.record_buckets.new_bucket.bucket_created', [name]));
- alert('Bucket "' + name + '" created.');
-
obj.controller.render('record_buckets_menulist_placeholder');
obj.controller.view.bucket_menulist.value = robj;
setTimeout(
@@ -635,16 +644,21 @@
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var top_xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" >';
- top_xml += '<description>Merge these records? (Select the "lead" record first)</description>';
- top_xml += '<hbox><button id="lead" disabled="true" label="Merge" name="fancy_submit"/><button label="Cancel" accesskey="C" name="fancy_cancel"/></hbox></vbox>';
+ top_xml += '<description>' + $("catStrings").getString('staff.cat.record_buckets.merge_records.merge_lead') + '</description>';
+ top_xml += '<hbox>';
+ top_xml += '<button id="lead" disabled="true" label="'
+ + $("catStrings").getString('staff.cat.record_buckets.merge_records.button.label') + '" name="fancy_submit"/>';
+ top_xml += '<button label="' + $("catStrings").getString('staff.cat.record_buckets.merge_records.cancel_button.label') +'" accesskey="'
+ + $("catStrings").getString('staff.cat.record_buckets.merge_records.cancel_button.accesskey') +'" name="fancy_cancel"/></hbox></vbox>';
var xml = '<form xmlns="http://www.w3.org/1999/xhtml">';
xml += '<table><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
- xml += '<td><input value="Lead" id="record_' + record_ids[i] + '" type="radio" name="lead"';
- xml += ' onclick="' + "try { var x = document.getElementById('lead'); x.setAttribute('value',";
+ xml += '<td><input value="' + $("catStrings").getString('staff.cat.record_buckets.merge_records.lead')
+ + ' id="record_' + record_ids[i] + '" type="radio" name="lead"';
+ xml += ' onclick="' + "try { var x = $('lead'); x.setAttribute('value',";
xml += record_ids[i] + '); x.disabled = false; } catch(E) { alert(E); }">';
- xml += '</input>Lead Record? #' + record_ids[i] + '</td>';
+ xml += '</input>' + $("catStrings").getFormattedString('staff.cat.record_buckets.merge_records.lead_record_number',[record_ids[i]]) + '</td>';
}
xml += '</tr><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
@@ -667,12 +681,15 @@
//+ '&title=' + window.escape('Record Merging'),
'fancy_prompt', 'chrome,resizable,modal,width=700,height=500',
{
- 'top_xml' : top_xml, 'xml' : xml, 'title' : 'Record Merging'
+ 'top_xml' : top_xml, 'xml' : xml, 'title' : $("catStrings").getString('staff.cat.record_buckets.merge_records.fancy_prompt_title')
}
);
//obj.data.stash_retrieve();
- if (typeof fancy_prompt_data.fancy_status == 'undefined' || fancy_prompt_data.fancy_status == 'incomplete') { alert('Merge Aborted'); return; }
+ if (typeof fancy_prompt_data.fancy_status == 'undefined' || fancy_prompt_data.fancy_status == 'incomplete') {
+ alert($("catStrings").getString('staff.cat.record_buckets.merge_records.fancy_prompt.alert'));
+ return;
+ }
var robj = obj.network.simple_request('MERGE_RECORDS',
[
ses(),
@@ -687,7 +704,7 @@
if (typeof robj.ilsevent != 'undefined') {
throw(robj);
} else {
- alert('Records were successfully merged.');
+ alert($("catStrings").getString('staff.cat.record_buckets.merge_records.success'));
}
obj.render_pending_records(); // FIXME -- need a generic refresh for lists
@@ -698,7 +715,7 @@
}, 0
);
} catch(E) {
- obj.error.standard_unexpected_error_alert('Records were not likely merged.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets.merge_records.catch.std_unex_error'),E);
}
}
@@ -721,13 +738,19 @@
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var top_xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" >';
- top_xml += '<description>Delete these records?</description>';
- top_xml += '<hbox><button id="lead" disabled="false" label="Delete" name="fancy_submit"/><button label="Cancel" accesskey="C" name="fancy_cancel"/></hbox></vbox>';
+ top_xml += '<description>' + $("catStrings").getString('staff.cat.record_buckets.delete_records.xml1') + '</description>';
+ top_xml += '<hbox>';
+ top_xml += '<button id="lead" disabled="false" label="'
+ + $("catStrings").getString('staff.cat.record_buckets.delete_records.button.label')
+ + '" name="fancy_submit"/>';
+ top_xml += '<button label="'
+ + $("catStrings").getString('staff.cat.record_buckets.delete_records.cancel_button.label') +'" accesskey="'
+ + $("catStrings").getString('staff.cat.record_buckets.delete_records.cancel_button.accesskey') +'" name="fancy_cancel"/></hbox></vbox>';
var xml = '<form xmlns="http://www.w3.org/1999/xhtml">';
xml += '<table><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
- xml += '<td>Record #' + record_ids[i] + '</td>';
+ xml += '<td>' + $("catStrings").getFormattedString('staff.cat.record_buckets.delete_records.xml2', [record_ids[i]]) + '</td>';
}
xml += '</tr><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
@@ -750,20 +773,23 @@
//+ '&title=' + window.escape('Record Purging'),
'fancy_prompt', 'chrome,resizable,modal,width=700,height=500',
{
- 'top_xml' : top_xml, 'xml' : xml, 'title' : 'Record Purging'
+ 'top_xml' : top_xml, 'xml' : xml, 'title' : $("catStrings").getString('staff.cat.record_buckets.delete_records.fancy_prompt_title')
}
);
//obj.data.stash_retrieve();
- if (typeof fancy_prompt_data.fancy_status == 'undefined' || fancy_prompt_data.fancy_status != 'complete') { alert('Delete Aborted'); return; }
+ if (typeof fancy_prompt_data.fancy_status == 'undefined' || fancy_prompt_data.fancy_status != 'complete') {
+ alert($("catStrings").getString('staff.cat.record_buckets.delete_records.fancy_prompt.alert'));
+ return;
+ }
var s = '';
for (var i = 0; i < record_ids.length; i++) {
var robj = obj.network.simple_request('FM_BRE_DELETE',[ses(),record_ids[i]]);
if (typeof robj.ilsevent != 'undefined') {
- if (!s) s = 'Error deleting these records:\n';
- s += 'Record #' + record_ids[i] + ' : ' + robj.textcode + ' : ' + robj.desc + '\n';
+ if (!s) s = $("catStrings").getString('staff.cat.record_buckets.delete_records.s1');
+ s += $("catStrings").getFormattedString('staff.cat.record_buckets.delete_records.s2', [record_ids[i], robj.textcode, robj.desc]);
}
}
- if (s) { alert(s); } else { alert('Records deleted.'); }
+ if (s) { alert(s); } else { alert($("catStrings").getString('staff.cat.record_buckets.delete_records.delete_success.alert')); }
obj.render_pending_records(); // FIXME -- need a generic refresh for lists
setTimeout(
@@ -773,7 +799,7 @@
}, 0
);
} catch(E) {
- obj.error.standard_unexpected_error_alert('Records were not likely deleted.',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets.delete_records.catch.std_unex_err',E));
}
}
@@ -781,7 +807,7 @@
'cmd_broken' : [
['command'],
- function() { alert('Not Yet Implemented'); }
+ function() { alert($("catStrings").getString('staff.cat.record_buckets.cmd_broken.alert')); }
],
'cmd_sel_opac' : [
['command'],
@@ -803,16 +829,16 @@
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
- 'opac_url' : opac_url,
+ 'opac_url' : opac_url
};
xulG.new_tab(
xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
- {'tab_name':'Retrieving title...'},
+ {'tab_name':$("catStrings").getString('staff.cat.record_buckets.cmd_sel_opac.tab_name')},
content_params
);
}
} catch(E) {
- obj.error.standard_unexpected_error_alert('Showing in OPAC',E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets.cmd_sel_opac.catch.std_unex_err'),E);
}
}
],
@@ -840,7 +866,7 @@
obj.list0.clear();
var y = document.getElementById('query_status');
x.disabled = true;
- if (y) y.value = 'Searching...';
+ if (y) y.value = $("catStrings").getString('staff.cat.record_buckets.submit.query_status');
obj.network.simple_request(
'FM_BRE_ID_SEARCH_VIA_MULTICLASS_QUERY',
[ {}, x.value, 1 ],
@@ -895,10 +921,10 @@
};
return item;
} catch(E) {
- obj.error.standard_unexpected_error_alert('Could not retrieve this record: ' + docid,E);
+ obj.error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.record_buckets.prep_record_for_list.std_unex_err', [docid]),E);
return null;
}
- },
+ }
};
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.xul
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.xul 2008-05-21 14:30:54 UTC (rev 9652)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.xul 2008-05-21 14:44:04 UTC (rev 9653)
@@ -12,7 +12,7 @@
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- LOCALIZATION -->
<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
]>
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
@@ -41,9 +41,9 @@
/* 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');
- catStrings = document.getElementById('catStrings');
+ catStrings = document.getElementById('catStrings');
+ if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.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();
@@ -72,9 +72,7 @@
}
} catch(E) {
- var err_msg = "!! This software has encountered an error. Please tell your friendly " +
- "system administrator or software developer the following:\n"
- + 'cat.record_buckets.xul\n' + E + '\n';
+ var err_msg = document.getElementById("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);
}
@@ -85,6 +83,7 @@
<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="record_buckets_cmds">
<command id="sel_clip0" disabled="true"/>
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties 2008-05-21 14:30:54 UTC (rev 9652)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties 2008-05-21 14:44:04 UTC (rev 9653)
@@ -193,3 +193,48 @@
staff.cat.marc_new.retrieving.label=Retrieving title...
staff.cat.marc_new.creating_record.error=Error creating MARC record.
staff.cat.marc_new.loading_template.error=Error loading MARC template: %1$s
+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=Bib Record: %1$s
+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.
+staff.cat.record_buckets.rednder_pending_records.alert=Action completed.
+staff.cat.record_buckets.retrieve_row.std_unexpected_error=Error retrieving mvr for record with ID = %1$s
+staff.cat.record_buckets.buckets.std_unexpected_error=Could not retrieve your buckets.
+staff.cat.record_buckets.menulist_placeholder.item1=Choose a bucket...
+staff.cat.record_buckets.menulist_placeholder.item2=Retrieve shared bucket...
+staff.cat.record_buckets.change_bucket.bucket_id=Enter bucket number:
+staff.cat.record_buckets.change_bucket.error=Error retrieving bucket. Did you use a valid bucket ID?
+staff.cat.record_buckets.delete_bucket_named=Delete the bucket named %1$s?
+staff.cat.record_buckets.new_bucket.bucket_prompt=What would you like to name the bucket?
+staff.cat.record_buckets.new_bucket.bucket_prompt_title=Bucket Creation
+staff.cat.record_buckets.new_bucket.same_name_alert=You already have a bucket with that name.
+staff.cat.record_buckets.new_bucket.bucket_created=Bucket %1$s created.
+staff.cat.record_buckets.merge_records.merge_lead=Merge these records? (Select the "lead" record first)
+staff.cat.record_buckets.merge_records.button.label=Merge
+staff.cat.record_buckets.merge_records.cancel_button.label=Cancel
+staff.cat.record_buckets.merge_records.cancel_button.accesskey=C
+staff.cat.record_buckets.merge_records.lead_record_number=Lead Record? # %1$s
+staff.cat.record_buckets.merge_records.lead=Lead
+staff.cat.record_buckets.merge_records.fancy_prompt_title=Record Merging
+staff.cat.record_buckets.merge_records.fancy_prompt.alert=Merge Aborted
+staff.cat.record_buckets.merge_records.success=Records were successfully merged.
+staff.cat.record_buckets.merge_records.catch.std_unex_error=Records were not likely merged.
+staff.cat.record_buckets.delete_records.xml1=Delete these records?
+staff.cat.record_buckets.delete_records.button.label=Delete
+staff.cat.record_buckets.delete_records.cancel_button.label=Cancel
+staff.cat.record_buckets.delete_records.cancel_button.accesskey=C
+staff.cat.record_buckets.delete_records.xml2=Record? # %1$s
+staff.cat.record_buckets.delete_records.fancy_prompt_title=Record Purging
+staff.cat.record_buckets.delete_records.fancy_prompt.alert=Delete Aborted
+staff.cat.record_buckets.delete_records.s1=Error deleting these records:\n
+staff.cat.record_buckets.delete_records.s2=Record #%1$s : %2$s : %3$s\n
+staff.cat.record_buckets.delete_records.delete_success.alert=Records deleted.
+staff.cat.record_buckets.delete_records.catch.std_unex_err=Records were not likely deleted.
+staff.cat.record_buckets.cmd_broken.alert=Not Yet Implemented
+staff.cat.record_buckets.cmd_sel_opac.tab_name=Retrieving title...
+staff.cat.record_buckets.cmd_sel_opac.catch.std_unex_err=Showing in OPAC
+staff.cat.record_buckets.submit.query_status=Searching...
+staff.cat.record_buckets.prep_record_for_list.std_unex_err=Could not retrieve this record: %1$s
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/server/locale/en-US/common.properties 2008-05-21 14:30:54 UTC (rev 9652)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/server/locale/en-US/common.properties 2008-05-21 14:44:04 UTC (rev 9653)
@@ -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.action_complete=Action completed.
# common.grouping_string = the string that should be inserted between elements of a grouped list
common.grouping_string=,
common.unimplemented=Not yet implemented
More information about the open-ils-commits
mailing list