summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 01:11:36 +0000
committermhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 01:11:36 +0000
commit834bf39ca4b399c3c58892994043efa26e3ffe47 (patch)
treee990b1ec2fd60ef315cfcae5b67d9e6587b32320
parent2e087265468db6369a65f3da28f0c2777788bcb6 (diff)
downloadchromium_src-834bf39ca4b399c3c58892994043efa26e3ffe47.zip
chromium_src-834bf39ca4b399c3c58892994043efa26e3ffe47.tar.gz
chromium_src-834bf39ca4b399c3c58892994043efa26e3ffe47.tar.bz2
Make use of the new Js Template i18n for print domui
Provides a simpler js template engine for print tab which is optimized better than JsTemplate. BUG=173, 947 TEST=print page loads fine. Review URL: http://codereview.chromium.org/155479 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20702 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/dom_ui/print_ui.cc7
-rw-r--r--chrome/browser/resources/print_tab.html4
2 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/dom_ui/print_ui.cc b/chrome/browser/dom_ui/print_ui.cc
index 82b2396..574abda 100644
--- a/chrome/browser/dom_ui/print_ui.cc
+++ b/chrome/browser/dom_ui/print_ui.cc
@@ -46,8 +46,7 @@ void PrintUIHTMLSource::StartDataRequest(const std::string& path,
int request_id) {
// Setup a dictionary so that the html page could read the values.
DictionaryValue localized_strings;
- localized_strings.SetString(L"title",
- l10n_util::GetString(IDS_PRINT));
+ localized_strings.SetString(L"title", l10n_util::GetString(IDS_PRINT));
SetFontAndTextDirection(&localized_strings);
@@ -55,8 +54,8 @@ void PrintUIHTMLSource::StartDataRequest(const std::string& path,
static const StringPiece print_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_PRINT_TAB_HTML));
- const std::string full_html = jstemplate_builder::GetTemplateHtml(
- print_html, &localized_strings, "t");
+ const std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
+ print_html, &localized_strings);
// Load the print html page into the tab contents.
scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
diff --git a/chrome/browser/resources/print_tab.html b/chrome/browser/resources/print_tab.html
index 3b6ca46..8c74d2f 100644
--- a/chrome/browser/resources/print_tab.html
+++ b/chrome/browser/resources/print_tab.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
-<html id="t" >
+<html i18n-values="dir:textdirection">
<head>
<meta charset="utf-8">
- <title jscontent="title"></title>
+ <title i18n-content="title"></title>
<link rel="stylesheet" href="print_tab.css">
</head>
<body>