From: phasefx Date: Tue, 5 Oct 2010 20:13:06 +0000 (+0000) Subject: some I18N and tweak call to getIntPref. Is the 2nd parameter version an undocumented... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=92d35d24fead13946c075b7b0614dbfbfa589866;p=evergreen%2Fbjwebb.git some I18N and tweak call to getIntPref. Is the 2nd parameter version an undocumented way of providing a default if the pref isn't found? git-svn-id: svn://svn.open-ils.org/ILS/trunk@18185 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index a4aa3863b..545ffbe3d 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -143,7 +143,7 @@ main.menu.prototype = { function() { if (obj.new_tab(null,{'focus':true},null) == false) { - if(window.confirm("Sorry, we can't create any more tabs in this window.\nWould you like to create a new tab in another window?")) + if(window.confirm(offlineStrings.getString('menu.new_tab.max_tab_dialog'))) { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]. getService(Components.interfaces.nsIWindowMediator); @@ -1342,7 +1342,7 @@ main.menu.prototype = { var obj = this; var max_tabs = 0; try { - var max_tabs = xulG.pref.getIntPref('open-ils.window_max_tabs', max_tabs); + var max_tabs = xulG.pref.getIntPref('open-ils.window_max_tabs') || max_tabs; } catch (e) {} if(max_tabs > 0 && this.controller.view.tabs.childNodes.length > max_tabs) return false; diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties index d9fa2f595..1b10849cb 100644 --- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties +++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties @@ -139,6 +139,7 @@ menu.spawn_search.msg=Editor would like to search for: %1$s menu.cmd_verify_credentials.tabname=Verify Credentials menu.close_all_tabs.error=Error closing all tabs menu.new_tab.tab=Tab +menu.new_tab.max_tab_dialog=Sorry, we can't create any more tabs in this window.\nWould you like to create a new tab in another window? main.session_cookie.error=Error setting session cookie: %1$s menu.set_tab.error=pause for error menu.reset_network_stats=Reset network activity summary?