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

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: for landing 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
« no previous file with comments | « 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..825ee9b9eb29fc133aa5d1e50ea0fdd1ff2b42b0 100755
--- a/grit_info.py
+++ b/grit_info.py
@@ -67,15 +67,21 @@ 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():
+ # TODO(tdanderson): Refactor all places which perform the action of setting
+ # output attributes on the root. See crbug.com/503637.
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()
« no previous file with comments | « grit/tool/build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698