diff options
-rwxr-xr-x | chrome/app/resources/locale_settings.grd | 56 | ||||
-rw-r--r-- | tools/grit/grit/scons.py | 9 | ||||
-rw-r--r-- | tools/grit/grit/tool/build.py | 9 |
3 files changed, 55 insertions, 19 deletions
diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd index 163bf39..4ca7b73 100755 --- a/chrome/app/resources/locale_settings.grd +++ b/chrome/app/resources/locale_settings.grd @@ -62,11 +62,57 @@ <release seq="1" allow_pseudo="false"> <includes> <!-- The HTML for the about:terms page --> - <if expr="pp_ifdef('_google_chrome')"> - <!-- TODO(tc): This won't work yet since we don't substitute - GRITLANGCODE in random attributes. --> - <include name="IDR_TERMS_HTML" file="terms\terms_[GRITLANGCODE].html" type="BINDATA" /> - </if> + <if expr="pp_ifdef('_google_chrome') and 'ar' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ar.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'bg' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_bg.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'bn' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_bn.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'ca' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ca.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'cs' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_cs.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'da' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_da.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'de' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_de.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'el' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_el.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'en-GB' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_en-GB.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'en-US' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_en.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'es' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_es.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'es-419' == lang"><include name="IDR_TERMS_HTML" file="terms\terms_es-419.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'et' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_et.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'fi' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_fi.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'fil' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_fil.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'fr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_fr.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'gu' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_gu.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'he' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_he.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'hi' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_hi.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'hr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_hr.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'hu' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_hu.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'id' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_id.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'it' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_it.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'ja' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ja.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'kn' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_kn.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'ko' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ko.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'lt' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_lt.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'lv' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_lv.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'ml' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ml.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'mr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_mr.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'nl' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_nl.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'no' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_nb.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'or' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_or.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'pl' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_pl.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'pt-BR' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_pt-BR.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'pt-PT' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_pt-PT.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'ro' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ro.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'ru' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ru.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'sk' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_sk.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'sl' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_sl.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'sr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_sr.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'sv' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_sv.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'ta' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ta.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'te' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_te.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'th' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_th.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'tr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_tr.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'uk' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_uk.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'vi' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_vi.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'zh-CN' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_zh-CN.html" type="BINDATA" /></if> + <if expr="pp_ifdef('_google_chrome') and 'zh-TW' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_zh-TW.html" type="BINDATA" /></if> + <if expr="not pp_ifdef('_google_chrome')"> <include name="IDR_TERMS_HTML" file="terms\terms_chromium.html" type="BINDATA" /> </if> diff --git a/tools/grit/grit/scons.py b/tools/grit/grit/scons.py index 9a88216..849e537 100644 --- a/tools/grit/grit/scons.py +++ b/tools/grit/grit/scons.py @@ -138,17 +138,16 @@ def _Scanner(file_node, env, path): # line to get this to work with Repository() directories. # Get this functionality folded back into the upstream grit tool. #grd = grd_reader.Parse(str(file_node)), debug=_IsDebugEnabled()) - grd = grd_reader.Parse(str(file_node.rfile()), debug=_IsDebugEnabled()) + grd = grd_reader.Parse(os.path.abspath(_SourceToFile(file_node)), + debug=_IsDebugEnabled()) files = [] for node in grd: if (node.name == 'structure' or node.name == 'skeleton' or (node.name == 'file' and node.parent and node.parent.name == 'translations')): files.append(os.path.abspath(node.GetFilePath())) - elif node.name == 'include' and node.attrs['filenameonly'] == 'false': - # TODO(tc): This doesn't work because the path is often relative to - #files.append(node.FilenameToOpen()) - pass + elif node.name == 'include': + files.append(node.FilenameToOpen()) # Add in the grit source files. If one of these change, we want to re-run # grit. diff --git a/tools/grit/grit/tool/build.py b/tools/grit/grit/tool/build.py index fa064fc..a8488e8 100644 --- a/tools/grit/grit/tool/build.py +++ b/tools/grit/grit/tool/build.py @@ -157,15 +157,6 @@ are exported to translation interchange files (e.g. XMB files), etc. for output in self.res.GetOutputFiles(): self.VerboseOut('Creating %s...' % output.GetFilename()) - # Don't build data package files on windows because it's not used and - # there are project dependency issues. We still need to create the file - # to satisfy build dependencies. - linux_or_mac = (sys.platform == 'linux2' or sys.platform == 'darwin') - if output.GetType() == 'data_package' and not linux_or_mac: - f = open(output.GetOutputFilename(), 'wb') - f.close() - continue - # Microsoft's RC compiler can only deal with single-byte or double-byte # files (no UTF-8), so we make all RC files UTF-16 to support all # character sets. |