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

Unified Diff: grit_info.py

Issue 1194063002: grit: Add fallback_to_default_layout attribute to <output> (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« grit/node/io.py ('K') | « grit/tool/build.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit_info.py
diff --git a/grit_info.py b/grit_info.py
index ce52997991c3aee58546c5241b111ba4d334a59d..23bb27a61025f2c75fdfdc8a3027400860ebb6fe 100755
--- a/grit_info.py
+++ b/grit_info.py
@@ -67,15 +67,19 @@ def Inputs(filename, defines, ids_file, target_platform=None):
filename, debug=False, defines=defines, tags_to_ignore=set(['message']),
first_ids_file=ids_file, target_platform=target_platform)
files = set()
- for lang, ctx in grd.GetConfigurations():
+ for lang, ctx, fallback in grd.GetConfigurations():
grd.SetOutputLanguage(lang or grd.GetSourceLanguage())
grd.SetOutputContext(ctx)
+ grd.SetFallbackToDefaultLayout(fallback)
for node in grd.ActiveDescendants():
with node:
if (node.name == 'structure' or node.name == 'skeleton' or
(node.name == 'file' and node.parent and
node.parent.name == 'translations')):
- files.add(grd.ToRealPath(node.GetInputPath()))
+ path = node.GetInputPath()
+ if path is not None:
+ files.add(grd.ToRealPath(path))
+
# If it's a flattened node, grab inlined resources too.
if node.name == 'structure' and node.attrs['flattenhtml'] == 'true':
node.RunPreSubstitutionGatherer()
« grit/node/io.py ('K') | « grit/tool/build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698