Show
Ignore:
Timestamp:
04/14/08 20:23:18 (5 months ago)
Author:
dbs
Message:

i18n for the MARC editor
Note that marcedit.js doesn't like messagecatalog calls for some reason

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Open-ILS/xul/staff_client/server/cat/marc_new.xul

    r7298 r9356  
    22<!-- Application: Evergreen Staff Client --> 
    33<!-- Screen: Example Template for remote xul --> 
     4<!-- 
     5        vim:noet:sw=4:ts=4: 
     6--> 
    47 
    58<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// --> 
     
    1215<!-- LOCALIZATION --> 
    1316<!DOCTYPE window PUBLIC "" ""[ 
    14         <!--#include virtual="/opac/locale/en-US/lang.dtd"--> 
     17        <!--#include virtual="/opac/locale/${locale}/lang.dtd"--> 
    1518]> 
    1619 
     
    3942                        try { 
    4043                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
    41                 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); } 
     44                                if (typeof JSAN == 'undefined') {  
     45                                        throw( document.getElementById('commonStrings').getString('common.jsan.missing') ); 
     46                                } 
    4247                                JSAN.errorLevel = "die"; // none, warn, or die 
    4348                                JSAN.addRepository('/xul/server/'); 
     
    8388                                                                'record' : { 'marc' : marc }, 
    8489                                                                'save' : { 
    85                                                                         'label' : 'Create Record', 
     90                                                                        'label' : $('catStrings').getString('staff.cat.marc_new.create_record.label'), 
    8691                                                                        'func' : function(new_marcxml) { 
    8792                                                                                try { 
    8893                                                                                        var robj = g.network.simple_request( 
    8994                                                                                                'MARC_XML_RECORD_IMPORT', 
    90                                                                                                 [ ses(), new_marcxml, 'System Local', 1 ] 
     95                                                                                                [ ses(), new_marcxml, $('catStrings').getString('staff.cat.marc_new.system_local.label'), 1 ] 
    9196                                                                                        ); 
    9297                                                                                        if (typeof robj.ilsevent != 'undefined') throw(robj); 
    93                                                                                         alert('Record created.'); 
     98                                                                                        alert($('catStrings').getString('staff.cat.marc_new.record_created.label')); 
    9499 
    95100                                                                                        /* Replace tab with OPAC-view of record */ 
     
    103108                                                                                        xulG.set_tab( 
    104109                                                                                                xulG.url_prefix(urls.XUL_OPAC_WRAPPER), 
    105                                                                                                 {'tab_name':'Retrieving title...'}, 
     110                                                                                                {'tab_name': $('catStrings').getString('staff.cat.marc_new.retrieving.label')}, 
    106111                                                                                                content_params 
    107112                                                                                        ); 
     
    109114                                                                                } catch(E) { 
    110115                                                                                        g.error.standard_unexpected_error_alert( 
    111                                                                                                 'Error creating MARC record.', E 
     116                                                                                                $('catStrings').getString('staff.cat.marc_new.creating_record.error'), E 
    112117                                                                                        ); 
    113118                                                                                } 
     
    126131                                                } catch(E) { 
    127132                                                        g.error.standard_unexpected_error_alert( 
    128                                                                 'Error loading MARC template: ' + template_name, 
    129                                                                 E 
     133                                                                $('catStrings').getFormattedString('staff.cat.marc_new.loading_template.error', [template_name]), E 
    130134                                                        ); 
    131135                                                } 
     
    143147        </script> 
    144148 
     149        <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" /> 
     150        <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" /> 
     151        <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" /> 
     152 
    145153        <vbox flex="1"> 
    146154                <hbox id="actions"> 
    147155                        <hbox id="menu_placeholder" /> 
    148                         <button id="load" label="Load" accesskey="L"/> 
     156                        <button id="load" label="&staff.cat.marc_new.load.label;" accesskey="&staff.cat.marc_new.load.accesskey;"/> 
    149157                </hbox> 
    150158                <iframe id="marc_editor" flex="1"/>