From db722956df29b49f9511cb241b320c218840ab44 Mon Sep 17 00:00:00 2001 From: Shane Caraveo Date: Sat, 14 Sep 2013 10:13:24 -0700 Subject: [PATCH] bug 914927 change string for enable/disable social menuitem, r=felipc --- browser/base/content/browser-social.js | 21 ++++++++++++------- .../en-US/chrome/browser/browser.properties | 2 ++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/browser/base/content/browser-social.js b/browser/base/content/browser-social.js index 72fbf628f8c6..139b37f82b0c 100644 --- a/browser/base/content/browser-social.js +++ b/browser/base/content/browser-social.js @@ -216,13 +216,20 @@ SocialUI = { // enabled == true means we at least have a defaultProvider let provider = Social.provider || Social.defaultProvider; // We only need to update the command itself - all our menu items use it. - let label = gNavigatorBundle.getFormattedString(Social.provider ? - "social.turnOff.label" : - "social.turnOn.label", - [provider.name]); - let accesskey = gNavigatorBundle.getString(Social.provider ? - "social.turnOff.accesskey" : - "social.turnOn.accesskey"); + let label; + if (Social.providers.length == 1) { + label = gNavigatorBundle.getFormattedString(Social.provider + ? "social.turnOff.label" + : "social.turnOn.label", + [provider.name]); + } else { + label = gNavigatorBundle.getString(Social.provider + ? "social.turnOffAll.label" + : "social.turnOnAll.label"); + } + let accesskey = gNavigatorBundle.getString(Social.provider + ? "social.turnOff.accesskey" + : "social.turnOn.accesskey"); toggleCommand.setAttribute("label", label); toggleCommand.setAttribute("accesskey", accesskey); } diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index 91c5db5b310b..2b6292a0a5c8 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -429,6 +429,8 @@ social.turnOff.accesskey=T # LOCALIZATION NOTE (social.turnOn.label): %S is the name of the social provider social.turnOn.label=Turn on %S social.turnOn.accesskey=T +social.turnOffAll.label=Turn off all Services +social.turnOnAll.label=Turn on all Services # LOCALIZATION NOTE (social.markpageMenu.label): %S is the name of the social provider social.markpageMenu.label=Save Page to %S