зеркало из https://github.com/mozilla/gecko-dev.git
Bug 853126 - Use PluralForm for the blocked popup message on Android [r=margaret]
This commit is contained in:
Родитель
3837d463e0
Коммит
abb238e9da
|
@ -5155,14 +5155,12 @@ var PopupBlockerObserver = {
|
|||
if (!browser.pageReport.reported) {
|
||||
if (Services.prefs.getBoolPref("privacy.popups.showBrowserMessage")) {
|
||||
let brandShortName = Strings.brand.GetStringFromName("brandShortName");
|
||||
let message;
|
||||
let popupCount = browser.pageReport.length;
|
||||
|
||||
let strings = Strings.browser;
|
||||
if (popupCount > 1)
|
||||
message = strings.formatStringFromName("popup.warningMultiple", [brandShortName, popupCount], 2);
|
||||
else
|
||||
message = strings.formatStringFromName("popup.warning", [brandShortName], 1);
|
||||
let message = PluralForm.get(popupCount, strings.GetStringFromName("popup.message"))
|
||||
.replace("#1", brandShortName)
|
||||
.replace("#2", popupCount);
|
||||
|
||||
let buttons = [
|
||||
{
|
||||
|
|
|
@ -44,8 +44,10 @@ notificationRestart.blocked=Unsafe add-ons installed. Restart to disable.
|
|||
notificationRestart.button=Restart
|
||||
|
||||
# Popup Blocker
|
||||
popup.warning=%S prevented this site from opening a pop-up window. Would you like to show it?
|
||||
popup.warningMultiple=%S prevented this site from opening %S pop-up windows. Would you like to show them?
|
||||
|
||||
# LOCALIZATION NOTE (popup.message): Semicolon-separated list of plural forms.
|
||||
# #1 is brandShortName and #2 is the number of pop-ups blocked.
|
||||
popup.message=#1 prevented this site from opening a pop-up window. Would you like to show it?;#1 prevented this site from opening #2 pop-up windows. Would you like to show them?
|
||||
popup.dontAskAgain=Don't ask again for this site
|
||||
popup.show=Show
|
||||
popup.dontShow=Don't show
|
||||
|
|
Загрузка…
Ссылка в новой задаче