bug 395640: rename the 'always ask' and 'handle internally' actions for the feed type in the Applications prefpane to 'Preview in &brandShortName;' and 'Live Bookmarks in &brandShortName;', respectively; r=gavin, a=mconnor
This commit is contained in:
@@ -699,7 +699,12 @@ var gApplicationsPane = {
|
|||||||
// objects, indexed by type.
|
// objects, indexed by type.
|
||||||
_handledTypes: {},
|
_handledTypes: {},
|
||||||
|
|
||||||
_brandBundle : null,
|
|
||||||
|
//**************************************************************************//
|
||||||
|
// Convenience & Performance Shortcuts
|
||||||
|
|
||||||
|
// These get defined by init().
|
||||||
|
_brandShortName : null,
|
||||||
_prefsBundle : null,
|
_prefsBundle : null,
|
||||||
_list : null,
|
_list : null,
|
||||||
_filter : null,
|
_filter : null,
|
||||||
@@ -727,8 +732,9 @@ var gApplicationsPane = {
|
|||||||
// Initialization & Destruction
|
// Initialization & Destruction
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
// Initialize shortcuts to some commonly accessed elements.
|
// Initialize shortcuts to some commonly accessed elements & values.
|
||||||
this._brandBundle = document.getElementById("bundleBrand");
|
this._brandShortName =
|
||||||
|
document.getElementById("bundleBrand").getString("brandShortName");
|
||||||
this._prefsBundle = document.getElementById("bundlePreferences");
|
this._prefsBundle = document.getElementById("bundlePreferences");
|
||||||
this._list = document.getElementById("handlersView");
|
this._list = document.getElementById("handlersView");
|
||||||
this._filter = document.getElementById("filter");
|
this._filter = document.getElementById("filter");
|
||||||
@@ -992,7 +998,8 @@ var gApplicationsPane = {
|
|||||||
// with alwaysAskBeforeHandling except for the feed type, so here we use
|
// with alwaysAskBeforeHandling except for the feed type, so here we use
|
||||||
// a feed-specific message to describe the behavior.
|
// a feed-specific message to describe the behavior.
|
||||||
if (aHandlerInfo.alwaysAskBeforeHandling)
|
if (aHandlerInfo.alwaysAskBeforeHandling)
|
||||||
return this._prefsBundle.getString("alwaysAskAboutFeed");
|
return this._prefsBundle.getFormattedString("previewInApp",
|
||||||
|
[this._brandShortName]);
|
||||||
|
|
||||||
switch (aHandlerInfo.preferredAction) {
|
switch (aHandlerInfo.preferredAction) {
|
||||||
case Ci.nsIHandlerInfo.saveToDisk:
|
case Ci.nsIHandlerInfo.saveToDisk:
|
||||||
@@ -1004,7 +1011,8 @@ var gApplicationsPane = {
|
|||||||
case Ci.nsIHandlerInfo.handleInternally:
|
case Ci.nsIHandlerInfo.handleInternally:
|
||||||
// For the feed type, handleInternally means live bookmarks.
|
// For the feed type, handleInternally means live bookmarks.
|
||||||
if (aHandlerInfo.type == TYPE_MAYBE_FEED)
|
if (aHandlerInfo.type == TYPE_MAYBE_FEED)
|
||||||
return this._prefsBundle.getString("liveBookmarks");
|
return this._prefsBundle.getFormattedString("liveBookmarksInApp",
|
||||||
|
[this._brandShortName]);
|
||||||
|
|
||||||
// For other types, handleInternally looks like either useHelperApp
|
// For other types, handleInternally looks like either useHelperApp
|
||||||
// or useSystemDefault depending on whether or not there's a preferred
|
// or useSystemDefault depending on whether or not there's a preferred
|
||||||
@@ -1023,10 +1031,9 @@ var gApplicationsPane = {
|
|||||||
return aHandlerInfo.defaultDescription;
|
return aHandlerInfo.defaultDescription;
|
||||||
|
|
||||||
case kActionUsePlugin:
|
case kActionUsePlugin:
|
||||||
let brandShortName = this._brandBundle.getString("brandShortName");
|
|
||||||
return this._prefsBundle.getFormattedString("pluginName",
|
return this._prefsBundle.getFormattedString("pluginName",
|
||||||
[aHandlerInfo.plugin.name,
|
[aHandlerInfo.plugin.name,
|
||||||
brandShortName]);
|
this._brandShortName]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1074,15 +1081,18 @@ var gApplicationsPane = {
|
|||||||
if (handlerInfo.type == TYPE_MAYBE_FEED) {
|
if (handlerInfo.type == TYPE_MAYBE_FEED) {
|
||||||
let menuItem = document.createElementNS(kXULNS, "menuitem");
|
let menuItem = document.createElementNS(kXULNS, "menuitem");
|
||||||
menuItem.setAttribute("alwaysAsk", "true");
|
menuItem.setAttribute("alwaysAsk", "true");
|
||||||
menuItem.setAttribute("label",
|
let label = this._prefsBundle.getFormattedString("previewInApp",
|
||||||
this._prefsBundle.getString("alwaysAskAboutFeed"));
|
[this._brandShortName]);
|
||||||
|
menuItem.setAttribute("label", label);
|
||||||
menuPopup.appendChild(menuItem);
|
menuPopup.appendChild(menuItem);
|
||||||
if (handlerInfo.alwaysAskBeforeHandling)
|
if (handlerInfo.alwaysAskBeforeHandling)
|
||||||
menu.selectedItem = menuItem;
|
menu.selectedItem = menuItem;
|
||||||
|
|
||||||
menuItem = document.createElementNS(kXULNS, "menuitem");
|
menuItem = document.createElementNS(kXULNS, "menuitem");
|
||||||
menuItem.setAttribute("action", Ci.nsIHandlerInfo.handleInternally);
|
menuItem.setAttribute("action", Ci.nsIHandlerInfo.handleInternally);
|
||||||
menuItem.setAttribute("label", this._prefsBundle.getString("liveBookmarks"));
|
label = this._prefsBundle.getFormattedString("liveBookmarksInApp",
|
||||||
|
[this._brandShortName]);
|
||||||
|
menuItem.setAttribute("label", label);
|
||||||
menuItem.setAttribute("image", "chrome://browser/skin/page-livemarks.png");
|
menuItem.setAttribute("image", "chrome://browser/skin/page-livemarks.png");
|
||||||
menuPopup.appendChild(menuItem);
|
menuPopup.appendChild(menuItem);
|
||||||
if (handlerInfo.preferredAction == Ci.nsIHandlerInfo.handleInternally)
|
if (handlerInfo.preferredAction == Ci.nsIHandlerInfo.handleInternally)
|
||||||
@@ -1142,10 +1152,9 @@ var gApplicationsPane = {
|
|||||||
if (handlerInfo.plugin) {
|
if (handlerInfo.plugin) {
|
||||||
let menuItem = document.createElementNS(kXULNS, "menuitem");
|
let menuItem = document.createElementNS(kXULNS, "menuitem");
|
||||||
menuItem.setAttribute("action", kActionUsePlugin);
|
menuItem.setAttribute("action", kActionUsePlugin);
|
||||||
let brandShortName = this._brandBundle.getString("brandShortName");
|
|
||||||
let label = this._prefsBundle.getFormattedString("pluginName",
|
let label = this._prefsBundle.getFormattedString("pluginName",
|
||||||
[handlerInfo.plugin.name,
|
[handlerInfo.plugin.name,
|
||||||
brandShortName]);
|
this._brandShortName]);
|
||||||
menuItem.setAttribute("label", label);
|
menuItem.setAttribute("label", label);
|
||||||
menuPopup.appendChild(menuItem);
|
menuPopup.appendChild(menuItem);
|
||||||
if (handlerInfo.preferredAction == kActionUsePlugin)
|
if (handlerInfo.preferredAction == kActionUsePlugin)
|
||||||
|
|||||||
@@ -50,13 +50,17 @@ saveToDisk=Save to Disk
|
|||||||
chooseApp=Choose application...
|
chooseApp=Choose application...
|
||||||
fpTitleChooseApp=Select Helper Application
|
fpTitleChooseApp=Select Helper Application
|
||||||
webFeed=Web Feed
|
webFeed=Web Feed
|
||||||
alwaysAskAboutFeed=Show me a preview and ask me which Feed Reader to use
|
|
||||||
liveBookmarks=Live Bookmarks
|
|
||||||
# LOCALIZATION NOTE (pluginName):
|
# LOCALIZATION NOTE (pluginName):
|
||||||
# %1$S = plugin name (for example "QuickTime Plugin-in 7.2")
|
# %1$S = plugin name (for example "QuickTime Plugin-in 7.2")
|
||||||
# %2$S = brandShortName from brand.properties (for example "Minefield")
|
# %2$S = brandShortName from brand.properties (for example "Minefield")
|
||||||
pluginName=%S (in %S)
|
pluginName=%S (in %S)
|
||||||
|
|
||||||
|
# LOCALIZATION NOTE (previewInApp, liveBookmarksInApp): %S = brandShortName
|
||||||
|
previewInApp=Preview in %S
|
||||||
|
liveBookmarksInApp=Live Bookmarks in %S
|
||||||
|
|
||||||
|
|
||||||
#### Cookie Viewer
|
#### Cookie Viewer
|
||||||
|
|
||||||
hostColon=Host:
|
hostColon=Host:
|
||||||
|
|||||||
Reference in New Issue
Block a user