summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 21:30:51 +0000
committerjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 21:30:51 +0000
commit243ed6775d053407531a16ce1bf986f1df697f62 (patch)
tree5d8b46fa35fcf4c2dcf65652488fc914a4235ecf /chrome
parent1c370c041ab3333d091efdfbbc814853934d574d (diff)
downloadchromium_src-243ed6775d053407531a16ce1bf986f1df697f62.zip
chromium_src-243ed6775d053407531a16ce1bf986f1df697f62.tar.gz
chromium_src-243ed6775d053407531a16ce1bf986f1df697f62.tar.bz2
Make the font family and the font size used in dom UI localizable. This is a part 1 of the fix for bug 7319 and will be followed by part 2 for non-DOM UI.
For some Indian languages (Malayalam, Bengali and Telugu), we have to use a bigger size and a font family for that script on Windows. This is because Windows' stock fonts for those scripts are smaller than fonts for other scripts at a given size. I removed 'WEB' style in chrome_font.h because it's not used anywhere any more after our switch to the html UI. In addition, IDS_WEB_FONT_FAMILY is recycled to localize the font family (or the list of font families) for html UI. I also back-ported the support for setting 'style.fooBar' property to our copy of Jstemplate (JstProcessor.prototype.jstValues_). BUG=7319 Review URL: http://codereview.chromium.org/57025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rwxr-xr-xchrome/app/resources/locale_settings.grd6
-rw-r--r--chrome/app/resources/locale_settings_ar.xtb1
-rw-r--r--chrome/app/resources/locale_settings_bg.xtb1
-rw-r--r--chrome/app/resources/locale_settings_bn.xtb3
-rw-r--r--chrome/app/resources/locale_settings_ca.xtb1
-rw-r--r--chrome/app/resources/locale_settings_cs.xtb1
-rw-r--r--chrome/app/resources/locale_settings_da.xtb1
-rw-r--r--chrome/app/resources/locale_settings_de.xtb1
-rw-r--r--chrome/app/resources/locale_settings_el.xtb1
-rw-r--r--chrome/app/resources/locale_settings_en-GB.xtb1
-rw-r--r--chrome/app/resources/locale_settings_es-419.xtb1
-rw-r--r--chrome/app/resources/locale_settings_es.xtb1
-rw-r--r--chrome/app/resources/locale_settings_et.xtb1
-rw-r--r--chrome/app/resources/locale_settings_fi.xtb1
-rw-r--r--chrome/app/resources/locale_settings_fil.xtb1
-rw-r--r--chrome/app/resources/locale_settings_fr.xtb1
-rw-r--r--chrome/app/resources/locale_settings_gu.xtb1
-rw-r--r--chrome/app/resources/locale_settings_he.xtb1
-rw-r--r--chrome/app/resources/locale_settings_hi.xtb1
-rw-r--r--chrome/app/resources/locale_settings_hr.xtb1
-rw-r--r--chrome/app/resources/locale_settings_hu.xtb1
-rw-r--r--chrome/app/resources/locale_settings_id.xtb1
-rw-r--r--chrome/app/resources/locale_settings_it.xtb1
-rw-r--r--chrome/app/resources/locale_settings_ja.xtb1
-rw-r--r--chrome/app/resources/locale_settings_kn.xtb1
-rw-r--r--chrome/app/resources/locale_settings_ko.xtb1
-rw-r--r--chrome/app/resources/locale_settings_lt.xtb1
-rw-r--r--chrome/app/resources/locale_settings_lv.xtb1
-rw-r--r--chrome/app/resources/locale_settings_ml.xtb3
-rw-r--r--chrome/app/resources/locale_settings_mr.xtb1
-rw-r--r--chrome/app/resources/locale_settings_nb.xtb1
-rw-r--r--chrome/app/resources/locale_settings_nl.xtb1
-rw-r--r--chrome/app/resources/locale_settings_or.xtb1
-rw-r--r--chrome/app/resources/locale_settings_pl.xtb1
-rw-r--r--chrome/app/resources/locale_settings_pt-BR.xtb1
-rw-r--r--chrome/app/resources/locale_settings_pt-PT.xtb1
-rw-r--r--chrome/app/resources/locale_settings_ro.xtb1
-rw-r--r--chrome/app/resources/locale_settings_ru.xtb1
-rw-r--r--chrome/app/resources/locale_settings_sk.xtb1
-rw-r--r--chrome/app/resources/locale_settings_sl.xtb1
-rw-r--r--chrome/app/resources/locale_settings_sr.xtb1
-rw-r--r--chrome/app/resources/locale_settings_sv.xtb1
-rw-r--r--chrome/app/resources/locale_settings_ta.xtb1
-rw-r--r--chrome/app/resources/locale_settings_te.xtb1
-rw-r--r--chrome/app/resources/locale_settings_th.xtb1
-rw-r--r--chrome/app/resources/locale_settings_tr.xtb1
-rw-r--r--chrome/app/resources/locale_settings_uk.xtb1
-rw-r--r--chrome/app/resources/locale_settings_vi.xtb1
-rw-r--r--chrome/app/resources/locale_settings_zh-CN.xtb1
-rw-r--r--chrome/app/resources/locale_settings_zh-TW.xtb1
-rw-r--r--chrome/browser/dom_ui/chrome_url_data_manager.cc16
-rw-r--r--chrome/browser/dom_ui/chrome_url_data_manager.h3
-rw-r--r--chrome/browser/dom_ui/downloads_ui.cc4
-rw-r--r--chrome/browser/dom_ui/history_ui.cc7
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc8
-rw-r--r--chrome/browser/resources/downloads.html6
-rw-r--r--chrome/browser/resources/history.html6
-rw-r--r--chrome/browser/resources/incognito_tab.html4
-rw-r--r--chrome/browser/resources/new_tab.html5
-rw-r--r--chrome/common/gfx/chrome_font.h3
-rw-r--r--chrome/common/gfx/chrome_font_win.cc6
-rw-r--r--chrome/common/resource_bundle.cc6
-rw-r--r--chrome/common/resource_bundle.h1
-rw-r--r--chrome/third_party/jstemplate/jstemplate.js21
-rw-r--r--chrome/third_party/jstemplate/jstemplate_compiled.js13
65 files changed, 119 insertions, 49 deletions
diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd
index fd44e67..b08efd7 100755
--- a/chrome/app/resources/locale_settings.grd
+++ b/chrome/app/resources/locale_settings.grd
@@ -226,6 +226,12 @@
Arial
</message>
+ <!-- The relative font size in % used in web-style native pages
+ (e.g. History). -->
+ <message name="IDS_WEB_FONT_SIZE" use_name_for_id="true">
+ 84%
+ </message>
+
<!-- The default value for HTTP Accept-Language header. -->
<message name="IDS_ACCEPT_LANGUAGES" use_name_for_id="true">
en-US,en
diff --git a/chrome/app/resources/locale_settings_ar.xtb b/chrome/app/resources/locale_settings_ar.xtb
index 3945da6..d27dabc 100644
--- a/chrome/app/resources/locale_settings_ar.xtb
+++ b/chrome/app/resources/locale_settings_ar.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="ar">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">ar,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1256</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_bg.xtb b/chrome/app/resources/locale_settings_bg.xtb
index 0d680cb..84bac8f 100644
--- a/chrome/app/resources/locale_settings_bg.xtb
+++ b/chrome/app/resources/locale_settings_bg.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="bg">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">bg-BG,bg</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1251</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_bn.xtb b/chrome/app/resources/locale_settings_bn.xtb
index fbf363a..0a418f1 100644
--- a/chrome/app/resources/locale_settings_bn.xtb
+++ b/chrome/app/resources/locale_settings_bn.xtb
@@ -1,7 +1,8 @@
<?xml version="1.0" ?>
<!DOCTYPE translationbundle>
<translationbundle lang="bn">
-<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_FAMILY">vrinda</translation>
+<translation id="IDS_WEB_FONT_SIZE">110%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">bn-IN,bn,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_ca.xtb b/chrome/app/resources/locale_settings_ca.xtb
index f4407b4..0df37cb 100644
--- a/chrome/app/resources/locale_settings_ca.xtb
+++ b/chrome/app/resources/locale_settings_ca.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="ca">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">ca-ES,ca</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_cs.xtb b/chrome/app/resources/locale_settings_cs.xtb
index cf83b43..3565b6c 100644
--- a/chrome/app/resources/locale_settings_cs.xtb
+++ b/chrome/app/resources/locale_settings_cs.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="cs">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">cs-CZ,cs</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1250</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_da.xtb b/chrome/app/resources/locale_settings_da.xtb
index e71694d..5130471 100644
--- a/chrome/app/resources/locale_settings_da.xtb
+++ b/chrome/app/resources/locale_settings_da.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="da">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">da-DK,da,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_de.xtb b/chrome/app/resources/locale_settings_de.xtb
index 82f0074..7518983 100644
--- a/chrome/app/resources/locale_settings_de.xtb
+++ b/chrome/app/resources/locale_settings_de.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="de">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">de-DE,de,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_el.xtb b/chrome/app/resources/locale_settings_el.xtb
index 8630521..92aa72d 100644
--- a/chrome/app/resources/locale_settings_el.xtb
+++ b/chrome/app/resources/locale_settings_el.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="el">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">el-GR,el</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-7</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_en-GB.xtb b/chrome/app/resources/locale_settings_en-GB.xtb
index 8b8ff78..0691d58 100644
--- a/chrome/app/resources/locale_settings_en-GB.xtb
+++ b/chrome/app/resources/locale_settings_en-GB.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="en-GB">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">en-GB,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_es-419.xtb b/chrome/app/resources/locale_settings_es-419.xtb
index 4d0f3b3..0c6281f 100644
--- a/chrome/app/resources/locale_settings_es-419.xtb
+++ b/chrome/app/resources/locale_settings_es-419.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="es-419">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">es-419,es</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_es.xtb b/chrome/app/resources/locale_settings_es.xtb
index 40e187c..5e0a031 100644
--- a/chrome/app/resources/locale_settings_es.xtb
+++ b/chrome/app/resources/locale_settings_es.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="es">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">es-ES,es</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_et.xtb b/chrome/app/resources/locale_settings_et.xtb
index e7d418f..180d0f5 100644
--- a/chrome/app/resources/locale_settings_et.xtb
+++ b/chrome/app/resources/locale_settings_et.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="et">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">et-EE,et,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1257</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_fi.xtb b/chrome/app/resources/locale_settings_fi.xtb
index d798dc2..5aa14d7 100644
--- a/chrome/app/resources/locale_settings_fi.xtb
+++ b/chrome/app/resources/locale_settings_fi.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="fi">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">fi-FI,fi,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_fil.xtb b/chrome/app/resources/locale_settings_fil.xtb
index 6714989..ac2ee3a 100644
--- a/chrome/app/resources/locale_settings_fil.xtb
+++ b/chrome/app/resources/locale_settings_fil.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="fil">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">fil,fil-PH,tl,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_fr.xtb b/chrome/app/resources/locale_settings_fr.xtb
index 6242198..68ce46a 100644
--- a/chrome/app/resources/locale_settings_fr.xtb
+++ b/chrome/app/resources/locale_settings_fr.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="fr">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">fr-FR,fr,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_gu.xtb b/chrome/app/resources/locale_settings_gu.xtb
index ee1d2ca..f4fbfde 100644
--- a/chrome/app/resources/locale_settings_gu.xtb
+++ b/chrome/app/resources/locale_settings_gu.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="gu">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">gu-IN,gu,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_he.xtb b/chrome/app/resources/locale_settings_he.xtb
index 4e6aa03..a26c9c5 100644
--- a/chrome/app/resources/locale_settings_he.xtb
+++ b/chrome/app/resources/locale_settings_he.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="he">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">he-IL,he,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1255</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_hi.xtb b/chrome/app/resources/locale_settings_hi.xtb
index 53ca893b..356ff66 100644
--- a/chrome/app/resources/locale_settings_hi.xtb
+++ b/chrome/app/resources/locale_settings_hi.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="hi">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">hi-IN,hi,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_hr.xtb b/chrome/app/resources/locale_settings_hr.xtb
index 1d91030..9fb762b 100644
--- a/chrome/app/resources/locale_settings_hr.xtb
+++ b/chrome/app/resources/locale_settings_hr.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="hr">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">hr-HR,hr,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1250</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_hu.xtb b/chrome/app/resources/locale_settings_hu.xtb
index 5311913..c628fc1 100644
--- a/chrome/app/resources/locale_settings_hu.xtb
+++ b/chrome/app/resources/locale_settings_hu.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="hu">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">hu-HU,hu,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-2</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_id.xtb b/chrome/app/resources/locale_settings_id.xtb
index 8591c71..4ae815c 100644
--- a/chrome/app/resources/locale_settings_id.xtb
+++ b/chrome/app/resources/locale_settings_id.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="id">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">id-ID,id,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_it.xtb b/chrome/app/resources/locale_settings_it.xtb
index f8257e3..50ff2a2 100644
--- a/chrome/app/resources/locale_settings_it.xtb
+++ b/chrome/app/resources/locale_settings_it.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="it">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">it-IT,it,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_ja.xtb b/chrome/app/resources/locale_settings_ja.xtb
index 7ca550b..87251d2 100644
--- a/chrome/app/resources/locale_settings_ja.xtb
+++ b/chrome/app/resources/locale_settings_ja.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="ja">
<translation id="IDS_WEB_FONT_FAMILY">MS PGothic</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">ja,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">Shift_JIS</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">false</translation>
diff --git a/chrome/app/resources/locale_settings_kn.xtb b/chrome/app/resources/locale_settings_kn.xtb
index 9e69109..447543d 100644
--- a/chrome/app/resources/locale_settings_kn.xtb
+++ b/chrome/app/resources/locale_settings_kn.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="kn">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">kn-IN,kn,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_ko.xtb b/chrome/app/resources/locale_settings_ko.xtb
index e9593cb..89442d8 100644
--- a/chrome/app/resources/locale_settings_ko.xtb
+++ b/chrome/app/resources/locale_settings_ko.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="ko">
<translation id="IDS_WEB_FONT_FAMILY">Gulim</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">ko-KR,ko,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-949</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">false</translation>
diff --git a/chrome/app/resources/locale_settings_lt.xtb b/chrome/app/resources/locale_settings_lt.xtb
index b83a9ca..33ec66d 100644
--- a/chrome/app/resources/locale_settings_lt.xtb
+++ b/chrome/app/resources/locale_settings_lt.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="lt">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">lt,en-US,en,ru,pl</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1257</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_lv.xtb b/chrome/app/resources/locale_settings_lv.xtb
index 2019e8d..558b201 100644
--- a/chrome/app/resources/locale_settings_lv.xtb
+++ b/chrome/app/resources/locale_settings_lv.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="lv">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">lv-LV,lv,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1257</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_ml.xtb b/chrome/app/resources/locale_settings_ml.xtb
index c0ac308..59f4151 100644
--- a/chrome/app/resources/locale_settings_ml.xtb
+++ b/chrome/app/resources/locale_settings_ml.xtb
@@ -1,7 +1,8 @@
<?xml version="1.0" ?>
<!DOCTYPE translationbundle>
<translationbundle lang="ml">
-<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_FAMILY">Arial,AnjaliOldLipi,Rachana,Kartika</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">ml-IN,ml,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_mr.xtb b/chrome/app/resources/locale_settings_mr.xtb
index 2529b22..87377fd 100644
--- a/chrome/app/resources/locale_settings_mr.xtb
+++ b/chrome/app/resources/locale_settings_mr.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="mr">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">mr-IN,mr,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_nb.xtb b/chrome/app/resources/locale_settings_nb.xtb
index 7704736..aa59229 100644
--- a/chrome/app/resources/locale_settings_nb.xtb
+++ b/chrome/app/resources/locale_settings_nb.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="no">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">nb-NO,nb,no,nn,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_nl.xtb b/chrome/app/resources/locale_settings_nl.xtb
index eafd26c..2bd6f0e 100644
--- a/chrome/app/resources/locale_settings_nl.xtb
+++ b/chrome/app/resources/locale_settings_nl.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="nl">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">nl-NL,nl,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_or.xtb b/chrome/app/resources/locale_settings_or.xtb
index b87cd1d..a63f819 100644
--- a/chrome/app/resources/locale_settings_or.xtb
+++ b/chrome/app/resources/locale_settings_or.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="or">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">or-IN,or,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_pl.xtb b/chrome/app/resources/locale_settings_pl.xtb
index de40245..0f1e29d 100644
--- a/chrome/app/resources/locale_settings_pl.xtb
+++ b/chrome/app/resources/locale_settings_pl.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="pl">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">pl-PL,pl,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-2</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_pt-BR.xtb b/chrome/app/resources/locale_settings_pt-BR.xtb
index d52b546..2673050 100644
--- a/chrome/app/resources/locale_settings_pt-BR.xtb
+++ b/chrome/app/resources/locale_settings_pt-BR.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="pt-BR">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">pt-BR,pt,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_pt-PT.xtb b/chrome/app/resources/locale_settings_pt-PT.xtb
index 6aac143..2e91915 100644
--- a/chrome/app/resources/locale_settings_pt-PT.xtb
+++ b/chrome/app/resources/locale_settings_pt-PT.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="pt-PT">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">pt-PT,pt,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_ro.xtb b/chrome/app/resources/locale_settings_ro.xtb
index 8c1f1ab..5f05069 100644
--- a/chrome/app/resources/locale_settings_ro.xtb
+++ b/chrome/app/resources/locale_settings_ro.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="ro">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">ro-RO,ro,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-2</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_ru.xtb b/chrome/app/resources/locale_settings_ru.xtb
index 0ced492..8511d3e6 100644
--- a/chrome/app/resources/locale_settings_ru.xtb
+++ b/chrome/app/resources/locale_settings_ru.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="ru">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">ru-RU,ru,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1251</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_sk.xtb b/chrome/app/resources/locale_settings_sk.xtb
index 14b407a..e086a85 100644
--- a/chrome/app/resources/locale_settings_sk.xtb
+++ b/chrome/app/resources/locale_settings_sk.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="sk">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">sk-SK,sk,cs,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1250</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_sl.xtb b/chrome/app/resources/locale_settings_sl.xtb
index 7b850b0..be71407 100644
--- a/chrome/app/resources/locale_settings_sl.xtb
+++ b/chrome/app/resources/locale_settings_sl.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="sl">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">sl-SI,sl,en-GB,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-2</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_sr.xtb b/chrome/app/resources/locale_settings_sr.xtb
index cb1dab8..3029bc0 100644
--- a/chrome/app/resources/locale_settings_sr.xtb
+++ b/chrome/app/resources/locale_settings_sr.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="sr">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">sr-RS,sr,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1251</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_sv.xtb b/chrome/app/resources/locale_settings_sv.xtb
index 01a7494..57643cc 100644
--- a/chrome/app/resources/locale_settings_sv.xtb
+++ b/chrome/app/resources/locale_settings_sv.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="sv">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">sv-SE,sv,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_ta.xtb b/chrome/app/resources/locale_settings_ta.xtb
index 538e03a..171fd07 100644
--- a/chrome/app/resources/locale_settings_ta.xtb
+++ b/chrome/app/resources/locale_settings_ta.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="ta">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">ta-IN,ta,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_te.xtb b/chrome/app/resources/locale_settings_te.xtb
index 46909686..2ddce15 100644
--- a/chrome/app/resources/locale_settings_te.xtb
+++ b/chrome/app/resources/locale_settings_te.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="te">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">te-IN,te,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-1</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_th.xtb b/chrome/app/resources/locale_settings_th.xtb
index 825e627..83f33e1 100644
--- a/chrome/app/resources/locale_settings_th.xtb
+++ b/chrome/app/resources/locale_settings_th.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="th">
<translation id="IDS_WEB_FONT_FAMILY">tahoma</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">th-TH,th</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-874</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_tr.xtb b/chrome/app/resources/locale_settings_tr.xtb
index 227c45a..b303ecb 100644
--- a/chrome/app/resources/locale_settings_tr.xtb
+++ b/chrome/app/resources/locale_settings_tr.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="tr">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">tr-TR,tr,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">ISO-8859-9</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_uk.xtb b/chrome/app/resources/locale_settings_uk.xtb
index 514aaa2..25926a2 100644
--- a/chrome/app/resources/locale_settings_uk.xtb
+++ b/chrome/app/resources/locale_settings_uk.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="uk">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">uk-UA,uk,ru,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1251</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_vi.xtb b/chrome/app/resources/locale_settings_vi.xtb
index 9fefdc4..05c4935 100644
--- a/chrome/app/resources/locale_settings_vi.xtb
+++ b/chrome/app/resources/locale_settings_vi.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="vi">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">vi-VN,vi,fr-FR,fr,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">windows-1258</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">true</translation>
diff --git a/chrome/app/resources/locale_settings_zh-CN.xtb b/chrome/app/resources/locale_settings_zh-CN.xtb
index 925e022..6917d25 100644
--- a/chrome/app/resources/locale_settings_zh-CN.xtb
+++ b/chrome/app/resources/locale_settings_zh-CN.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="zh-CN">
<translation id="IDS_WEB_FONT_FAMILY">Simsun</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">zh-CN,zh</translation>
<translation id="IDS_DEFAULT_ENCODING">GBK</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">false</translation>
diff --git a/chrome/app/resources/locale_settings_zh-TW.xtb b/chrome/app/resources/locale_settings_zh-TW.xtb
index 12c5ec8..e3324d7 100644
--- a/chrome/app/resources/locale_settings_zh-TW.xtb
+++ b/chrome/app/resources/locale_settings_zh-TW.xtb
@@ -2,6 +2,7 @@
<!DOCTYPE translationbundle>
<translationbundle lang="zh-TW">
<translation id="IDS_WEB_FONT_FAMILY">Arial</translation>
+<translation id="IDS_WEB_FONT_SIZE">84%</translation>
<translation id="IDS_ACCEPT_LANGUAGES">zh-TW,zh,en-US,en</translation>
<translation id="IDS_DEFAULT_ENCODING">Big5</translation>
<translation id="IDS_STANDARD_FONT_IS_SERIF">false</translation>
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc
index 113580a..3a189b4 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.cc
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc
@@ -9,8 +9,10 @@
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/thread.h"
+#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/l10n_util.h"
#include "chrome/common/ref_counted_util.h"
#include "chrome/common/url_constants.h"
#include "googleurl/src/url_util.h"
@@ -24,6 +26,8 @@
#include "chrome/personalization/personalization.h"
#endif
+#include "grit/locale_settings.h"
+
// The URL scheme used for internal chrome resources.
// TODO(glen): Choose a better location for this.
static const char kChromeURLScheme[] = "chrome-ui";
@@ -259,6 +263,18 @@ void ChromeURLDataManager::DataSource::SendResponse(
}
// static
+void ChromeURLDataManager::DataSource::SetFontAndTextDirection(
+ DictionaryValue* localized_strings) {
+ localized_strings->SetString(L"fontfamily",
+ l10n_util::GetString(IDS_WEB_FONT_FAMILY));
+ localized_strings->SetString(L"fontsize",
+ l10n_util::GetString(IDS_WEB_FONT_SIZE));
+
+ localized_strings->SetString(L"textdirection",
+ (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
+ L"rtl" : L"ltr");
+}
+
URLRequestJob* ChromeURLDataManager::Factory(URLRequest* request,
const std::string& scheme) {
// Try first with a file handler
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.h b/chrome/browser/dom_ui/chrome_url_data_manager.h
index c3f5688..f11045c 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.h
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.h
@@ -11,6 +11,7 @@
#include "base/task.h"
#include "chrome/common/ref_counted_util.h"
+class DictionaryValue;
class GURL;
class MessageLoop;
class URLRequest;
@@ -61,6 +62,8 @@ class ChromeURLDataManager {
MessageLoop* message_loop() const { return message_loop_; }
const std::string& source_name() const { return source_name_; }
+ static void SetFontAndTextDirection(DictionaryValue* localized_strings);
+
private:
// The name of this source.
// E.g., for favicons, this could be "favicon", which results in paths for
diff --git a/chrome/browser/dom_ui/downloads_ui.cc b/chrome/browser/dom_ui/downloads_ui.cc
index 81684bc..009d65b 100644
--- a/chrome/browser/dom_ui/downloads_ui.cc
+++ b/chrome/browser/dom_ui/downloads_ui.cc
@@ -94,9 +94,7 @@ void DownloadsUIHTMLSource::StartDataRequest(const std::string& path,
localized_strings.SetString(L"control_resume",
l10n_util::GetString(IDS_DOWNLOAD_LINK_RESUME));
- localized_strings.SetString(L"textdirection",
- (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
- L"rtl" : L"ltr");
+ SetFontAndTextDirection(&localized_strings);
static const StringPiece downloads_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc
index 9309732..5e299b6 100644
--- a/chrome/browser/dom_ui/history_ui.cc
+++ b/chrome/browser/dom_ui/history_ui.cc
@@ -27,6 +27,7 @@
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
// Maximum number of search results to return in a given search. We should
// eventually remove this.
@@ -45,6 +46,8 @@ HistoryUIHTMLSource::HistoryUIHTMLSource()
void HistoryUIHTMLSource::StartDataRequest(const std::string& path,
int request_id) {
DictionaryValue localized_strings;
+ localized_strings.SetString(L"loading",
+ l10n_util::GetString(IDS_HISTORY_LOADING));
localized_strings.SetString(L"title",
l10n_util::GetString(IDS_HISTORY_TITLE));
localized_strings.SetString(L"loading",
@@ -72,9 +75,7 @@ void HistoryUIHTMLSource::StartDataRequest(const std::string& path,
localized_strings.SetString(L"deletedaywarning",
l10n_util::GetString(IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING));
- localized_strings.SetString(L"textdirection",
- (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
- L"rtl" : L"ltr");
+ SetFontAndTextDirection(&localized_strings);
static const StringPiece history_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 6250f10..15bbaa6 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -255,9 +255,7 @@ void NewTabHTMLSource::StartDataRequest(const std::string& path,
localized_strings.SetString(L"closedwindow",
l10n_util::GetString(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW));
- localized_strings.SetString(L"textdirection",
- (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
- kRTLHtmlTextDirection : kDefaultHtmlTextDirection);
+ SetFontAndTextDirection(&localized_strings);
// Let the tab know whether it's the first tab being viewed.
localized_strings.SetString(L"firstview",
@@ -316,9 +314,7 @@ void IncognitoTabHTMLSource::StartDataRequest(const std::string& path,
l10n_util::GetStringF(IDS_NEW_TAB_OTR_MESSAGE,
l10n_util::GetString(IDS_LEARN_MORE_INCOGNITO_URL)));
- localized_strings.SetString(L"textdirection",
- (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
- kRTLHtmlTextDirection : kDefaultHtmlTextDirection);
+ SetFontAndTextDirection(&localized_strings);
static const StringPiece incognito_tab_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
diff --git a/chrome/browser/resources/downloads.html b/chrome/browser/resources/downloads.html
index acab6f0..6d85f3b 100644
--- a/chrome/browser/resources/downloads.html
+++ b/chrome/browser/resources/downloads.html
@@ -5,10 +5,8 @@
<title jscontent="title"></title>
<style type="text/css">
body {
- font-family:arial;
background-color:white;
color:black;
- font-size:84%;
margin:10px;
}
.header {
@@ -698,7 +696,7 @@ function downloadUpdated(results) {
}
</script>
</head>
-<body onload="load();">
+<body onload="load();" jsvalues=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
<div class="header">
<a href="" onclick="setSearch(''); return false;">
<img src="../../app/theme/downloads_section.png"
@@ -734,4 +732,4 @@ function downloadUpdated(results) {
<span id="control_resume" jscontent="control_resume">Resume</span>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/chrome/browser/resources/history.html b/chrome/browser/resources/history.html
index bd9738e..4f7347b 100644
--- a/chrome/browser/resources/history.html
+++ b/chrome/browser/resources/history.html
@@ -807,10 +807,8 @@ function historyDeleted() {
</script>
<style type="text/css">
body {
- font-family:arial;
background-color:white;
color:black;
- font-size:84%;
margin:10px;
}
.header {
@@ -921,7 +919,7 @@ html[dir='rtl'] .entry .title a {
}
</style>
</head>
-<body onload="load();">
+<body onload="load();" jsvalues=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
<div class="header">
<a href="" onclick="setSearch(''); return false;">
<img src="../../app/theme/history_section.png"
@@ -954,4 +952,4 @@ html[dir='rtl'] .entry .title a {
<span id="deletedaywarning" jscontent="deletedaywarning">Are you sure you want to delete this day?</span>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/chrome/browser/resources/incognito_tab.html b/chrome/browser/resources/incognito_tab.html
index 6d34646..c35f351 100644
--- a/chrome/browser/resources/incognito_tab.html
+++ b/chrome/browser/resources/incognito_tab.html
@@ -14,8 +14,6 @@ body {
background-color:#eee;
color:black;
padding:10px 10px 10px 10px;
- font-family:arial;
- font-size:84%;
max-width:600px;
margin-left:auto;
margin-right:auto;
@@ -23,7 +21,7 @@ body {
</style>
</head>
<body>
-<div class="content">
+<div class="content" jsvalues=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
<img src="../../app/theme/otr_icon_standalone.png" class="icon" />
<span jseval="this.innerHTML = $this.content;"></span>
</div>
diff --git a/chrome/browser/resources/new_tab.html b/chrome/browser/resources/new_tab.html
index 1b966ca..e71dc51 100644
--- a/chrome/browser/resources/new_tab.html
+++ b/chrome/browser/resources/new_tab.html
@@ -184,9 +184,7 @@ logEvent('log start');
<title jscontent="title"></title>
<style type="text/css">
body {
- font-family:arial;
background-color:white;
- font-size:84%;
margin:0px;
}
html[firstview='true'] #main {
@@ -391,7 +389,8 @@ html[dir='rtl'] #searches input {
}
</style>
</head>
-<body onload="logEvent('body onload fired');">
+<body onload="logEvent('body onload fired');"
+ jsvalues=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
<div id="l10n" style="display:none;">
<span id="closedwindow" jscontent="closedwindow">Window</span>
</div>
diff --git a/chrome/common/gfx/chrome_font.h b/chrome/common/gfx/chrome_font.h
index 16d491a..af68aa1 100644
--- a/chrome/common/gfx/chrome_font.h
+++ b/chrome/common/gfx/chrome_font.h
@@ -47,7 +47,6 @@ class ChromeFont {
BOLD = 1,
ITALIC = 2,
UNDERLINED = 4,
- WEB = 8, // TODO(agl): what does this mean?
};
// Creates a ChromeFont given font name (e.g. arial), font size (e.g. 12).
@@ -66,7 +65,7 @@ class ChromeFont {
// size_deta is the size to add to the current font. See the single
// argument version of this method for an example.
// The style parameter specifies the new style for the font, and is a
- // bitmask of the values: BOLD, ITALIC, UNDERLINED and WEB.
+ // bitmask of the values: BOLD, ITALIC and UNDERLINED.
ChromeFont DeriveFont(int size_delta, int style) const;
// Returns the number of vertical pixels needed to display characters from
diff --git a/chrome/common/gfx/chrome_font_win.cc b/chrome/common/gfx/chrome_font_win.cc
index a1ae955..6fd6753 100644
--- a/chrome/common/gfx/chrome_font_win.cc
+++ b/chrome/common/gfx/chrome_font_win.cc
@@ -148,12 +148,6 @@ ChromeFont ChromeFont::DeriveFont(int size_delta, int style) const {
font_info.lfItalic = ((style & ITALIC) == ITALIC);
font_info.lfWeight = (style & BOLD) ? FW_BOLD : FW_NORMAL;
- if (style & WEB) {
- font_info.lfPitchAndFamily = FF_SWISS;
- wcscpy_s(font_info.lfFaceName,
- l10n_util::GetString(IDS_WEB_FONT_FAMILY).c_str());
- }
-
HFONT hfont = CreateFontIndirect(&font_info);
return ChromeFont(CreateHFontRef(hfont));
}
diff --git a/chrome/common/resource_bundle.cc b/chrome/common/resource_bundle.cc
index cfaf10d..3ffc026 100644
--- a/chrome/common/resource_bundle.cc
+++ b/chrome/common/resource_bundle.cc
@@ -185,10 +185,6 @@ void ResourceBundle::LoadFontsIfNecessary() {
large_font_.reset(new ChromeFont());
*large_font_ = base_font_->DeriveFont(8);
-
- web_font_.reset(new ChromeFont());
- *web_font_ = base_font_->DeriveFont(1,
- base_font_->style() | ChromeFont::WEB);
}
}
@@ -203,8 +199,6 @@ ChromeFont ResourceBundle::GetFont(FontStyle style) {
return *medium_bold_font_;
case LargeFont:
return *large_font_;
- case WebFont:
- return *web_font_;
default:
return *base_font_;
}
diff --git a/chrome/common/resource_bundle.h b/chrome/common/resource_bundle.h
index 076ca03..2305bbc 100644
--- a/chrome/common/resource_bundle.h
+++ b/chrome/common/resource_bundle.h
@@ -48,7 +48,6 @@ class ResourceBundle {
// NOTE: depending upon the locale, this may *not* result in a bold font.
MediumBoldFont,
LargeFont,
- WebFont
};
// Initialize the ResourceBundle for this process.
diff --git a/chrome/third_party/jstemplate/jstemplate.js b/chrome/third_party/jstemplate/jstemplate.js
index 8ed7d02..abefae1 100644
--- a/chrome/third_party/jstemplate/jstemplate.js
+++ b/chrome/third_party/jstemplate/jstemplate.js
@@ -528,10 +528,23 @@ JstProcessor.prototype.jstValues_ = function(context, template, valuesStr) {
context.setVariable(label, value);
} else if (label.charAt(0) == '.') {
- // A jsvalues entry whose name starts with . sets a property
- // of the current template node.
- template[label.substr(1)] = value;
-
+ // A jsvalues entry whose name starts with . sets a property of
+ // the current template node. The name may have further dot
+ // separated components, which are translated into namespace
+ // objects. This specifically allows to set properties on .style
+ // using jsvalues. NOTE(mesch): Setting the style attribute has
+ // no effect in IE and hence should not be done anyway.
+ var nameSpaceLabel = label.substr(1).split('.');
+ var nameSpaceObject = template;
+ var nameSpaceDepth = jsLength(nameSpaceLabel);
+ for (var j = 0, J = nameSpaceDepth - 1; j < J; ++j) {
+ var jLabel = nameSpaceLabel[j];
+ if (!nameSpaceObject[jLabel]) {
+ nameSpaceObject[jLabel] = {};
+ }
+ nameSpaceObject = nameSpaceObject[jLabel];
+ }
+ nameSpaceObject[nameSpaceLabel[nameSpaceDepth - 1]] = value;
} else if (label) {
// Any other jsvalues entry sets an attribute of the current
// template node.
diff --git a/chrome/third_party/jstemplate/jstemplate_compiled.js b/chrome/third_party/jstemplate/jstemplate_compiled.js
index 9c0198e..2f62b31 100644
--- a/chrome/third_party/jstemplate/jstemplate_compiled.js
+++ b/chrome/third_party/jstemplate/jstemplate_compiled.js
@@ -1105,8 +1105,17 @@ JstProcessor.prototype.jstValues_ = function(context, template, valuesStr) {
context.setVariable(label, value);
} else if (label.charAt(0) == '.') {
- template[label.substr(1)] = value;
-
+ var nameSpaceLabel = label.substr(1).split('.');
+ var nameSpaceObject = template;
+ var nameSpaceDepth = jsLength(nameSpaceLabel);
+ for (var j = 0, J = nameSpaceDepth - 1; j < J; ++j) {
+ var jLabel = nameSpaceLabel[j];
+ if (!nameSpaceObject[jLabel]) {
+ nameSpaceObject[jLabel] = {};
+ }
+ nameSpaceObject = nameSpaceObject[jLabel];
+ }
+ nameSpaceObject[nameSpaceLabel[nameSpaceDepth - 1]] = value;
} else if (label) {
if (typeof value == 'boolean') {
if (value) {