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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js

Issue 8775013: [cros] Refresh all localized content on image screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fix Created 9 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js b/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
index 109be7d1c121c9877f141f77057e5e24bf7048e1..59eaa02509f69d7cdb7571420c42bc519afec37d 100644
--- a/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
@@ -128,8 +128,7 @@ cr.define('oobe', function() {
this.profileImageLoading_ = value;
$('user-image-screen-main').classList[
value ? 'add' : 'remove']('profile-image-loading');
- this.profileImageCaption = localStrings.getString(
- value ? 'profilePhotoLoading' : 'profilePhoto');
+ this.updateProfileImageCaption_();
},
/**
@@ -319,6 +318,23 @@ cr.define('oobe', function() {
updateCaption_: function() {
$('user-image-preview-caption').textContent =
this.profileImageSelected ? this.profileImageCaption : '';
+ },
+
+ /**
+ * Updates localized content of the screen that is not updated via template.
+ * @public
+ */
+ updateLocalizedContent: function() {
+ this.updateProfileImageCaption_();
+ },
+
+ /**
+ * Updates profile image caption.
+ * @private
+ */
+ updateProfileImageCaption_: function() {
+ this.profileImageCaption = localStrings.getString(
+ this.profileImageLoading_ ? 'profilePhotoLoading' : 'profilePhoto');
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698