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

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
« no previous file with comments | « grit/gather/interface.py ('k') | grit/node/structure_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/node/structure.py
===================================================================
--- grit/node/structure.py (revision 124)
+++ grit/node/structure.py (working copy)
@@ -93,6 +93,8 @@
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,10 @@
is_skeleton=True)
skel.SetGrdNode(self) # TODO(benrg): Or child? Only used for ToRealPath
skel.SetUberClique(self.UberClique())
+ if hasattr(self.GetRoot(), 'defines'):
+ skel.SetDefines(self.GetRoot().defines)
+ if self.ExpandVariables():
+ skel.SetFilenameExpansionFunction(self._Substitute)
self.skeletons[child.attrs['expr']] = skel
def MandatoryAttributes(self):
« no previous file with comments | « grit/gather/interface.py ('k') | grit/node/structure_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698