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

Issue 6134006: Integrate user strings into the JSON policy template file (Closed)

Created:
9 years, 11 months ago by gfeher
Modified:
9 years, 7 months ago
Reviewers:
Jói, Jakob Kummerow
CC:
chromium-reviews, darin-cc_chromium.org, cbentzel+watch_chromium.org, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Integrate user strings into the JSON policy template file The new concept is the following: policy_templates.json contains all the data necessary to generate templates: policy names, English captions, descriptions, etc. This gets translated the following GRIT gatherer: policy_json.py. The text of the translated JSON file is then picked up, parsed, and passed to the writers by template_formatter.py. BUG=64898 TEST=PolicyJsonUnittest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71421

Patch Set 1 : " #

Total comments: 16

Patch Set 2 : addressed comments #

Patch Set 3 : split out SkeletonGatherer #

Total comments: 2

Patch Set 4 : fix nit and failing tests #

Patch Set 5 : rebase against cl 6137002 #

Patch Set 6 : fix mac and rebase against cl 6174002 #

Patch Set 7 : fix escaping and add tests #

Patch Set 8 : rebase against cl 5958014 and cl 6176005 #

Patch Set 9 : rebase? #

Patch Set 10 : fix policy_template_generator_test #

Total comments: 1

Patch Set 11 : address nit and rebase #

Patch Set 12 : " #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1943 lines, -1814 lines) Patch
M chrome/app/policy/policy_templates.grd View 1 2 3 4 5 6 7 1 chunk +0 lines, -847 lines 0 comments Download
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 36 chunks +743 lines, -192 lines 0 comments Download
M tools/grit/grit/format/policy_templates/policy_template_generator.py View 1 2 3 4 5 6 7 4 chunks +34 lines, -41 lines 0 comments Download
M tools/grit/grit/format/policy_templates/policy_template_generator_unittest.py View 1 2 3 4 5 6 7 8 9 9 chunks +194 lines, -177 lines 0 comments Download
M tools/grit/grit/format/policy_templates/template_formatter.py View 1 2 3 chunks +6 lines, -29 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writer_configuration.py View 1 2 chunks +1 line, -2 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/adm_writer.py View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/adm_writer_unittest.py View 1 2 3 4 5 6 7 11 chunks +104 lines, -90 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/adml_writer.py View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/adml_writer_unittest.py View 1 2 3 4 5 6 7 1 chunk +6 lines, -5 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/admx_writer.py View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/admx_writer_unittest.py View 1 2 3 4 5 6 7 1 chunk +1 line, -4 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/doc_writer.py View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py View 1 2 3 4 5 6 7 6 chunks +26 lines, -28 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/json_writer.py View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py View 1 2 3 4 5 6 7 18 chunks +45 lines, -59 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/plist_strings_writer_unittest.py View 1 2 3 4 5 6 7 9 chunks +87 lines, -63 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/plist_writer.py View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/plist_writer_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +42 lines, -57 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/reg_writer.py View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/reg_writer_unittest.py View 1 2 3 4 5 6 7 18 chunks +45 lines, -59 lines 0 comments Download
tools/grit/grit/format/policy_templates/writers/template_writer.py View 1 2 3 4 5 6 7 3 chunks +5 lines, -4 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/template_writer_unittest.py View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py View 1 3 chunks +5 lines, -8 lines 0 comments Download
M tools/grit/grit/gather/muppet_strings.py View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A tools/grit/grit/gather/policy_json.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +263 lines, -0 lines 0 comments Download
A tools/grit/grit/gather/policy_json_unittest.py View 1 2 3 4 5 6 1 chunk +178 lines, -0 lines 0 comments Download
M tools/grit/grit/gather/regexp.py View 1 2 3 chunks +3 lines, -106 lines 0 comments Download
A tools/grit/grit/gather/skeleton_gatherer.py View 1 2 3 4 5 6 1 chunk +127 lines, -0 lines 0 comments Download
M tools/grit/grit/node/structure.py View 1 3 chunks +3 lines, -3 lines 0 comments Download
M tools/grit/grit/test_suite_all.py View 1 2 3 4 5 6 2 chunks +2 lines, -18 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
gfeher
Please review. Jói: please look at the interfacing with GRIT Jakon: please look at the ...
9 years, 11 months ago (2011-01-10 20:49:30 UTC) #1
Jói
I may be misunderstanding some things, please see this first round of comments. I didn't ...
9 years, 11 months ago (2011-01-10 21:16:50 UTC) #2
Jakob Kummerow
the policy_templates/ folder LGTM. nits, as discussed offline: • you didn't update the copyright header ...
9 years, 11 months ago (2011-01-11 11:11:24 UTC) #3
gfeher
I've addressed a subset of comments. http://codereview.chromium.org/6134006/diff/14001/tools/grit/grit/gather/policy_json.py File tools/grit/grit/gather/policy_json.py (right): http://codereview.chromium.org/6134006/diff/14001/tools/grit/grit/gather/policy_json.py#newcode82 tools/grit/grit/gather/policy_json.py:82: self.skeleton_.append(self.uberclique.MakeClique(msg)) On 2011/01/10 ...
9 years, 11 months ago (2011-01-11 20:09:11 UTC) #4
Jói
Overall approach seems fine to me, see some responses to your comments below. Cheers, Jói ...
9 years, 11 months ago (2011-01-11 20:24:57 UTC) #5
gfeher
Please take another look. http://codereview.chromium.org/6134006/diff/14001/tools/grit/grit/gather/policy_json.py File tools/grit/grit/gather/policy_json.py (right): http://codereview.chromium.org/6134006/diff/14001/tools/grit/grit/gather/policy_json.py#newcode82 tools/grit/grit/gather/policy_json.py:82: self.skeleton_.append(self.uberclique.MakeClique(msg)) I probably won't need ...
9 years, 11 months ago (2011-01-12 12:18:32 UTC) #6
Jói
Thanks for the cleanup. Two things: a) I'm assuming all [ grit unit ] unit ...
9 years, 11 months ago (2011-01-12 14:45:59 UTC) #7
gfeher
> a) I'm assuming all [ grit unit ] unit tests pass after the refactoring. ...
9 years, 11 months ago (2011-01-12 18:27:23 UTC) #8
Jói
> If you tell me what kind of escaping-problems you are having > in mind, ...
9 years, 11 months ago (2011-01-12 18:49:58 UTC) #9
gfeher
I've fixed escaping and added tests. Please take a look.
9 years, 11 months ago (2011-01-13 12:15:30 UTC) #10
Jói
9 years, 11 months ago (2011-01-13 18:54:31 UTC) #11
LGTM

http://codereview.chromium.org/6134006/diff/84003/tools/grit/grit/gather/poli...
File tools/grit/grit/gather/policy_json.py (right):

http://codereview.chromium.org/6134006/diff/84003/tools/grit/grit/gather/poli...
tools/grit/grit/gather/policy_json.py:254: 
just one blank line between members

Powered by Google App Engine
This is Rietveld 408576698