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

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

Issue 347293003: Added support for string-enum-list. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 6 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
Index: grit/format/policy_templates/writers/doc_writer.py
===================================================================
--- grit/format/policy_templates/writers/doc_writer.py (revision 169)
+++ grit/format/policy_templates/writers/doc_writer.py (working copy)
@@ -116,7 +116,7 @@
# Replace URLs with links in the description.
self._AddTextWithLinks(parent, policy['desc'])
# Add list of enum items.
- if policy['type'] in ('string-enum', 'int-enum'):
+ if policy['type'] in ('string-enum', 'int-enum', 'string-enum-list'):
ul = self.AddElement(parent, 'ul')
for item in policy['items']:
if policy['type'] == 'int-enum':
@@ -379,7 +379,7 @@
self.AddText(parent, ', '.join(pieces))
elif policy_type == 'string-enum':
self.AddText(parent, '"%s"' % (example_value))
- elif policy_type == 'list':
+ elif policy_type in ('list', 'string-enum-list'):
self._AddListExample(parent, policy)
elif policy_type == 'dict':
self._AddDictionaryExample(parent, policy)
@@ -640,6 +640,7 @@
'int-enum': 'Integer',
'string-enum': 'String',
'list': 'List of strings',
+ 'string-enum-list': 'List of strings',
'dict': 'Dictionary',
'external': 'External data reference',
}

Powered by Google App Engine
This is Rietveld 408576698