summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-19 20:06:05 +0000
committerbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-19 20:06:05 +0000
commit2498d3dc6bfce1c0c68f2ea1dae4c10f93516900 (patch)
tree511aeeb47da6f091e3c31cd8ca0bb131afdd8dff
parent65c700b30e47d40b2dd2dd9b99cb4062ed4472bd (diff)
downloadchromium_src-2498d3dc6bfce1c0c68f2ea1dae4c10f93516900.zip
chromium_src-2498d3dc6bfce1c0c68f2ea1dae4c10f93516900.tar.gz
chromium_src-2498d3dc6bfce1c0c68f2ea1dae4c10f93516900.tar.bz2
Merge 157559 - Use translated error string
TBR=cpu, mihaip BUG=150613 Review URL: https://codereview.chromium.org/10923004 TBR=bshe@chromium.org Review URL: https://codereview.chromium.org/10942038 git-svn-id: svn://svn.chromium.org/chrome/branches/1271/src@157590 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd5
-rw-r--r--chrome/browser/chromeos/extensions/wallpaper_private_api.cc3
-rw-r--r--chrome/browser/resources/chromeos/wallpaper_manager/js/butter_bar.js6
-rw-r--r--chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js5
4 files changed, 10 insertions, 9 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index f5193c9..bcc3d77 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -11473,14 +11473,13 @@ Some features may be unavailable. Please check that the profile exists and you
<message name="IDS_WALLPAPER_MANAGER_ACCESS_FAIL" desc="The string displayed to user when access wallpaper server failed.">
Chrome cannot access wallpapers at this time.
</message>
- <message name="IDS_WALLPAPER_MANAGER_DOWNLOAD_FAIL" desc="The string displayed to user when download wallpaper failed.">
+ <message name="IDS_WALLPAPER_MANAGER_DOWNLOAD_FAIL" desc="The string displayed to user when downloading the wallpaper failed.">
Chrome cannot download this wallpaper.
</message>
- <message name="IDS_WALLPAPER_MANAGER_DOWNLOAD_CANCEL" desc="The string displayed to user when download wallpaper canceled.">
+ <message name="IDS_WALLPAPER_MANAGER_DOWNLOAD_CANCEL" desc="The string displayed to user when downloading the wallpaper canceled.">
Download was canceled.
</message>
-
<!-- File Browser -->
<message name="IDS_FILE_BROWSER_ROOT_DIRECTORY_LABEL" desc="Root directory label.">
Files
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index a3df606..5999c26 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -55,6 +55,9 @@ bool WallpaperStringsFunction::RunImpl() {
IDS_OPTIONS_WALLPAPER_CENTER_CROPPED_LAYOUT);
SET_STRING("centerLayout", IDS_OPTIONS_WALLPAPER_CENTER_LAYOUT);
SET_STRING("stretchLayout", IDS_OPTIONS_WALLPAPER_STRETCH_LAYOUT);
+ SET_STRING("connectionFailed", IDS_WALLPAPER_MANAGER_ACCESS_FAIL);
+ SET_STRING("downloadFailed", IDS_WALLPAPER_MANAGER_DOWNLOAD_FAIL);
+ SET_STRING("downloadCanceled", IDS_WALLPAPER_MANAGER_DOWNLOAD_CANCEL);
SET_STRING("customWallpaperWarning",
IDS_WALLPAPER_MANAGER_SHOW_CUSTOM_WALLPAPER_ON_START_WARNING);
#undef SET_STRING
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/butter_bar.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/butter_bar.js
index 4f210ef..fc762d5 100644
--- a/chrome/browser/resources/chromeos/wallpaper_manager/js/butter_bar.js
+++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/butter_bar.js
@@ -216,7 +216,7 @@ ButterBar.prototype.showProgress_ = function() {
var options = {progress: this.percentComplete_, actions: {},
timeout: 0};
- var progressString = 'Downloading';
+ var progressString = loadTimeData.getString('downloadingLabel');
if (this.isVisible_()) {
this.update_(progressString, options);
@@ -248,7 +248,7 @@ ButterBar.prototype.onDownloadStart_ = function(e) {
* @param {Event} e An abort ProgressEvent from XMLHttpRequest.
*/
ButterBar.prototype.onDownloadAbort_ = function(e) {
- this.show('Downloading aborted', {timeout: 1000});
+ this.show(loadTimeData.getString('downloadCanceled'), {timeout: 1000});
this.xhr_ = null;
};
@@ -268,7 +268,7 @@ ButterBar.prototype.onDownloadComplete_ = function(e) {
* @param {Event} e An error ProgressEvent from XMLHttpRequest.
*/
ButterBar.prototype.onDownloadError_ = function(e) {
- this.showError_('An error occured while downloading wallpaper');
+ this.showError_(loadTimeData.getString('downloadFailed'));
this.xhr_ = null;
};
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
index b986a2e..c0d5d21 100644
--- a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
+++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
@@ -96,7 +96,7 @@ function WallpaperManager(dialogDom) {
this.parseManifest_(xhr.responseText);
} else {
this.manifest_ = {};
- this.butterBar_.showError_('Failed to download manifest.');
+ this.butterBar_.showError_(str('connectionFailed'));
}
}
@@ -206,8 +206,7 @@ function WallpaperManager(dialogDom) {
selectedItem.layout,
wallpaperURL);
} else {
- // Displays the error text in butter bar.
- self.butterBar_.showError_(self.wallpaperRequest_.statusText);
+ self.butterBar_.showError_(str('downloadFailed'));
}
self.wallpaperRequest_ = null;
});