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

Side by Side Diff: chrome/app/chrome_strings.scons

Issue 40246: Generate data packs for all languages and allow us to load (Closed)
Patch Set: comment Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 Import('env') 7 Import('env')
8 8
9 env = env.Clone() 9 env = env.Clone()
10 10
11 grd_files = [ 11 grd_files = [
12 '$CHROME_SRC_DIR/chrome/app/generated_resources.grd', 12 '$CHROME_SRC_DIR/chrome/app/generated_resources.grd',
13 '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd', 13 '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd',
14 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd', 14 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd',
15 '$CHROME_SRC_DIR/chrome/app/resources/locale_settings.grd', 15 '$CHROME_SRC_DIR/chrome/app/resources/locale_settings.grd',
16 ] 16 ]
17 17
18 for grd_file in grd_files: 18 for grd_file in grd_files:
19 # The fake target gets replaced with real targets when the GRIT Builder 19 # The fake target gets replaced with real targets when the GRIT Builder
20 # runs. 20 # runs.
21 generated = env.GRIT( 21 generated = env.GRIT(
22 '$TARGET_ROOT/grit_derived_sources/fake_' + os.path.basename(grd_file), 22 '$TARGET_ROOT/grit_derived_sources/fake_' + os.path.basename(grd_file),
23 grd_file) 23 grd_file)
24 24
25 if env.Bit('linux'): 25 languages = [ 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
26 # TODO(tc): Generate all the locales and handle official build vs chromium 26 'en-US', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'gu', 'he', 'hi', 'hr',
27 # build. 27 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', 'ml', 'mr', 'nl', 'nb',
28 lang_pak = env.Repack('$TARGET_ROOT/locales/en-US.pak', 28 'or', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'ta',
29 ['$TARGET_ROOT/grit_derived_sources/generated_resources_en-US.pak', 29 'te', 'th', 'tr', 'uk', 'vi', 'zh-CN', 'zh-TW' ]
30 '$TARGET_ROOT/grit_derived_sources/chromium_strings_en-US.pak', 30
31 '$TARGET_ROOT/grit_derived_sources/locale_settings_en-US.pak', 31 # TODO(tc): Handle official build vs chromium build. Currently we assume
32 # chromium builds only.
33 for lang in languages:
34 lang_pak = env.Repack('$TARGET_ROOT/locales/%s.pak' % lang,
35 ['$TARGET_ROOT/grit_derived_sources/generated_resources_%s.pak' % lang,
36 '$TARGET_ROOT/grit_derived_sources/chromium_strings_%s.pak' % lang,
37 '$TARGET_ROOT/grit_derived_sources/locale_settings_%s.pak' % lang,
32 ] 38 ]
33 ) 39 )
34 i = env.Install('$DESTINATION_ROOT/locales', lang_pak) 40 i = env.Install('$DESTINATION_ROOT/locales', lang_pak)
35 env.Requires('$DESTINATION_ROOT/chrome', i) 41
36 env.Requires('$DESTINATION_ROOT/unit_tests', i) 42 # Only require that en-US.pak is build when building chrome.
43 env.Requires('$DESTINATION_ROOT/chrome', '$DESTINATION_ROOT/locales/en-US.pak')
44 env.Requires('$DESTINATION_ROOT/unit_tests',
45 '$DESTINATION_ROOT/locales/en-US.pak')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698