From: dbs Date: Tue, 14 Oct 2008 03:38:48 +0000 (+0000) Subject: Complete i18n support for the aout admin interface X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cf1df11e846f253d18d30b24fe3e0bef74974041;p=Evergreen.git Complete i18n support for the aout admin interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@10829 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/conify/global/actor/org_unit_type.html b/Open-ILS/web/conify/global/actor/org_unit_type.html index 01b793a7a5..f3c1f4901c 100644 --- a/Open-ILS/web/conify/global/actor/org_unit_type.html +++ b/Open-ILS/web/conify/global/actor/org_unit_type.html @@ -76,7 +76,7 @@ method : 'open-ils.permacrud.search.aout.atomic', timeout : 10, params : [ ses, { id : { "!=" : null } }, { order_by : { aout : 'name' } } ], - onerror : function (r) { status_update('Problem fetching types') }, + onerror : function (r) { status_update( aout_strings.ERROR_FETCHING_TYPES ) }, oncomplete : function (r) { ou_type_store = new dojo.data.ItemFileWriteStore({ data : aout.toStoreData( r.recv().content() ) }); ou_type_store.onSet = function (item, attr, o, n) { @@ -95,8 +95,7 @@ if (dirtyStore.length > 0) { var confirmation = confirm( - 'There are unsaved modified Organization Types! '+ - 'OK to save these changes, Cancel to abandon them.' + aout_strings.CONFIRM_UNSAVED_CHANGES ); if (confirmation) { @@ -129,7 +128,7 @@ current_fm_type = new aout().fromStoreItem(item); highlighter.editor_pane.green.play(); - status_update( 'Now editing ' + this.store.getValue( item, 'name' ) ); + status_update( dojo.string.substitute( aout_strings.STATUS_EDITING, [this.store.getValue( item, 'name' )] ) ); new_kid_button.disabled = false; save_out_button.disabled = false; @@ -288,7 +287,7 @@ if (ou_type_store.getValue( current_type, '_trueRoot' ) == 'true') { highlighter.editor_pane.red.play(); - status_update( 'Cannot delete' + ou_type_store.getValue( current_type, 'name' ) + ', you need at least one.' ); + status_update( dojo.string.substitute( aout_strings.ERROR_DELETING_LAST, [ou_type_store.getValue( current_type, 'name' )] ) ); return false; } @@ -302,12 +301,12 @@ ); if ( existing_kids.length > 0) { highlighter.editor_pane.red.play(); - status_update( 'Cannot delete' + ou_type_store.getValue( current_type, 'name' ) + ', ' + existing_kids.length + ' subordinates still exist.' ); + status_update( dojo.string.substitute( aout_strings.ERROR_ORPHANS, [ou_type_store.getValue( current_type, 'name' ), existing_kids.length] ) ); return; } } - if ( confirm('Are you sure you want to delete ' + current_type.name + '?')) { + if ( confirm( dojo.string.substitute ( aout_strings.CONFIRM_DELETE, [current_type.name] ))) { ou_type_store.setValue( current_type, 'isdeleted', 1 ); var modified_aout = new aout().fromStoreItem( current_type ); @@ -319,7 +318,7 @@ params : [ ses, modified_aout ], onerror : function (r) { highlighter.editor_pane.red.play(); - status_update( 'Problem deleting ' + ou_type_store.getValue( current_type, 'name' ) ); + status_update( dojo.string.substitute ( aout_strings.ERROR_DELETING, [ou_type_store.getValue( current_type, 'name' )] ) ); }, oncomplete : function (r) { var res = r.recv(); @@ -351,10 +350,10 @@ window["editor_pane_can_have_users"].setChecked( false ); // unset the value highlighter.editor_pane.green.play(); - status_update( old_name + ' deleted' ); + status_update( dojo.string.substitute( aout_strings.STATUS_DELETED, [old_name] ) ); } else { highlighter.editor_pane.red.play(); - status_update( 'Problem deleting ' + old_name ); + status_update( dojo.string.substitute( aout_strings.ERROR_DELETING, [old_name] ) ); } } }).send(); @@ -373,7 +372,7 @@ diff --git a/Open-ILS/web/js/dojo/openils/conify/nls/aout.js b/Open-ILS/web/js/dojo/openils/conify/nls/aout.js index cd7e663529..e2a7016142 100644 --- a/Open-ILS/web/js/dojo/openils/conify/nls/aout.js +++ b/Open-ILS/web/js/dojo/openils/conify/nls/aout.js @@ -1,4 +1,17 @@ { + + CONFIRM_UNSAVED_CHANGES: "There are unsaved changes to your organization types. Click OK to save these changes, or Cancel to abandon them.", + CONFIRM_DELETE: "Are you sure you want to delete ${0}?", + ERROR_CREATING_CHILD: "Problem creating child Organization Type", + ERROR_CREATING_CHILD_METHOD: "Problem calling method to create child Organization Type", + ERROR_DELETING: "Problem deleting ${0}", + ERROR_DELETING_LAST: "Cannot delete ${0}. You need at least one organization type.", + ERROR_ORPHANS: "Cannot delete ${0}; ${1} subordinates still exist.", ERROR_SAVING_DATA: "Problem saving data for ${0}", + ERROR_FETCHING_TYPES: "Problem fetching organization types", + LABEL_NEW_TYPE: "New Type", + STATUS_DELETED: "${0} deleted", + STATUS_EDITING: "Now editing ${0}", + SUCCESS_CREATING_CHILD: "New child Organization Type created for ${0}", SUCCESS_SAVING_DATA: "Saved changes to ${0}" }