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

Unified Diff: chrome/browser/resources/settings/device_page/night_light_slider.js

Issue 2951483003: [Night Light] CL9: Add localization for time's AM and PM (Closed)
Patch Set: Created 3 years, 6 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
Index: chrome/browser/resources/settings/device_page/night_light_slider.js
diff --git a/chrome/browser/resources/settings/device_page/night_light_slider.js b/chrome/browser/resources/settings/device_page/night_light_slider.js
index 64e3aa5ac0648791c9254318c4054f488fe1015d..37b87d330e25cfa83c26891dd1cc8b1e5121a782 100644
--- a/chrome/browser/resources/settings/device_page/night_light_slider.js
+++ b/chrome/browser/resources/settings/device_page/night_light_slider.js
@@ -214,13 +214,13 @@ Polymer({
* @private
*/
offsetMinutesToTimeString_: function(offsetMinutes) {
- // TODO(afakhry): Check if these values need to be localized.
var hour = Math.floor(offsetMinutes / 60);
- var amPm = hour >= 12 ? ' PM' : ' AM';
+ var amPm = hour >= 12 ? this.i18n('displayNightLightTimePm')
+ : this.i18n('displayNightLightTimeAm');
hour %= 12;
hour = hour == 0 ? 12 : hour;
var minute = Math.floor(offsetMinutes % 60);
- return hour + ':' + this.pad2_(minute) + amPm;
+ return hour + ':' + this.pad2_(minute) + ' ' + amPm;
stevenjb 2017/06/20 00:36:43 Looking around, it seems like we should be using D
afakhry 2017/06/20 16:47:43 Oh Wow, I had no idea about this. Thank you very m
},
/**

Powered by Google App Engine
This is Rietveld 408576698