Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: chrome/browser/extensions/extension_error_reporter.cc

Issue 684153002: Fix not localized strings in extension_error_reporter.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Localization in unit test Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_error_reporter.cc
diff --git a/chrome/browser/extensions/extension_error_reporter.cc b/chrome/browser/extensions/extension_error_reporter.cc
index 4e5b95645cfeb816e6b4850a82243c758a30b292..898642347d1754777ce31401a03097371ebdab0a 100644
--- a/chrome/browser/extensions/extension_error_reporter.cc
+++ b/chrome/browser/extensions/extension_error_reporter.cc
@@ -17,6 +17,8 @@
#include "chrome/browser/ui/simple_message_box.h"
#include "content/public/browser/notification_service.h"
#include "extensions/browser/notification_types.h"
+#include "grit/generated_resources.h"
+#include "ui/base/l10n/l10n_util.h"
ExtensionErrorReporter* ExtensionErrorReporter::instance_ = NULL;
@@ -51,10 +53,11 @@ void ExtensionErrorReporter::ReportLoadError(
content::Details<const std::string>(&error));
std::string path_str = base::UTF16ToUTF8(extension_path.LossyDisplayName());
- base::string16 message = base::UTF8ToUTF16(
- base::StringPrintf("Could not load extension from '%s'. %s",
- path_str.c_str(),
- error.c_str()));
+ base::string16 message = base::UTF8ToUTF16(base::StringPrintf(
+ "%s %s. %s",
+ l10n_util::GetStringUTF8(IDS_EXTENSIONS_LOAD_ERROR_MESSAGE).c_str(),
+ path_str.c_str(),
+ error.c_str()));
ReportError(message, be_noisy);
FOR_EACH_OBSERVER(Observer,
observers_,
@@ -76,10 +79,11 @@ void ExtensionErrorReporter::ReportError(const base::string16& message,
LOG(WARNING) << "Extension error: " << message;
if (enable_noisy_errors_ && be_noisy) {
- chrome::ShowMessageBox(NULL,
- base::ASCIIToUTF16("Extension error"),
- message,
- chrome::MESSAGE_BOX_TYPE_WARNING);
+ chrome::ShowMessageBox(
+ NULL,
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOAD_ERROR_HEADING),
+ message,
+ chrome::MESSAGE_BOX_TYPE_WARNING);
}
}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698