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

Unified Diff: chrome/browser/resources/shared/js/i18n_template.js

Issue 6155008: DOMUI: Implement the new Fonts and Encoding page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes. Created 9 years, 11 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/shared/js/i18n_template.js
diff --git a/chrome/browser/resources/shared/js/i18n_template.js b/chrome/browser/resources/shared/js/i18n_template.js
index c646c17c57ab76d6e12904d9203465ae6874a19d..47c10b0ed37c79f602fe22c60c896d0affa137d9 100644
--- a/chrome/browser/resources/shared/js/i18n_template.js
+++ b/chrome/browser/resources/shared/js/i18n_template.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -44,8 +44,14 @@ var i18nTemplate = (function() {
'i18n-options': function(element, attributeValue, obj) {
var options = obj[attributeValue];
options.forEach(function(values) {
- var option = typeof values == 'string' ? new Option(values) :
- new Option(values[1], values[0]);
+ var option;
+ if (typeof values == 'string') {
+ element.dataType = 'string';
arv (Not doing code reviews) 2011/01/11 21:50:35 This is getting a bit out of hand. Why should i18n
James Hawkins 2011/01/11 23:45:54 I've reverted this change and added handling for a
+ option = new Option(values);
+ } else {
+ element.dataType = typeof values[0];
+ option = new Option(values[1], values[0]);
+ }
element.appendChild(option);
});
},
« chrome/browser/resources/options/pref_ui.js ('K') | « chrome/browser/resources/options/pref_ui.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698