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

Unified Diff: grit/node/base.py

Issue 9958067: Fixing a bug in GRIT where messages with substitutions would (Closed) Base URL: https://grit-i18n.googlecode.com/svn/trunk
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « grit/clique_unittest.py ('k') | grit/node/misc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/node/base.py
diff --git a/grit/node/base.py b/grit/node/base.py
index 21388d3a8a27ca6c5a2991bffabef3549722f53b..defc4acdb552fa8a40c2cb32545fa2f25d4a5256 100644
--- a/grit/node/base.py
+++ b/grit/node/base.py
@@ -297,23 +297,15 @@ class Node(grit.format.interface.ItemFormatter):
return u''.join(inside_parts)
- def RunGatherers(self, recursive=0, debug=False):
+ def RunGatherers(self, recursive=0, debug=False, substitute_messages=False):
'''Runs all gatherers on this object, which may add to the data stored
by the object. If 'recursive' is true, will call RunGatherers() recursively
on all child nodes first. If 'debug' is True, will print out information
as it is running each nodes' gatherers.
-
- Gatherers for <translations> child nodes will always be run after all other
- child nodes have been gathered.
'''
if recursive:
- process_last = []
for child in self.children:
- if child.name == 'translations':
- process_last.append(child)
- else:
- child.RunGatherers(recursive=recursive, debug=debug)
- for child in process_last:
+ assert child.name != 'translations' # <grit> node overrides
child.RunGatherers(recursive=recursive, debug=debug)
def SubstituteMessages(self, substituter):
« no previous file with comments | « grit/clique_unittest.py ('k') | grit/node/misc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698