From 2dd02f63a136e881809cf47add93af7e34902115 Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 10 Apr 2008 13:12:49 +0000 Subject: [PATCH] i18n for copy_summary git-svn-id: svn://svn.open-ils.org/ILS/trunk@9292 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 17 +++++ .../staff_client/server/cat/copy_summary.xul | 63 ++++++++++--------- .../server/locale/en-US/cat.properties | 6 ++ 3 files changed, 58 insertions(+), 28 deletions(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 4b1219f756..baef3cf9b4 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -1866,3 +1866,20 @@ + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/xul/staff_client/server/cat/copy_summary.xul b/Open-ILS/xul/staff_client/server/cat/copy_summary.xul index 3d65ba5aaf..344e4aaecb 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_summary.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_summary.xul @@ -1,6 +1,9 @@ + @@ -11,7 +14,7 @@ + ]> @@ -39,7 +42,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( $("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(); @@ -53,7 +58,7 @@ var copy = xul_param('copy',{'stash_name':'temp_copy','clear_xpcom':true}); var callnumber = xul_param('callnumber',{'stash_name':'temp_callnumber','clear_xpcom':true}); - $('caption').setAttribute('tooltiptext','Copy ID = ' + (copy_id || copy.id() ) ); + $('caption').setAttribute('tooltiptext', $('catStrings').getFormattedString('staff.cat.copy_summary.copy_id', [(copy_id || copy.id())])); JSAN.use('circ.util'); var columns = circ.util.columns( @@ -68,7 +73,7 @@ } ).concat( { - 'id' : 'total_circs', 'label' : 'Total Circs', 'flex' : 1, + 'id' : 'total_circs', 'label' : $('catStrings').getString('staff.cat.copy_summary.total_circs.label'), 'flex' : 1, 'primary' : false, 'hidden' : false, 'persist' : 'hidden width ordinal', 'render' : 'v = obj.network.simple_request("FM_CIRC_COUNT_RETRIEVE_VIA_COPY",[ my.acp.id() ]).total.count; v;' } @@ -90,11 +95,11 @@ function acn_callback(rreq) { try { $w('barcode',copy.barcode()); - $w('ref',get_bool(copy.ref()) ? 'Yes' : 'No'); - $w('opac_visible',get_bool(copy.opac_visible()) ? 'Yes' : 'No'); - $w('circulate',get_bool(copy.circulate()) ? 'Yes' : 'No'); - $w('holdable',get_bool(copy.holdable()) ? 'Yes' : 'No'); - $w('age_protect',copy.age_protect() == null ? '' : ( typeof copy.age_protect() == 'object' ? copy.age_protect().name() : g.data.hash.crahp[ copy.age_protect() ].name() ) ); + $w('ref',get_bool(copy.ref()) ? $('catStrings').getString('staff.cat.copy_summary.yes') : $('catStrings').getString('staff.cat.copy_summary.no')); + $w('opac_visible',get_bool(copy.opac_visible()) ? $('catStrings').getString('staff.cat.copy_summary.yes') : $('catStrings').getString('staff.cat.copy_summary.no')); + $w('circulate',get_bool(copy.circulate()) ? $('catStrings').getString('staff.cat.copy_summary.yes') : $('catStrings').getString('staff.cat.copy_summary.no')); + $w('holdable',get_bool(copy.holdable()) ? $('catStrings').getString('staff.cat.copy_summary.yes') : $('catStrings').getString('staff.cat.copy_summary.no')); + $w('age_protect',copy.age_protect() == null ? $('staff.cat.copy_summary.unset') : ( typeof copy.age_protect() == 'object' ? copy.age_protect().name() : g.data.hash.crahp[ copy.age_protect() ].name() ) ); $w('location',typeof copy.location() == 'object' ? copy.location().name() : g.data.lookup('acpl',copy.location()).name() ); $w('create_date',util.date.formatted_date(copy.create_date(),'%F')); $w('edit_date',util.date.formatted_date(copy.edit_date(),'%F')); @@ -107,7 +112,7 @@ if (typeof cn.ilsevent != 'undefined') { switch(Number(cn.ilsevent)) { case 1508 /* ASSET_CALL_NUMBER_NOT_FOUND */ : - $w('callnumber','Not Cataloged'); + $w('callnumber', $('catStrings').getString('staff.cat.copy_summary.not_cataloged')); break; default: throw(cn); @@ -176,10 +181,12 @@ ]]> - + + + - + @@ -195,43 +202,43 @@ - - - -