Backing my last checkin out, since the tree is closed

This commit is contained in:
gavin%gavinsharp.com 2006-07-24 18:17:47 +00:00
parent afe9ad34c6
commit c99fd00bcb
2 changed files with 4 additions and 22 deletions

View File

@ -1124,7 +1124,7 @@ Engine.prototype = {
* Handle an error during the load of an engine by prompting the user to
* notify him that the load failed.
*/
function onError(aErrorString, aTitleString) {
function onError() {
if (aEngine._engineToUpdate) {
// We're in an update, so just fail quietly
LOG("updating " + aEngine._engineToUpdate.name + " failed");
@ -1132,15 +1132,11 @@ Engine.prototype = {
}
var sbs = Cc["@mozilla.org/intl/stringbundle;1"].
getService(Ci.nsIStringBundleService);
var searchBundle = sbs.createBundle(SEARCH_BUNDLE);
var brandBundle = sbs.createBundle(BRAND_BUNDLE);
var brandName = brandBundle.GetStringFromName("brandShortName");
var searchBundle = sbs.createBundle(SEARCH_BUNDLE);
var msgStringName = aErrorString || "error_loading_engine_msg2";
var titleStringName = aTitleString || "error_loading_engine_title";
var title = searchBundle.GetStringFromName(titleStringName);
var text = searchBundle.formatStringFromName(msgStringName,
var title = searchBundle.GetStringFromName("error_loading_engine_title");
var text = searchBundle.formatStringFromName("error_loading_engine_msg2",
[brandName, aEngine._location],
2);
@ -1196,18 +1192,6 @@ Engine.prototype = {
return;
}
// Check to see if this is a duplicate engine. If we're confirming the
// engine load, then we display a "this is a duplicate engine" prompt,
// otherwise we fail silently.
var ss = Cc["@mozilla.org/browser/search-service;1"].
getService(Ci.nsIBrowserSearchService);
if (ss.getEngineByName(aEngine.name)) {
if (aEngine._confirm)
onError("error_duplicate_engine_msg", "error_invalid_engine_title");
LOG("_onLoad: duplicate engine found, bailing");
return;
}
// If requested, confirm the addition now that we have the title.
if (aEngine._confirm) {
var confirmation = aEngine._confirmAddEngine();

View File

@ -14,8 +14,6 @@ addEngineAddButtonLabel=Add
error_loading_engine_title=Download Error
# LOCALIZATION NOTE (error_loading_engine_msg2): %1$S = brandShortName, %2$S = location
error_loading_engine_msg2=%S could not download the search plugin from:\n%S
error_duplicate_engine_msg=%S could not install the search plugin from "%S" because an engine with the same name already exists.
error_invalid_engine_title=Install Error
# LOCALIZATION NOTE (error_invalid_engine_msg): %S = brandShortName
error_invalid_engine_msg=This search engine isn't supported by %S and can't be installed.