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

Unified Diff: grit/node/structure.py

Issue 16539002: GRIT: Enable variable expansion in filenames during HTML inlining. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Created 7 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
Index: grit/node/structure.py
diff --git a/grit/node/structure.py b/grit/node/structure.py
index 99f20146c3517c4e8cf1fdfebb5dc874997711d0..9a8e5176ac4ea08a9827c2e3e68f8d1062d5d5ee 100644
--- a/grit/node/structure.py
+++ b/grit/node/structure.py
@@ -93,6 +93,8 @@ class StructureNode(base.Node):
if hasattr(self.GetRoot(), 'defines'):
self.gatherer.SetDefines(self.GetRoot().defines)
self.gatherer.SetAttributes(self.attrs)
+ if self.ExpandVariables():
+ self.gatherer.SetFilenameExpansionFunction(self._Substitute)
# Parse local variables and instantiate the substituter.
if self.attrs['variables']:
@@ -109,6 +111,8 @@ class StructureNode(base.Node):
is_skeleton=True)
skel.SetGrdNode(self) # TODO(benrg): Or child? Only used for ToRealPath
skel.SetUberClique(self.UberClique())
+ if self.ExpandVariables():
+ skel.SetFilenameExpansionFunction(self._Substitute)
flackr 2013/06/06 14:07:19 Hmm, we should be calling SetDefines here as well
dconnelly 2013/06/07 09:10:38 Done.
self.skeletons[child.attrs['expr']] = skel
def MandatoryAttributes(self):

Powered by Google App Engine
This is Rietveld 408576698