diff options
author | gunsch@chromium.org <gunsch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-15 20:30:10 +0000 |
---|---|---|
committer | gunsch@chromium.org <gunsch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-15 20:32:00 +0000 |
commit | 436901b2125fcf72679dd315487abdc70488a6af (patch) | |
tree | 2a53f4f1d40ecd2a2c3a67334229437af4b51acc /chromecast | |
parent | 5b0bdfc4acd1d23d21c0c1091a44c455efd9a876 (diff) | |
download | chromium_src-436901b2125fcf72679dd315487abdc70488a6af.zip chromium_src-436901b2125fcf72679dd315487abdc70488a6af.tar.gz chromium_src-436901b2125fcf72679dd315487abdc70488a6af.tar.bz2 |
Adds locale strings to Chromecast build.
R=lcwu@chromium.org,byungchul@chromium.org
BUG=403104,403101
Review URL: https://codereview.chromium.org/467043002
Cr-Commit-Position: refs/heads/master@{#290000}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290000 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromecast')
63 files changed, 840 insertions, 8 deletions
diff --git a/chromecast/DEPS b/chromecast/DEPS index 203b08d..438dbc0 100644 --- a/chromecast/DEPS +++ b/chromecast/DEPS @@ -3,6 +3,7 @@ include_rules = [ "+content/public/common", "+crypto", + "+grit/chromecast_settings.h", "+grit/shell_resources.h", "+net", "+ui", diff --git a/chromecast/chromecast.gyp b/chromecast/chromecast.gyp index 5881dd0..fa2ef64 100644 --- a/chromecast/chromecast.gyp +++ b/chromecast/chromecast.gyp @@ -22,6 +22,8 @@ 'sources': [ 'common/cast_paths.cc', 'common/cast_paths.h', + 'common/cast_resource_delegate.cc', + 'common/cast_resource_delegate.h', 'common/chromecast_config.cc', 'common/chromecast_config.h', 'common/pref_names.cc', @@ -130,6 +132,8 @@ 'cast_shell_pak', 'cast_shell_resources', 'cast_version_header', + 'chromecast_locales.gyp:chromecast_locales_pak', + 'chromecast_locales.gyp:chromecast_settings', '../ui/aura/aura.gyp:aura_test_support', '../content/content.gyp:content', '../content/content.gyp:content_app_browser', diff --git a/chromecast/chromecast_locales.gyp b/chromecast/chromecast_locales.gyp new file mode 100644 index 0000000..ebcd4d2 --- /dev/null +++ b/chromecast/chromecast_locales.gyp @@ -0,0 +1,69 @@ +# Copyright 2014 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. + +{ + 'variables': { + 'chromecast_branding%': 'Chromium', + 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast_strings', + }, + 'targets': [ + { + 'target_name': 'chromecast_settings', + 'type': 'none', + 'actions': [ + { + 'action_name': 'chromecast_settings', + 'variables': { + 'grit_grd_file': 'shell/settings/chromecast_settings.grd', + 'grit_resource_ids': 'shell/browser/resources/resource_ids', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + ], + 'includes': [ '../build/grit_target.gypi' ], + }, + { + 'target_name': 'chromecast_locales_pak', + 'type': 'none', + 'dependencies': [ + 'chromecast_settings', + ], + 'conditions': [ + ['chromecast_branding=="Chrome"', { + 'dependencies': [ + 'internal/chromecast_locales.gyp:chromecast_app_strings', + ], + }], + ], + 'actions': [ + { + 'action_name': 'repack_locales', + 'message': 'Packing locale-specific resources', + 'variables': { + 'repack_python_cmd': '<(DEPTH)/chromecast/tools/build/chromecast_repack_locales.py', + 'repack_output_dir': '<(PRODUCT_DIR)/chromecast_locales', + 'repack_locales_cmd': [ + 'python', + '<(repack_python_cmd)' + ], + }, + 'inputs': [ + '<(repack_python_cmd)', + '<!@pymod_do_main(chromecast_repack_locales -i -b <(chromecast_branding) -g <(grit_out_dir) -x <(repack_output_dir) <(locales))' + ], + 'outputs': [ + '<!@pymod_do_main(chromecast_repack_locales -o -b <(chromecast_branding) -g <(grit_out_dir) -x <(repack_output_dir) <(locales))' + ], + 'action': [ + '<@(repack_locales_cmd)', + '-b', '<(chromecast_branding)', + '-g', '<(grit_out_dir)', + '-x', '<(repack_output_dir)/.', + '<@(locales)', + ], + }, + ], + }, + ], +} diff --git a/chromecast/common/cast_resource_delegate.cc b/chromecast/common/cast_resource_delegate.cc new file mode 100644 index 0000000..ce7af51 --- /dev/null +++ b/chromecast/common/cast_resource_delegate.cc @@ -0,0 +1,107 @@ +// Copyright 2014 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 "chromecast/common/cast_resource_delegate.h" + +#include "base/files/file_path.h" +#include "base/path_service.h" +#include "ui/gfx/image/image.h" + +namespace chromecast { + +namespace { + +CastResourceDelegate* g_instance = NULL; + +} // namespace + +// static +CastResourceDelegate* CastResourceDelegate::GetInstance() { + DCHECK(g_instance); + return g_instance; +} + +CastResourceDelegate::CastResourceDelegate() { + DCHECK(!g_instance) << "Cannot initialize resource bundle delegate twice."; + g_instance = this; +} + +CastResourceDelegate::~CastResourceDelegate() { + DCHECK_EQ(g_instance, this); + g_instance = NULL; +} + +base::FilePath CastResourceDelegate::GetPathForResourcePack( + const base::FilePath& pack_path, + ui::ScaleFactor scale_factor) { + return pack_path; +}; + +base::FilePath CastResourceDelegate::GetPathForLocalePack( + const base::FilePath& pack_path, + const std::string& locale) { + base::FilePath product_dir; + if (!PathService::Get(base::DIR_MODULE, &product_dir)) { + NOTREACHED(); + } + return product_dir. + Append(FILE_PATH_LITERAL("chromecast_locales")). + Append(FILE_PATH_LITERAL(locale)). + AddExtension(FILE_PATH_LITERAL("pak")); +}; + +gfx::Image CastResourceDelegate::GetImageNamed(int resource_id) { + return gfx::Image(); +}; + +gfx::Image CastResourceDelegate::GetNativeImageNamed( + int resource_id, + ui::ResourceBundle::ImageRTL rtl) { + return gfx::Image(); +}; + +base::RefCountedStaticMemory* CastResourceDelegate::LoadDataResourceBytes( + int resource_id, + ui::ScaleFactor scale_factor) { + return NULL; +}; + +bool CastResourceDelegate::GetRawDataResource(int resource_id, + ui::ScaleFactor scale_factor, + base::StringPiece* value) { + return false; +}; + +bool CastResourceDelegate::GetLocalizedString(int message_id, + base::string16* value) { + ExtraLocaledStringMap::const_iterator it = + extra_localized_strings_.find(message_id); + if (it != extra_localized_strings_.end()) { + *value = it->second; + return true; + } + return false; +}; + +void CastResourceDelegate::AddExtraLocalizedString( + int resource_id, + const base::string16& localized) { + RemoveExtraLocalizedString(resource_id); + extra_localized_strings_.insert(std::make_pair(resource_id, localized)); +} + +void CastResourceDelegate::RemoveExtraLocalizedString(int resource_id) { + extra_localized_strings_.erase(resource_id); +} + +void CastResourceDelegate::ClearAllExtraLocalizedStrings() { + extra_localized_strings_.clear(); +} + +scoped_ptr<gfx::Font> CastResourceDelegate::GetFont( + ui::ResourceBundle::FontStyle style) { + return scoped_ptr<gfx::Font>(); +}; + +} // namespace chromecast diff --git a/chromecast/common/cast_resource_delegate.h b/chromecast/common/cast_resource_delegate.h new file mode 100644 index 0000000..b3130bc --- /dev/null +++ b/chromecast/common/cast_resource_delegate.h @@ -0,0 +1,73 @@ +// Copyright 2014 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. + +#ifndef CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ +#define CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ + +#include <string> + +#include "base/macros.h" +#include "base/memory/ref_counted_memory.h" +#include "base/memory/scoped_ptr.h" +#include "ui/base/resource/resource_bundle.h" + +namespace base { +class FilePath; +} + +namespace gfx { +class Image; +} + +namespace chromecast { + +// A singleton resource bundle delegate. Primary purpose is to indicate the +// correct locale pack file to load. +class CastResourceDelegate : public ui::ResourceBundle::Delegate { + public: + // Returns the singleton of delegate. It doesn't create an instance. + static CastResourceDelegate* GetInstance(); + + CastResourceDelegate(); + virtual ~CastResourceDelegate(); + + // ui:ResourceBundle::Delegate implementation: + virtual base::FilePath GetPathForResourcePack( + const base::FilePath& pack_path, + ui::ScaleFactor scale_factor) OVERRIDE; + virtual base::FilePath GetPathForLocalePack( + const base::FilePath& pack_path, + const std::string& locale) OVERRIDE; + virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE; + virtual gfx::Image GetNativeImageNamed( + int resource_id, + ui::ResourceBundle::ImageRTL rtl) OVERRIDE; + virtual base::RefCountedStaticMemory* LoadDataResourceBytes( + int resource_id, + ui::ScaleFactor scale_factor) OVERRIDE; + virtual bool GetRawDataResource(int resource_id, + ui::ScaleFactor scale_factor, + base::StringPiece* value) OVERRIDE; + virtual bool GetLocalizedString(int message_id, + base::string16* value) OVERRIDE; + virtual scoped_ptr<gfx::Font> GetFont( + ui::ResourceBundle::FontStyle style) OVERRIDE; + + // Adds/removes/clears extra localized strings. + void AddExtraLocalizedString(int resource_id, + const base::string16& localized); + void RemoveExtraLocalizedString(int resource_id); + void ClearAllExtraLocalizedStrings(); + + private: + typedef base::hash_map<int, base::string16> ExtraLocaledStringMap; + + ExtraLocaledStringMap extra_localized_strings_; + + DISALLOW_COPY_AND_ASSIGN(CastResourceDelegate); +}; + +} // namespace chromecast + +#endif // CHROMECAST_COMMON_CAST_RESOURCE_DELEGATE_H_ diff --git a/chromecast/shell/app/cast_main_delegate.cc b/chromecast/shell/app/cast_main_delegate.cc index 87c5fbf..4d3284d 100644 --- a/chromecast/shell/app/cast_main_delegate.cc +++ b/chromecast/shell/app/cast_main_delegate.cc @@ -8,6 +8,7 @@ #include "base/logging.h" #include "base/path_service.h" #include "chromecast/common/cast_paths.h" +#include "chromecast/common/cast_resource_delegate.h" #include "chromecast/shell/browser/cast_content_browser_client.h" #include "chromecast/shell/renderer/cast_content_renderer_client.h" #include "content/public/common/content_switches.h" @@ -42,15 +43,20 @@ void CastMainDelegate::PreSandboxStartup() { void CastMainDelegate::ZygoteForked() { } -// static void CastMainDelegate::InitializeResourceBundle() { - base::FilePath pak_file; - base::FilePath pak_dir; + resource_delegate_.reset(new CastResourceDelegate()); + // TODO(gunsch): Use LOAD_COMMON_RESOURCES once ResourceBundle no longer + // hardcodes resource file names. + ui::ResourceBundle::InitSharedInstanceWithLocale( + "en-US", + resource_delegate_.get(), + ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); + base::FilePath pak_dir; PathService::Get(base::DIR_MODULE, &pak_dir); - - pak_file = pak_dir.Append(FILE_PATH_LITERAL("cast_shell.pak")); - ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); + ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( + pak_dir.Append(FILE_PATH_LITERAL("cast_shell.pak")), + ui::SCALE_FACTOR_NONE); } content::ContentBrowserClient* CastMainDelegate::CreateContentBrowserClient() { diff --git a/chromecast/shell/app/cast_main_delegate.h b/chromecast/shell/app/cast_main_delegate.h index a9abc90..8c9ed62 100644 --- a/chromecast/shell/app/cast_main_delegate.h +++ b/chromecast/shell/app/cast_main_delegate.h @@ -11,6 +11,9 @@ #include "content/public/app/content_main_delegate.h" namespace chromecast { + +class CastResourceDelegate; + namespace shell { class CastContentBrowserClient; @@ -30,10 +33,11 @@ class CastMainDelegate : public content::ContentMainDelegate { CreateContentRendererClient() OVERRIDE; private: - static void InitializeResourceBundle(); + void InitializeResourceBundle(); scoped_ptr<CastContentBrowserClient> browser_client_; scoped_ptr<CastContentRendererClient> renderer_client_; + scoped_ptr<CastResourceDelegate> resource_delegate_; CastContentClient content_client_; DISALLOW_COPY_AND_ASSIGN(CastMainDelegate); diff --git a/chromecast/shell/browser/cast_http_user_agent_settings.cc b/chromecast/shell/browser/cast_http_user_agent_settings.cc index 32957a6..fbc43b3 100644 --- a/chromecast/shell/browser/cast_http_user_agent_settings.cc +++ b/chromecast/shell/browser/cast_http_user_agent_settings.cc @@ -7,7 +7,9 @@ #include "base/logging.h" #include "chromecast/shell/common/cast_content_client.h" #include "content/public/browser/browser_thread.h" +#include "grit/chromecast_settings.h" #include "net/http/http_util.h" +#include "ui/base/l10n/l10n_util.h" namespace chromecast { namespace shell { @@ -21,7 +23,11 @@ CastHttpUserAgentSettings::~CastHttpUserAgentSettings() { } std::string CastHttpUserAgentSettings::GetAcceptLanguage() const { - accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader("en-US"); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + if (accept_language_.empty()) { + accept_language_ = net::HttpUtil::GenerateAcceptLanguageHeader( + l10n_util::GetStringUTF8(IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES)); + } return accept_language_; } diff --git a/chromecast/shell/browser/resources/resource_ids b/chromecast/shell/browser/resources/resource_ids index e0bce0d..882fd8f 100644 --- a/chromecast/shell/browser/resources/resource_ids +++ b/chromecast/shell/browser/resources/resource_ids @@ -19,4 +19,7 @@ "chromecast/shell/browser/resources/shell_resources.grd": { "includes": [31000], }, + "chromecast/shell/settings/chromecast_settings.grd": { + "messages": [31500], + }, } diff --git a/chromecast/shell/settings/chromecast_settings.grd b/chromecast/shell/settings/chromecast_settings.grd new file mode 100644 index 0000000..3233be3 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings.grd @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +This file contains the strings for Chromecast settings. +--> + +<grit base_dir="." latest_public_release="0" current_release="1" + source_lang_id="en" enc_check="möl"> + <outputs> + <output filename="grit/chromecast_settings.h" type="rc_header"> + <emit emit_type='prepend'></emit> + </output> + <output filename="chromecast_settings_am.pak" type="data_package" lang="am" /> + <output filename="chromecast_settings_ar.pak" type="data_package" lang="ar" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_ast.pak" type="data_package" lang="ast" /> + </if> + <output filename="chromecast_settings_bg.pak" type="data_package" lang="bg" /> + <output filename="chromecast_settings_bn.pak" type="data_package" lang="bn" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_bs.pak" type="data_package" lang="bs" /> + </if> + <output filename="chromecast_settings_ca.pak" type="data_package" lang="ca" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_ca@valencia.pak" type="data_package" lang="ca@valencia" /> + </if> + <output filename="chromecast_settings_cs.pak" type="data_package" lang="cs" /> + <output filename="chromecast_settings_da.pak" type="data_package" lang="da" /> + <output filename="chromecast_settings_de.pak" type="data_package" lang="de" /> + <output filename="chromecast_settings_el.pak" type="data_package" lang="el" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_en-AU.pak" type="data_package" lang="en-AU" /> + </if> + <output filename="chromecast_settings_en-GB.pak" type="data_package" lang="en-GB" /> + <output filename="chromecast_settings_en-US.pak" type="data_package" lang="en" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_eo.pak" type="data_package" lang="eo" /> + </if> + <output filename="chromecast_settings_es.pak" type="data_package" lang="es" /> + <output filename="chromecast_settings_es-419.pak" type="data_package" lang="es-419" /> + <output filename="chromecast_settings_et.pak" type="data_package" lang="et" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_eu.pak" type="data_package" lang="eu" /> + </if> + <output filename="chromecast_settings_fa.pak" type="data_package" lang="fa" /> + <output filename="chromecast_settings_fake-bidi.pak" type="data_package" lang="fake-bidi" /> + <output filename="chromecast_settings_fi.pak" type="data_package" lang="fi" /> + <output filename="chromecast_settings_fil.pak" type="data_package" lang="fil" /> + <output filename="chromecast_settings_fr.pak" type="data_package" lang="fr" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_gl.pak" type="data_package" lang="gl" /> + </if> + <output filename="chromecast_settings_gu.pak" type="data_package" lang="gu" /> + <output filename="chromecast_settings_he.pak" type="data_package" lang="he" /> + <output filename="chromecast_settings_hi.pak" type="data_package" lang="hi" /> + <output filename="chromecast_settings_hr.pak" type="data_package" lang="hr" /> + <output filename="chromecast_settings_hu.pak" type="data_package" lang="hu" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_hy.pak" type="data_package" lang="hy" /> + <output filename="chromecast_settings_ia.pak" type="data_package" lang="ia" /> + </if> + <output filename="chromecast_settings_id.pak" type="data_package" lang="id" /> + <output filename="chromecast_settings_it.pak" type="data_package" lang="it" /> + <output filename="chromecast_settings_ja.pak" type="data_package" lang="ja" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_ka.pak" type="data_package" lang="ka" /> + </if> + <output filename="chromecast_settings_kn.pak" type="data_package" lang="kn" /> + <output filename="chromecast_settings_ko.pak" type="data_package" lang="ko" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_ku.pak" type="data_package" lang="ku" /> + <output filename="chromecast_settings_kw.pak" type="data_package" lang="kw" /> + </if> + <output filename="chromecast_settings_lt.pak" type="data_package" lang="lt" /> + <output filename="chromecast_settings_lv.pak" type="data_package" lang="lv" /> + <output filename="chromecast_settings_ml.pak" type="data_package" lang="ml" /> + <output filename="chromecast_settings_mr.pak" type="data_package" lang="mr" /> + <output filename="chromecast_settings_ms.pak" type="data_package" lang="ms" /> + <output filename="chromecast_settings_nl.pak" type="data_package" lang="nl" /> + <!-- The translation console uses 'no' for Norwegian Bokmål. It should + be 'nb'. --> + <output filename="chromecast_settings_nb.pak" type="data_package" lang="no" /> + <output filename="chromecast_settings_pl.pak" type="data_package" lang="pl" /> + <output filename="chromecast_settings_pt-BR.pak" type="data_package" lang="pt-BR" /> + <output filename="chromecast_settings_pt-PT.pak" type="data_package" lang="pt-PT" /> + <output filename="chromecast_settings_ro.pak" type="data_package" lang="ro" /> + <output filename="chromecast_settings_ru.pak" type="data_package" lang="ru" /> + <output filename="chromecast_settings_sk.pak" type="data_package" lang="sk" /> + <output filename="chromecast_settings_sl.pak" type="data_package" lang="sl" /> + <output filename="chromecast_settings_sr.pak" type="data_package" lang="sr" /> + <output filename="chromecast_settings_sv.pak" type="data_package" lang="sv" /> + <output filename="chromecast_settings_sw.pak" type="data_package" lang="sw" /> + <output filename="chromecast_settings_ta.pak" type="data_package" lang="ta" /> + <output filename="chromecast_settings_te.pak" type="data_package" lang="te" /> + <output filename="chromecast_settings_th.pak" type="data_package" lang="th" /> + <output filename="chromecast_settings_tr.pak" type="data_package" lang="tr" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="chromecast_settings_ug.pak" type="data_package" lang="ug" /> + </if> + <output filename="chromecast_settings_uk.pak" type="data_package" lang="uk" /> + <output filename="chromecast_settings_vi.pak" type="data_package" lang="vi" /> + <output filename="chromecast_settings_zh-CN.pak" type="data_package" lang="zh-CN" /> + <output filename="chromecast_settings_zh-TW.pak" type="data_package" lang="zh-TW" /> + </outputs> + <translations> + <file path="chromecast_settings_am.xtb" lang="am" /> + <file path="chromecast_settings_ar.xtb" lang="ar" /> + <file path="chromecast_settings_bg.xtb" lang="bg" /> + <file path="chromecast_settings_bn.xtb" lang="bn" /> + <file path="chromecast_settings_ca.xtb" lang="ca" /> + <file path="chromecast_settings_cs.xtb" lang="cs" /> + <file path="chromecast_settings_da.xtb" lang="da" /> + <file path="chromecast_settings_de.xtb" lang="de" /> + <file path="chromecast_settings_el.xtb" lang="el" /> + <file path="chromecast_settings_en-GB.xtb" lang="en-GB" /> + <file path="chromecast_settings_es.xtb" lang="es" /> + <file path="chromecast_settings_es-419.xtb" lang="es-419" /> + <file path="chromecast_settings_et.xtb" lang="et" /> + <file path="chromecast_settings_fa.xtb" lang="fa" /> + <file path="chromecast_settings_fi.xtb" lang="fi" /> + <file path="chromecast_settings_fil.xtb" lang="fil" /> + <file path="chromecast_settings_fr.xtb" lang="fr" /> + <file path="chromecast_settings_gu.xtb" lang="gu" /> + <file path="chromecast_settings_he.xtb" lang="he" /> + <file path="chromecast_settings_hi.xtb" lang="hi" /> + <file path="chromecast_settings_hr.xtb" lang="hr" /> + <file path="chromecast_settings_hu.xtb" lang="hu" /> + <file path="chromecast_settings_id.xtb" lang="id" /> + <file path="chromecast_settings_it.xtb" lang="it" /> + <file path="chromecast_settings_ja.xtb" lang="ja" /> + <file path="chromecast_settings_kn.xtb" lang="kn" /> + <file path="chromecast_settings_ko.xtb" lang="ko" /> + <file path="chromecast_settings_lt.xtb" lang="lt" /> + <file path="chromecast_settings_lv.xtb" lang="lv" /> + <file path="chromecast_settings_ml.xtb" lang="ml" /> + <file path="chromecast_settings_mr.xtb" lang="mr" /> + <file path="chromecast_settings_ms.xtb" lang="ms" /> + <file path="chromecast_settings_nl.xtb" lang="nl" /> + <file path="chromecast_settings_nb.xtb" lang="no" /> + <file path="chromecast_settings_pl.xtb" lang="pl" /> + <file path="chromecast_settings_pt-BR.xtb" lang="pt-BR" /> + <file path="chromecast_settings_pt-PT.xtb" lang="pt-PT" /> + <file path="chromecast_settings_ro.xtb" lang="ro" /> + <file path="chromecast_settings_ru.xtb" lang="ru" /> + <file path="chromecast_settings_sk.xtb" lang="sk" /> + <file path="chromecast_settings_sl.xtb" lang="sl" /> + <file path="chromecast_settings_sr.xtb" lang="sr" /> + <file path="chromecast_settings_sv.xtb" lang="sv" /> + <file path="chromecast_settings_sw.xtb" lang="sw" /> + <file path="chromecast_settings_ta.xtb" lang="ta" /> + <file path="chromecast_settings_te.xtb" lang="te" /> + <file path="chromecast_settings_th.xtb" lang="th" /> + <file path="chromecast_settings_tr.xtb" lang="tr" /> + <file path="chromecast_settings_uk.xtb" lang="uk" /> + <file path="chromecast_settings_vi.xtb" lang="vi" /> + <file path="chromecast_settings_zh-CN.xtb" lang="zh-CN" /> + <file path="chromecast_settings_zh-TW.xtb" lang="zh-TW" /> + </translations> + <release seq="1" allow_pseudo="false"> + <messages fallback_to_english="true"> + <message name="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES" + use_name_for_id="true"> + en-US,en + </message> + </messages> + </release> +</grit> diff --git a/chromecast/shell/settings/chromecast_settings_am.xtb b/chromecast/shell/settings/chromecast_settings_am.xtb new file mode 100644 index 0000000..2eb7f9c --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_am.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="am"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">am,en-GB,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ar.xtb b/chromecast/shell/settings/chromecast_settings_ar.xtb new file mode 100644 index 0000000..c747cfc --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ar.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ar"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ar,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_bg.xtb b/chromecast/shell/settings/chromecast_settings_bg.xtb new file mode 100644 index 0000000..9869f27 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_bg.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="bg"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">bg-BG,bg</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_bn.xtb b/chromecast/shell/settings/chromecast_settings_bn.xtb new file mode 100644 index 0000000..817c97b --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_bn.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="bn"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">bn-IN,bn,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ca.xtb b/chromecast/shell/settings/chromecast_settings_ca.xtb new file mode 100644 index 0000000..621a7a2 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ca.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ca"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ca-ES,ca</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_cs.xtb b/chromecast/shell/settings/chromecast_settings_cs.xtb new file mode 100644 index 0000000..b9e2fa7 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_cs.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="cs"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">cs-CZ,cs</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_da.xtb b/chromecast/shell/settings/chromecast_settings_da.xtb new file mode 100644 index 0000000..edc061c --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_da.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="da"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">da-DK,da,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_de.xtb b/chromecast/shell/settings/chromecast_settings_de.xtb new file mode 100644 index 0000000..3295094 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_de.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="de"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">de-DE,de,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_el.xtb b/chromecast/shell/settings/chromecast_settings_el.xtb new file mode 100644 index 0000000..a9c08ab --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_el.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="el"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">el-GR,el</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_en-GB.xtb b/chromecast/shell/settings/chromecast_settings_en-GB.xtb new file mode 100644 index 0000000..339f9c6 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_en-GB.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="en-GB"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">en-GB,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_es-419.xtb b/chromecast/shell/settings/chromecast_settings_es-419.xtb new file mode 100644 index 0000000..42c5de5 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_es-419.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="es-419"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">es-419,es</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_es.xtb b/chromecast/shell/settings/chromecast_settings_es.xtb new file mode 100644 index 0000000..b31331b --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_es.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="es"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">es-ES,es</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_et.xtb b/chromecast/shell/settings/chromecast_settings_et.xtb new file mode 100644 index 0000000..f5af1f4 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_et.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="et"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">et-EE,et,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_fa.xtb b/chromecast/shell/settings/chromecast_settings_fa.xtb new file mode 100644 index 0000000..2da41ae --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_fa.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="fa"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">fa,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_fi.xtb b/chromecast/shell/settings/chromecast_settings_fi.xtb new file mode 100644 index 0000000..2fa3b8f --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_fi.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="fi"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">fi-FI,fi,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_fil.xtb b/chromecast/shell/settings/chromecast_settings_fil.xtb new file mode 100644 index 0000000..66f3f62 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_fil.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="fil"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">fil,fil-PH,tl,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_fr.xtb b/chromecast/shell/settings/chromecast_settings_fr.xtb new file mode 100644 index 0000000..6c6d6bd --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_fr.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="fr"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">fr-FR,fr,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_gu.xtb b/chromecast/shell/settings/chromecast_settings_gu.xtb new file mode 100644 index 0000000..5d94c0f --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_gu.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="gu"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">gu-IN,gu,hi-IN,hi,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_he.xtb b/chromecast/shell/settings/chromecast_settings_he.xtb new file mode 100644 index 0000000..50c852c --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_he.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="he"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">he-IL,he,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_hi.xtb b/chromecast/shell/settings/chromecast_settings_hi.xtb new file mode 100644 index 0000000..68a7839 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_hi.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="hi"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">hi-IN,hi,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_hr.xtb b/chromecast/shell/settings/chromecast_settings_hr.xtb new file mode 100644 index 0000000..acd6d75 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_hr.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="hr"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">hr-HR,hr,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_hu.xtb b/chromecast/shell/settings/chromecast_settings_hu.xtb new file mode 100644 index 0000000..c0ee3dc --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_hu.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="hu"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">hu-HU,hu,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_id.xtb b/chromecast/shell/settings/chromecast_settings_id.xtb new file mode 100644 index 0000000..f4e482e --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_id.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="id"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">id-ID,id,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_it.xtb b/chromecast/shell/settings/chromecast_settings_it.xtb new file mode 100644 index 0000000..f5409db --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_it.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="it"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">it-IT,it,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ja.xtb b/chromecast/shell/settings/chromecast_settings_ja.xtb new file mode 100644 index 0000000..b018c16 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ja.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ja"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ja,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_kn.xtb b/chromecast/shell/settings/chromecast_settings_kn.xtb new file mode 100644 index 0000000..1b8b2a9 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_kn.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="kn"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">kn-IN,kn,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ko.xtb b/chromecast/shell/settings/chromecast_settings_ko.xtb new file mode 100644 index 0000000..df283e2 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ko.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ko"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ko-KR,ko,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_lt.xtb b/chromecast/shell/settings/chromecast_settings_lt.xtb new file mode 100644 index 0000000..39aa239 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_lt.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="lt"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">lt,en-US,en,ru,pl</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_lv.xtb b/chromecast/shell/settings/chromecast_settings_lv.xtb new file mode 100644 index 0000000..c40c878 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_lv.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="lv"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">lv-LV,lv,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ml.xtb b/chromecast/shell/settings/chromecast_settings_ml.xtb new file mode 100644 index 0000000..ee4aab9 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ml.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ml"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ml-IN,ml,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_mr.xtb b/chromecast/shell/settings/chromecast_settings_mr.xtb new file mode 100644 index 0000000..e20441d --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_mr.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="mr"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">mr-IN,mr,hi-IN,hi,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ms.xtb b/chromecast/shell/settings/chromecast_settings_ms.xtb new file mode 100644 index 0000000..86fe7eb5 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ms.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ms"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ms-MY,ms,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_nb.xtb b/chromecast/shell/settings/chromecast_settings_nb.xtb new file mode 100644 index 0000000..cc4afe8 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_nb.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="no"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">nb-NO,nb,no,nn,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_nl.xtb b/chromecast/shell/settings/chromecast_settings_nl.xtb new file mode 100644 index 0000000..dc7b596 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_nl.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="nl"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">nl-NL,nl,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_pl.xtb b/chromecast/shell/settings/chromecast_settings_pl.xtb new file mode 100644 index 0000000..51726b7 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_pl.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="pl"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">pl-PL,pl,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_pt-BR.xtb b/chromecast/shell/settings/chromecast_settings_pt-BR.xtb new file mode 100644 index 0000000..62b4e97 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_pt-BR.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="pt-BR"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">pt-BR,pt,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_pt-PT.xtb b/chromecast/shell/settings/chromecast_settings_pt-PT.xtb new file mode 100644 index 0000000..6554e55 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_pt-PT.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="pt-PT"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">pt-PT,pt,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ro.xtb b/chromecast/shell/settings/chromecast_settings_ro.xtb new file mode 100644 index 0000000..0bb0d5a --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ro.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ro"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ro-RO,ro,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ru.xtb b/chromecast/shell/settings/chromecast_settings_ru.xtb new file mode 100644 index 0000000..d5daf5e --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ru.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ru"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ru-RU,ru,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_sk.xtb b/chromecast/shell/settings/chromecast_settings_sk.xtb new file mode 100644 index 0000000..4e530fc --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_sk.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sk"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">sk-SK,sk,cs,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_sl.xtb b/chromecast/shell/settings/chromecast_settings_sl.xtb new file mode 100644 index 0000000..51c81ab --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_sl.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sl"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">sl-SI,sl,en-GB,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_sr.xtb b/chromecast/shell/settings/chromecast_settings_sr.xtb new file mode 100644 index 0000000..c20a7f6 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_sr.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sr"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">sr-RS,sr,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_sv.xtb b/chromecast/shell/settings/chromecast_settings_sv.xtb new file mode 100644 index 0000000..58df97f --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_sv.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sv"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">sv-SE,sv,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_sw.xtb b/chromecast/shell/settings/chromecast_settings_sw.xtb new file mode 100644 index 0000000..dd1a9d8 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_sw.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="sw"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">sw,en-GB,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_ta.xtb b/chromecast/shell/settings/chromecast_settings_ta.xtb new file mode 100644 index 0000000..23ca317 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_ta.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="ta"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">ta-IN,ta,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_te.xtb b/chromecast/shell/settings/chromecast_settings_te.xtb new file mode 100644 index 0000000..819de4e --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_te.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="te"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">te-IN,te,hi-IN,hi,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_th.xtb b/chromecast/shell/settings/chromecast_settings_th.xtb new file mode 100644 index 0000000..8cfc81a --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_th.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="th"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">th-TH,th</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_tr.xtb b/chromecast/shell/settings/chromecast_settings_tr.xtb new file mode 100644 index 0000000..b15cca3 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_tr.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="tr"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">tr-TR,tr,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_uk.xtb b/chromecast/shell/settings/chromecast_settings_uk.xtb new file mode 100644 index 0000000..17f0db6 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_uk.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="uk"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">uk-UA,uk,ru,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_vi.xtb b/chromecast/shell/settings/chromecast_settings_vi.xtb new file mode 100644 index 0000000..af25ed9 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_vi.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="vi"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">vi-VN,vi,fr-FR,fr,en-US,en</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_zh-CN.xtb b/chromecast/shell/settings/chromecast_settings_zh-CN.xtb new file mode 100644 index 0000000..173ce58 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_zh-CN.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="zh-CN"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">zh-CN,zh</translation> +</translationbundle> diff --git a/chromecast/shell/settings/chromecast_settings_zh-TW.xtb b/chromecast/shell/settings/chromecast_settings_zh-TW.xtb new file mode 100644 index 0000000..b7b0c07 --- /dev/null +++ b/chromecast/shell/settings/chromecast_settings_zh-TW.xtb @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<!DOCTYPE translationbundle> +<translationbundle lang="zh-TW"> +<translation id="IDS_CHROMECAST_SETTINGS_ACCEPT_LANGUAGES">zh-TW,zh,en-US,en</translation> +</translationbundle> diff --git a/chromecast/tools/build/chromecast_repack_locales.py b/chromecast/tools/build/chromecast_repack_locales.py new file mode 100755 index 0000000..607930a --- /dev/null +++ b/chromecast/tools/build/chromecast_repack_locales.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python +# Copyright 2014 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. + +"""Helper script to repack paks for a list of locales. + +Gyp doesn't have any built-in looping capability, so this just provides a way to +loop over a list of locales when repacking pak files, thus avoiding a +proliferation of mostly duplicate, cut-n-paste gyp actions. +""" + +import optparse +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', + 'tools', 'grit')) +from grit.format import data_pack + +# Some build paths defined by gyp. +GRIT_DIR = None +INT_DIR = None +CHROMECAST_BRANDING = None + +class Usage(Exception): + def __init__(self, msg): + self.msg = msg + + +def calc_output(locale): + """Determine the file that will be generated for the given locale.""" + #e.g. '<(INTERMEDIATE_DIR)/repack/da.pak', + # For Fake Bidi, generate it at a fixed path so that tests can safely + # reference it. + if locale == 'fake-bidi': + return '%s/%s.pak' % (INT_DIR, locale) + return os.path.join(INT_DIR, locale + '.pak') + + +def calc_inputs(locale): + """Determine the files that need processing for the given locale.""" + inputs = [] + if CHROMECAST_BRANDING == 'Chrome': + inputs.append(os.path.join(GRIT_DIR, 'app_strings_%s.pak' % locale)) + inputs.append(os.path.join(GRIT_DIR, 'chromecast_settings_%s.pak' % locale)) + return inputs + + +def list_outputs(locales): + """Returns the names of files that will be generated for the given locales. + + This is to provide gyp the list of output files, so build targets can + properly track what needs to be built. + """ + outputs = [] + for locale in locales: + outputs.append(calc_output(locale)) + # Quote each element so filename spaces don't mess up gyp's attempt to parse + # it into a list. + return " ".join(['"%s"' % x for x in outputs]) + + +def list_inputs(locales): + """Returns the names of files that will be processed for the given locales. + + This is to provide gyp the list of input files, so build targets can properly + track their prerequisites. + """ + inputs = [] + for locale in locales: + inputs += calc_inputs(locale) + # Quote each element so filename spaces don't mess up gyp's attempt to parse + # it into a list. + return " ".join(['"%s"' % x for x in inputs]) + + +def repack_locales(locales): + """ Loop over and repack the given locales.""" + for locale in locales: + inputs = [] + inputs += calc_inputs(locale) + output = calc_output(locale) + data_pack.DataPack.RePack(output, inputs) + + +def DoMain(argv): + global CHROMECAST_BRANDING + global GRIT_DIR + global INT_DIR + + parser = optparse.OptionParser("usage: %prog [options] locales") + parser.add_option("-i", action="store_true", dest="inputs", default=False, + help="Print the expected input file list, then exit.") + parser.add_option("-o", action="store_true", dest="outputs", default=False, + help="Print the expected output file list, then exit.") + parser.add_option("-g", action="store", dest="grit_dir", + help="GRIT build files output directory.") + parser.add_option("-x", action="store", dest="int_dir", + help="Intermediate build files output directory.") + parser.add_option("-b", action="store", dest="chromecast_branding", + help="Chromecast branding ('Chrome' or 'Chromium').") + options, locales = parser.parse_args(argv) + + if not locales: + parser.error('Please specificy at least one locale to process.\n') + + print_inputs = options.inputs + print_outputs = options.outputs + GRIT_DIR = options.grit_dir + INT_DIR = options.int_dir + CHROMECAST_BRANDING = options.chromecast_branding + + if CHROMECAST_BRANDING != "Chrome" and CHROMECAST_BRANDING != "Chromium": + parser.error('Chromecast branding (-b) must be "Chrome" or "Chromium".\n') + if not (GRIT_DIR and INT_DIR): + parser.error('Please specify all of "-g" and "-x".\n') + if print_inputs and print_outputs: + parser.error('Please specify only one of "-i" or "-o".\n') + + if print_inputs: + return list_inputs(locales) + + if print_outputs: + return list_outputs(locales) + + return repack_locales(locales) + +if __name__ == '__main__': + results = DoMain(sys.argv[1:]) + if results: + print results |