fix for bug #342930: "You have asked to open [lots of] tabs at once" should read "You are about to open..."

backporting the fix from the MOZILLA_1_8_BRANCH to work on the trunk (both with places enabled and without)

r=dietrich, original patch r=mconnor, ui-r=beltzner
This commit is contained in:
sspitzer%mozilla.org 2006-10-10 23:19:01 +00:00
parent a3b7052d08
commit c1ae0f8c10
10 changed files with 29 additions and 28 deletions

View File

@ -737,17 +737,19 @@ var BookmarksCommand = {
// default to true: if it were false, we wouldn't get this far // default to true: if it were false, we wouldn't get this far
var warnOnOpen = { value: true }; var warnOnOpen = { value: true };
var messageKey = "tabs.openWarningMultiple"; var messageKey = "tabs.openWarningMultipleBranded";
var openKey = "tabs.openButtonMultiple"; var openKey = "tabs.openButtonMultiple";
var buttonPressed = promptService.confirmEx(window, var buttonPressed = promptService.confirmEx(window,
BookmarksUtils.getLocaleString("tabs.openWarningTitle"), BookmarksUtils.getLocaleString("tabs.openWarningTitle"),
BookmarksUtils.getLocaleString(messageKey, [numTabsToOpen]), BookmarksUtils.getLocaleString(messageKey,
[numTabsToOpen, BookmarksUtils._brandShortName]),
(promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0)
+ (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1),
BookmarksUtils.getLocaleString(openKey), BookmarksUtils.getLocaleString(openKey),
null, null, null, null,
BookmarksUtils.getLocaleString("tabs.openWarningPromptMe"), BookmarksUtils.getLocaleString("tabs.openWarningPromptMeBranded",
[BookmarksUtils._brandShortName]),
warnOnOpen); warnOnOpen);
reallyOpen = (buttonPressed == 0); reallyOpen = (buttonPressed == 0);

View File

@ -1338,18 +1338,22 @@ var PlacesController = {
// default to true: if it were false, we wouldn't get this far // default to true: if it were false, we wouldn't get this far
var warnOnOpen = { value: true }; var warnOnOpen = { value: true };
var messageKey = "tabs.openWarningMultiple"; var messageKey = "tabs.openWarningMultipleBranded";
var openKey = "tabs.openButtonMultiple"; var openKey = "tabs.openButtonMultiple";
var strings = document.getElementById("placeBundle"); var strings = document.getElementById("placeBundle");
var brandBundle = document.getElementById("bundle_brand");
var brandShortName = brandBundle.getString("brandShortName");
var buttonPressed = promptService.confirmEx(window, var buttonPressed = promptService.confirmEx(window,
strings.getString("tabs.openWarningTitle"), strings.getString("tabs.openWarningTitle"),
strings.getFormattedString(messageKey, [numTabsToOpen]), strings.getFormattedString(messageKey,
[numTabsToOpen, brandShortName]),
(promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0)
+ (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1),
strings.getString(openKey), strings.getString(openKey),
null, null, null, null,
strings.getString("tabs.openWarningPromptMe"), strings.getFormattedString("tabs.openWarningPromptMeBranded",
[brandShortName]),
warnOnOpen); warnOnOpen);
reallyOpen = (buttonPressed == 0); reallyOpen = (buttonPressed == 0);

View File

@ -68,7 +68,7 @@
<stringbundleset id="stringbundles"> <stringbundleset id="stringbundles">
<stringbundle id="bundle_browser" src="chrome://browser/locale/browser.properties"/> <stringbundle id="bundle_browser" src="chrome://browser/locale/browser.properties"/>
<stringbundle id="placeBundle" src="chrome://browser/locale/places/places.properties"/> <stringbundle id="placeBundle" src="chrome://browser/locale/places/places.properties"/>
<stringbundle id="brandBundle" src="chrome://branding/locale/brand.properties"/> <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
</stringbundleset> </stringbundleset>
<commandset id="TMCommandSet" <commandset id="TMCommandSet"

View File

@ -78,11 +78,11 @@
<!-- XXX flex below and on prefpane is a hack because wrapping checkboxes don't <!-- XXX flex below and on prefpane is a hack because wrapping checkboxes don't
reflow properly; see bug 349098 --> reflow properly; see bug 349098 -->
<vbox id="tabPrefsBox" align="start" flex="1"> <vbox id="tabPrefsBox" align="start" flex="1">
<checkbox id="warnCloseMultiple" label="&warnCloseMultiple.label;" <checkbox id="warnCloseMultiple" label="&warnCloseMultipleTabs.label;"
accesskey="&warnCloseMultiple.accesskey;" accesskey="&warnCloseMultipleTabs.accesskey;"
preference="browser.tabs.warnOnClose"/> preference="browser.tabs.warnOnClose"/>
<checkbox id="warnOpenMany" label="&warnOpenMany.label;" <checkbox id="warnOpenMany" label="&warnOpenManyTabs.label;"
accesskey="&warnOpenMany.accesskey;" accesskey="&warnOpenManyTabs.accesskey;"
preference="browser.tabs.warnOnOpen"/> preference="browser.tabs.warnOnOpen"/>
<checkbox id="showTabBar" label="&showTabBar.label;" <checkbox id="showTabBar" label="&showTabBar.label;"
accesskey="&showTabBar.accesskey;" accesskey="&showTabBar.accesskey;"

View File

@ -183,6 +183,6 @@ bookmarkCurTabTitle=Add Bookmark
bookmarkAllTabsTitle=Bookmark All Tabs bookmarkAllTabsTitle=Bookmark All Tabs
tabs.openWarningTitle=Confirm open tabs.openWarningTitle=Confirm open
tabs.openWarningMultiple=You are about to open %S tabs. Are you sure you want to open these tabs? tabs.openWarningMultipleBranded=You are about to open %S tabs. This might slow down %S while the pages are loading. Are you sure you want to continue?
tabs.openButtonMultiple=Open tabs tabs.openButtonMultiple=Open tabs
tabs.openWarningPromptMe=Warn me when I attempt to open a lot of tabs at once tabs.openWarningPromptMeBranded=Warn me when opening multiple tabs might slow down %S

View File

@ -61,11 +61,6 @@ saveLinkErrorTitle=Save Link
# Default name for the Web Panels sidebar # Default name for the Web Panels sidebar
webPanels=Web Panels webPanels=Web Panels
tabs.closeWarningTitle=Confirm close
tabs.closeWarning=This Browser window has %S tabs open. Do you want to close it and all its tabs?
tabs.closeButton=Close all tabs
tabs.closeWarningPromptMe=Warn me when closing multiple tabs
xpinstallPromptWarning=%S prevented this site (%S) from asking you to install software on your computer. xpinstallPromptWarning=%S prevented this site (%S) from asking you to install software on your computer.
xpinstallPromptWarningButton=Edit Options... xpinstallPromptWarningButton=Edit Options...
# Accessibility Note: # Accessibility Note:

View File

@ -62,6 +62,6 @@ searchCurrentDefault=Search in '%S'
findInPrefix=Find in '%S'... findInPrefix=Find in '%S'...
tabs.openWarningTitle=Confirm open tabs.openWarningTitle=Confirm open
tabs.openWarningMultiple=You have asked to open %S tabs at once. This might slow down your system while the pages are loading. tabs.openWarningMultipleBranded=You are about to open %S tabs. This might slow down %S while the pages are loading. Are you sure you want to continue?
tabs.openButtonMultiple=Open tabs tabs.openButtonMultiple=Open tabs
tabs.openWarningPromptMe=Warn me when I attempt to open a lot of tabs at once tabs.openWarningPromptMeBranded=Warn me when opening multiple tabs might slow down %S

View File

@ -4,11 +4,11 @@
<!ENTITY inNewTab.label "a new tab"> <!ENTITY inNewTab.label "a new tab">
<!ENTITY inNewTab.accesskey "t"> <!ENTITY inNewTab.accesskey "t">
<!ENTITY warnCloseMultiple.label "Warn me when I close a window with multiple tabs"> <!ENTITY warnCloseMultipleTabs.label "Warn me when closing multiple tabs">
<!ENTITY warnCloseMultiple.accesskey "m"> <!ENTITY warnCloseMultipleTabs.accesskey "m">
<!ENTITY warnOpenMany.label "Warn me when I open lots of tabs at once"> <!ENTITY warnOpenManyTabs.label "Warn me when opening multiple tabs might slow down &brandShortName;">
<!ENTITY warnOpenMany.accesskey "o"> <!ENTITY warnOpenManyTabs.accesskey "o">
<!ENTITY showTabBar.label "Always show the tab bar"> <!ENTITY showTabBar.label "Always show the tab bar">
<!ENTITY showTabBar.accesskey "b"> <!ENTITY showTabBar.accesskey "b">

View File

@ -1275,7 +1275,7 @@
if (!aAll) if (!aAll)
--tabsToClose; --tabsToClose;
var messageKey = (tabsToClose == 1) ? "tabs.closeWarningOne" : "tabs.closeWarningMultiple"; var messageKey = (tabsToClose == 1) ? "tabs.closeWarningOneTab" : "tabs.closeWarningMultipleTabs";
var closeKey = (tabsToClose == 1) ? "tabs.closeButtonOne" : "tabs.closeButtonMultiple"; var closeKey = (tabsToClose == 1) ? "tabs.closeButtonOne" : "tabs.closeButtonMultiple";
// focus the window before prompting. // focus the window before prompting.
// this will raise any minimized window, which will // this will raise any minimized window, which will

View File

@ -7,8 +7,8 @@ browsewithcaret.checkWindowTitle=Caret Browsing
browsewithcaret.checkLabel=Pressing F7 turns Caret Browsing on or off. This feature places a moveable cursor in web pages, allowing you to select text with the keyboard. Do you want to turn Caret Browsing on? browsewithcaret.checkLabel=Pressing F7 turns Caret Browsing on or off. This feature places a moveable cursor in web pages, allowing you to select text with the keyboard. Do you want to turn Caret Browsing on?
browsewithcaret.checkButtonLabel=Yes browsewithcaret.checkButtonLabel=Yes
tabs.closeWarningTitle=Confirm close tabs.closeWarningTitle=Confirm close
tabs.closeWarningOne=You are about to close %S open tab. Are you sure you want to continue? tabs.closeWarningOneTab=You are about to close %S tab. Are you sure you want to continue?
tabs.closeWarningMultiple=You are about to close %S open tabs. Are you sure you want to continue? tabs.closeWarningMultipleTabs=You are about to close %S tabs. Are you sure you want to continue?
tabs.closeButtonOne=Close tab tabs.closeButtonOne=Close tab
tabs.closeButtonMultiple=Close tabs tabs.closeButtonMultiple=Close tabs
tabs.closeWarningPromptMe=Warn me when I attempt to close multiple tabs tabs.closeWarningPromptMe=Warn me when I attempt to close multiple tabs