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

Unified Diff: grit/tool/build.py

Issue 669763002: Apply whitelist file to structure elements. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: fix indent Created 6 years, 2 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/testdata/whitelist_strings.grd ('k') | grit/tool/build_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/tool/build.py
diff --git a/grit/tool/build.py b/grit/tool/build.py
index 537e2c64d99e8c307e4b2e6eee511bd87f26627b..0566df6864f715f31691f77f71e8765125233b7c 100644
--- a/grit/tool/build.py
+++ b/grit/tool/build.py
@@ -224,11 +224,13 @@ are exported to translation interchange files (e.g. XMB files), etc.
# be written into the target files (skip markers).
from grit.node import include
from grit.node import message
+ from grit.node import structure
for node in start_node:
# Same trick data_pack.py uses to see what nodes actually result in
# real items.
if (isinstance(node, include.IncludeNode) or
- isinstance(node, message.MessageNode)):
+ isinstance(node, message.MessageNode) or
+ isinstance(node, structure.StructureNode)):
text_ids = node.GetTextualIds()
# Mark the item to be skipped if it wasn't in the whitelist.
if text_ids and text_ids[0] not in whitelist_names:
« no previous file with comments | « grit/testdata/whitelist_strings.grd ('k') | grit/tool/build_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698