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

Unified Diff: tools/grit/grit/format/policy_templates/writers/doc_writer.py

Issue 6134006: Integrate user strings into the JSON policy template file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 11 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: tools/grit/grit/format/policy_templates/writers/doc_writer.py
diff --git a/tools/grit/grit/format/policy_templates/writers/doc_writer.py b/tools/grit/grit/format/policy_templates/writers/doc_writer.py
index 320e79dd3b610b5bba83e0b6ebea5a7fc48ec960..8350e78f19608fd836b5052d8be92da337c41e7b 100644
--- a/tools/grit/grit/format/policy_templates/writers/doc_writer.py
+++ b/tools/grit/grit/format/policy_templates/writers/doc_writer.py
@@ -9,12 +9,12 @@ from xml.dom import minidom
from grit.format.policy_templates.writers import xml_formatted_writer
-def GetWriter(config, messages):
+def GetWriter(config):
'''Factory method for creating DocWriter objects.
See the constructor of TemplateWriter for description of
arguments.
'''
- return DocWriter(['*'], config, messages)
+ return DocWriter(['*'], config)
class DocWriter(xml_formatted_writer.XMLFormattedWriter):
@@ -41,7 +41,7 @@ class DocWriter(xml_formatted_writer.XMLFormattedWriter):
Returns:
The localized message.
'''
- return self.messages['IDS_POLICY_DOC_' + msg_id.upper()]
+ return self.messages['doc_' + msg_id]['text']
def _MapListToString(self, item_map, items):
'''Creates a comma-separated list.

Powered by Google App Engine
This is Rietveld 408576698