From 9ea45e8064081fe4dc5f263ebb7e867937d67058 Mon Sep 17 00:00:00 2001 From: "bryner%netscape.com" Date: Sat, 29 Jun 2002 04:40:13 +0000 Subject: [PATCH] Making the popup window prompt localizable. --- camino/CHBrowserWrapper.mm | 6 +----- camino/English.lproj/Localizable.strings | Bin 1730 -> 2254 bytes .../English.lproj/Localizable.strings | Bin 1730 -> 2254 bytes camino/src/browser/BrowserWrapper.mm | 6 +----- chimera/CHBrowserWrapper.mm | 6 +----- chimera/English.lproj/Localizable.strings | Bin 1730 -> 2254 bytes .../English.lproj/Localizable.strings | Bin 1730 -> 2254 bytes chimera/src/browser/BrowserWrapper.mm | 6 +----- 8 files changed, 4 insertions(+), 20 deletions(-) diff --git a/camino/CHBrowserWrapper.mm b/camino/CHBrowserWrapper.mm index 4ccde827bcd..492a31fbc2d 100644 --- a/camino/CHBrowserWrapper.mm +++ b/camino/CHBrowserWrapper.mm @@ -474,10 +474,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1"; [[self window] setFrame:frame display:YES]; } -#define NS_POPUP_BLOCK @"This Web site is attempting to open an unrequested popup window. Navigator can \ -automatically prevent Web sites from opening popup advertisements. Click OK to prevent all \ -unrequested popups (including this one) from opening." - - (CHBrowserView*)createBrowserWindow:(unsigned int)aMask { nsCOMPtr pref(do_GetService("@mozilla.org/preferences-service;1")); @@ -497,7 +493,7 @@ unrequested popups (including this one) from opening." // popup. nsAlertController* controller = nsCocoaBrowserService::GetAlertController(); BOOL confirm = [controller confirm: [self window] title: @"Unrequested Popup Detected" - text: NS_POPUP_BLOCK]; + text: [NSString stringWithFormat: NSLocalizedString(@"PopupBlockMsg", @""), NSLocalizedString(@"Navigator", @"")]]; // This is a one-time dialog. pref->SetBoolPref("browser.popups.showPopupBlocker", PR_FALSE); diff --git a/camino/English.lproj/Localizable.strings b/camino/English.lproj/Localizable.strings index 148f89cece6c1f9d59bc77ceaf62bdd4e48b2547..3b56396868de4981bcb115a5180e36b85fc93020 100644 GIT binary patch delta 536 zcmaixK}y3=5QhJii-4dv7ym5u}cwM2(DuqYiZNgCNa3ml{`Za;F_1|IN~ZI_i=2=+ Klu!7%OGV!k17cwS delta 7 OcmX>nc!+nyAvORFrvoPd diff --git a/camino/resources/localized/English.lproj/Localizable.strings b/camino/resources/localized/English.lproj/Localizable.strings index 148f89cece6c1f9d59bc77ceaf62bdd4e48b2547..3b56396868de4981bcb115a5180e36b85fc93020 100644 GIT binary patch delta 536 zcmaixK}y3=5QhJii-4dv7ym5u}cwM2(DuqYiZNgCNa3ml{`Za;F_1|IN~ZI_i=2=+ Klu!7%OGV!k17cwS delta 7 OcmX>nc!+nyAvORFrvoPd diff --git a/camino/src/browser/BrowserWrapper.mm b/camino/src/browser/BrowserWrapper.mm index 4ccde827bcd..492a31fbc2d 100644 --- a/camino/src/browser/BrowserWrapper.mm +++ b/camino/src/browser/BrowserWrapper.mm @@ -474,10 +474,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1"; [[self window] setFrame:frame display:YES]; } -#define NS_POPUP_BLOCK @"This Web site is attempting to open an unrequested popup window. Navigator can \ -automatically prevent Web sites from opening popup advertisements. Click OK to prevent all \ -unrequested popups (including this one) from opening." - - (CHBrowserView*)createBrowserWindow:(unsigned int)aMask { nsCOMPtr pref(do_GetService("@mozilla.org/preferences-service;1")); @@ -497,7 +493,7 @@ unrequested popups (including this one) from opening." // popup. nsAlertController* controller = nsCocoaBrowserService::GetAlertController(); BOOL confirm = [controller confirm: [self window] title: @"Unrequested Popup Detected" - text: NS_POPUP_BLOCK]; + text: [NSString stringWithFormat: NSLocalizedString(@"PopupBlockMsg", @""), NSLocalizedString(@"Navigator", @"")]]; // This is a one-time dialog. pref->SetBoolPref("browser.popups.showPopupBlocker", PR_FALSE); diff --git a/chimera/CHBrowserWrapper.mm b/chimera/CHBrowserWrapper.mm index 4ccde827bcd..492a31fbc2d 100644 --- a/chimera/CHBrowserWrapper.mm +++ b/chimera/CHBrowserWrapper.mm @@ -474,10 +474,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1"; [[self window] setFrame:frame display:YES]; } -#define NS_POPUP_BLOCK @"This Web site is attempting to open an unrequested popup window. Navigator can \ -automatically prevent Web sites from opening popup advertisements. Click OK to prevent all \ -unrequested popups (including this one) from opening." - - (CHBrowserView*)createBrowserWindow:(unsigned int)aMask { nsCOMPtr pref(do_GetService("@mozilla.org/preferences-service;1")); @@ -497,7 +493,7 @@ unrequested popups (including this one) from opening." // popup. nsAlertController* controller = nsCocoaBrowserService::GetAlertController(); BOOL confirm = [controller confirm: [self window] title: @"Unrequested Popup Detected" - text: NS_POPUP_BLOCK]; + text: [NSString stringWithFormat: NSLocalizedString(@"PopupBlockMsg", @""), NSLocalizedString(@"Navigator", @"")]]; // This is a one-time dialog. pref->SetBoolPref("browser.popups.showPopupBlocker", PR_FALSE); diff --git a/chimera/English.lproj/Localizable.strings b/chimera/English.lproj/Localizable.strings index 148f89cece6c1f9d59bc77ceaf62bdd4e48b2547..3b56396868de4981bcb115a5180e36b85fc93020 100644 GIT binary patch delta 536 zcmaixK}y3=5QhJii-4dv7ym5u}cwM2(DuqYiZNgCNa3ml{`Za;F_1|IN~ZI_i=2=+ Klu!7%OGV!k17cwS delta 7 OcmX>nc!+nyAvORFrvoPd diff --git a/chimera/resources/localized/English.lproj/Localizable.strings b/chimera/resources/localized/English.lproj/Localizable.strings index 148f89cece6c1f9d59bc77ceaf62bdd4e48b2547..3b56396868de4981bcb115a5180e36b85fc93020 100644 GIT binary patch delta 536 zcmaixK}y3=5QhJii-4dv7ym5u}cwM2(DuqYiZNgCNa3ml{`Za;F_1|IN~ZI_i=2=+ Klu!7%OGV!k17cwS delta 7 OcmX>nc!+nyAvORFrvoPd diff --git a/chimera/src/browser/BrowserWrapper.mm b/chimera/src/browser/BrowserWrapper.mm index 4ccde827bcd..492a31fbc2d 100644 --- a/chimera/src/browser/BrowserWrapper.mm +++ b/chimera/src/browser/BrowserWrapper.mm @@ -474,10 +474,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1"; [[self window] setFrame:frame display:YES]; } -#define NS_POPUP_BLOCK @"This Web site is attempting to open an unrequested popup window. Navigator can \ -automatically prevent Web sites from opening popup advertisements. Click OK to prevent all \ -unrequested popups (including this one) from opening." - - (CHBrowserView*)createBrowserWindow:(unsigned int)aMask { nsCOMPtr pref(do_GetService("@mozilla.org/preferences-service;1")); @@ -497,7 +493,7 @@ unrequested popups (including this one) from opening." // popup. nsAlertController* controller = nsCocoaBrowserService::GetAlertController(); BOOL confirm = [controller confirm: [self window] title: @"Unrequested Popup Detected" - text: NS_POPUP_BLOCK]; + text: [NSString stringWithFormat: NSLocalizedString(@"PopupBlockMsg", @""), NSLocalizedString(@"Navigator", @"")]]; // This is a one-time dialog. pref->SetBoolPref("browser.popups.showPopupBlocker", PR_FALSE);