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

Unified Diff: tools/grit/grit/format/policy_templates/template_formatter.py

Issue 6969064: Start generating translated policy templates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase+nit Created 9 years, 7 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 | « tools/grit/grit/format/policy_templates/policy_template_generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/format/policy_templates/template_formatter.py
diff --git a/tools/grit/grit/format/policy_templates/template_formatter.py b/tools/grit/grit/format/policy_templates/template_formatter.py
index 0e304afd1d6d5b3e59551cf80b6cdf459e4fef29..fdd5dd9517bceb9afac67b2ff8280e8815e1344c 100644
--- a/tools/grit/grit/format/policy_templates/template_formatter.py
+++ b/tools/grit/grit/format/policy_templates/template_formatter.py
@@ -94,7 +94,10 @@ class TemplateFormatter(interface.ItemFormatter):
if (isinstance(item, structure.StructureNode) and
item.attrs['type'] == 'policy_template_metafile'):
assert self._policy_data == None
- json_text = item.gatherer.Translate(self._lang)
+ json_text = item.gatherer.Translate(
+ self._lang,
+ pseudo_if_not_available=item.PseudoIsAllowed(),
+ fallback_to_english=item.ShouldFallbackToEnglish())
self._policy_data = eval(json_text)
for child in item.children:
self._ParseGritNodes(child)
« no previous file with comments | « tools/grit/grit/format/policy_templates/policy_template_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698