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

Unified Diff: ui/webui/resources/js/i18n_template.js

Issue 1224623013: Port downloads.ItemView to a Polymer component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@p-dl-rough-draft2
Patch Set: actually include i18n changes Created 5 years, 5 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: ui/webui/resources/js/i18n_template.js
diff --git a/ui/webui/resources/js/i18n_template.js b/ui/webui/resources/js/i18n_template.js
index f34d46e85c7cc5d927342be34614e5cb1fb7c412..ffc4119cb2595873ab7c1d111a91f085d9a796be 100644
--- a/ui/webui/resources/js/i18n_template.js
+++ b/ui/webui/resources/js/i18n_template.js
@@ -1,7 +1,26 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2015 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.
<include src="i18n_template_no_process.js">
-i18nTemplate.process(document, loadTimeData);
+(function() {
arv (Not doing code reviews) 2015/07/07 22:35:28 We have real block scope now =P
Dan Beam 2015/07/08 02:22:30 Done. (in https://codereview.chromium.org/12295730
+
+var docs = [document];
+
+var importLinks = document.querySelectorAll('link[rel=import]');
+for (var i = 0; i < importLinks.length; ++i) {
+ docs.push(importLinks[i].import);
+}
+
+for (var i = 0; i < docs.length; ++i) {
+ var doc = docs[i];
+ i18nTemplate.process(doc, loadTimeData);
+
+ var templates = doc.querySelectorAll('template');
+ for (var j = 0; j < templates.length; ++j) {
+ i18nTemplate.process(templates[j].content, loadTimeData);
+ }
+}
+
+}());

Powered by Google App Engine
This is Rietveld 408576698