зеркало из https://github.com/mozilla/pjs.git
Bug 341437: No user feedback when adding new search engine fails URL checks, patch by Michael Wu <michael.wu@mozilla.com>, r=me/mconnor
This commit is contained in:
Родитель
00630230bd
Коммит
4761223002
|
@ -205,6 +205,16 @@ function (engineURL, iconURL)
|
|||
{
|
||||
debug(ex);
|
||||
Components.utils.reportError("Invalid argument passed to window.sidebar.addSearchEngine: " + ex);
|
||||
|
||||
var searchBundle = srGetStrBundle("chrome://browser/locale/search.properties");
|
||||
var brandBundle = srGetStrBundle("chrome://branding/locale/brand.properties");
|
||||
var brandName = brandBundle.GetStringFromName("brandShortName");
|
||||
var title = searchBundle.GetStringFromName("error_invalid_engine_title");
|
||||
var msg = searchBundle.formatStringFromName("error_invalid_engine_msg",
|
||||
[brandName], 1);
|
||||
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].
|
||||
getService(Components.interfaces.nsIWindowWatcher);
|
||||
ww.getNewPrompter(null).alert(title, msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@ cmd_clearHistory=Clear Search History
|
|||
cmd_clearHistory_accesskey=C
|
||||
|
||||
error_loading_engine_title=Download Error
|
||||
error_loading_engine_msg=%S could not download the search plugin from:\n%S\n\nPlease try again or contact the author.
|
||||
error_loading_engine_msg=%S could not download the search plugin from:\n%S
|
||||
error_invalid_engine_title=Install Error
|
||||
error_invalid_engine_msg=This search engine isn't supported by %S and can't be installed.
|
||||
|
||||
cmd_addFoundEngine=Add "%S"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче