Make some staff client tab names translatable. user/paxed/lp1081566fix
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Tue, 8 Jan 2013 14:36:57 +0000 (16:36 +0200)
committerPasi Kallinen <pasi.kallinen@pttk.fi>
Tue, 8 Jan 2013 14:36:57 +0000 (16:36 +0200)
Allows translation of the "Portal", "On Shelf Pull List",
"Register Patron", "Record Buckets", "Reports", and
"MARC Batch Import/Export" tab names.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/index.xhtml

index 70063d8..87a82b4 100644 (file)
 <!ENTITY staff.client.portal.toggle_tpac "Toggle Template Toolkit OPAC Use">
 <!ENTITY staff.client.portal.toggle_tpac.message_on "The use of the Template Toolkit OPAC has been enabled. You may need to restart the staff client for this to take effect.">
 <!ENTITY staff.client.portal.toggle_tpac.message_off "The use of the Template Toolkit OPAC has been disabled. You may need to restart the staff client for this to take effect.">
+<!ENTITY staff.client.portal.tab_name "Portal">
+<!ENTITY staff.client.hold_pull_list.tab_name "On Shelf Pull List">
+<!ENTITY staff.client.register_patron.tab_name "Register Patron">
+<!ENTITY staff.client.record_buckets.tab_name "Record Buckets">
+<!ENTITY staff.client.marc_batch_import.tab_name "Server Settings">
+<!ENTITY staff.client.local_admin_reports.tab_name "Reports">
 <!ENTITY staff.item.batch.hold.groupbox_caption "Request Details">
 <!ENTITY staff.item.batch.hold.hold_type_menu.label "Hold Type">
 <!ENTITY staff.item.batch.hold.hold_type_menu.accesskey "T">
index b0ddccd..17d51db 100644 (file)
@@ -87,7 +87,8 @@
                         data.stash_retrieve(); 
                         document.getElementById('staffname').innerHTML = ", " + data.list.au[0].first_given_name(); 
                         home_ou_id = data.list.au[0].ws_ou();
-                        xulG.set_tab_name('Portal');
+                        var tabname = document.getElementById('staff.client.portal.tab_name');
+                        xulG.set_tab_name(tabname ? tabname.textContent : 'Portal');
                 }
                 function jb_open_eg_web_page(path, label) {
                         var loc = urls.XUL_BROWSER + '?url=' + window.escape(xulG.url_prefix('EG_WEB_BASE') + '/' + path);
                 }
                 function hold_pull_list(newtab) {
                         var loc = urls.XUL_REMOTE_BROWSER + '?url=' + window.escape(urls.XUL_HOLD_PULL_LIST + '?ses=' + window.escape(ses()));
-                        var params = {'tab_name':'On Shelf Pull List'};
+                        var tabname = document.getElementById('staff.client.hold_pull_list.tab_name');
+                        var params = {'tab_name': tabname ? tabname.textContent : 'On Shelf Pull List'};
                         
                         if(newtab)
                                 xulG.new_tab(loc, params);
                                 xulG.set_tab(urls.XUL_COPY_BUCKETS, params, {});
                 }
                 function record_buckets(newtab) {
-                        params = {'tab_name':'Record Buckets'};
+                        var tabname = document.getElementById('staff.client.record_buckets.tab_name');
+                        params = {'tab_name': tabname ? tabname.textContent : 'Record Buckets'};
                         if(newtab)
                                 xulG.new_tab(urls.XUL_RECORD_BUCKETS, params, {});
                         else
                                 xulG.set_tab(urls.XUL_CHECKIN,{},{});
                 }
                 function MARC_batch_import(newtab) {
+                        var tabname = document.getElementById('staff.client.marc_batch_import.tab_name');
+                        var tn = tabname ? tabname.textContent : 'Server Settings';
                         if(newtab)
-                                jb_open_eg_web_page_newtab('vandelay/vandelay', 'Server Settings');
+                                jb_open_eg_web_page_newtab('vandelay/vandelay', tn);
                         else
-                                jb_open_eg_web_page('vandelay/vandelay', 'Server Settings');
+                                jb_open_eg_web_page('vandelay/vandelay', tn);
                 }
                 function local_admin_reports(newtab) {
+                        var tabname = document.getElementById('staff.client.local_admin_reports.tab_name');
                         var loc = urls.XUL_BROWSER + '?url=' + window.escape( xulG.url_prefix('XUL_REPORTS') + '?ses=' + ses());
-                        params = {'tab_name' : 'Reports', 'browser' : false }
+                        params = {'tab_name' : tabname ? tabname.textContent : 'Reports', 'browser' : false }
                         content_params = {'no_xulG' : false, 'show_print_button' : false, show_nav_buttons : true }
                         if(newtab)
                                 xulG.new_tab(loc, params, content_params);
                         }
                         
                         var loc = urls.XUL_REMOTE_BROWSER  + '?url=' + window.escape( urls.XUL_PATRON_EDIT + '?ses=' + window.escape( ses() ) );
+                        var tabname = document.getElementById('staff.client.register_patron.tab_name');
                         var content_params = { 
                                                      'show_print_button' : true , 
-                                                     'tab_name' : 'Register Patron' ,
+                                                     'tab_name' : tabname ? tabname.textContent : 'Register Patron' ,
                                                      'passthru_content_params' : { 'spawn_search' : function(s) { spawn_search(s); },
                                                                                     'spawn_editor' : spawn_editor }
                                                  }
         </div>
         <span style="display:none" id="tpac_toggled_on">&staff.client.portal.toggle_tpac.message_on;</span>
         <span style="display:none" id="tpac_toggled_off">&staff.client.portal.toggle_tpac.message_off;</span>
+        <span style="display:none" id="staff.client.portal.tab_name">&staff.client.portal.tab_name;</span>
+        <span style="display:none" id="staff.client.hold_pull_list.tab_name">&staff.client.hold_pull_list.tab_name;</span>
+        <span style="display:none" id="staff.client.register_patron.tab_name">&staff.client.register_patron.tab_name;</span>
+        <span style="display:none" id="staff.client.record_buckets.tab_name">&staff.client.record_buckets.tab_name;</span>
+        <span style="display:none" id="staff.client.marc_batch_import.tab_name">&staff.client.marc_batch_import.tab_name;</span>
+        <span style="display:none" id="staff.client.local_admin_reports.tab_name">&staff.client.local_admin_reports.tab_name;</span>
       </td>
     </tr>
   </table>