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); |
}); |
}, |