Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: README.md

Issue 29317015: Issue 2625 - [cms] Crowdin synchronisation script (Closed)
Left Patch Set: Addressed Wladimir's feedback Created July 2, 2015, 12:29 p.m.
Right Patch Set: Give query_params a default value Created July 16, 2015, 12:47 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | cms/bin/translate.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # CMS # 1 # CMS #
2 2
3 We use this CMS for [adblockplus.org](https://github.com/adblockplus/web.adblock plus.org/) 3 We use this CMS for [adblockplus.org](https://github.com/adblockplus/web.adblock plus.org/)
4 and related websites. It converts a directory with content data into static 4 and related websites. It converts a directory with content data into static
5 files. You are free to use it for other projects but please keep in mind that we 5 files. You are free to use it for other projects but please keep in mind that we
6 make no stability guarantees whatsoever and might change functionality any time. 6 make no stability guarantees whatsoever and might change functionality any time.
7 7
8 ## How to use ## 8 ## How to use ##
9 9
10 ### Running the test server ### 10 ### Running the test server ###
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 python -m cms.bin.generate_static_pages www_directory target_directory 71 python -m cms.bin.generate_static_pages www_directory target_directory
72 72
73 Here `www_directory` should be replaced by the path to your content directory. 73 Here `www_directory` should be replaced by the path to your content directory.
74 `target_directory` is the path where static files will be placed.. 74 `target_directory` is the path where static files will be placed..
75 75
76 ### Syncing translations ### 76 ### Syncing translations ###
77 77
78 Before syncing translations ensure the following: 78 Before syncing translations ensure the following:
79 79
80 - The `crowdin-project-name` setting has been set in the site's configuration. 80 - The `crowdin-project-name` setting has been set in the site's configuration.
81 - The [requests](http://docs.python-requests.org/en/latest/) Python module is 81 - The `urllib3` Python module is installed.
82 installed.
83 82
84 Now to sync with Crowdin type the following: 83 Now to sync with Crowdin type the following:
85 84
86 python -m cms.bin.translate www_directory crowdin_project_api_key [logging_l evel] 85 python -m cms.bin.translate www_directory crowdin_project_api_key [logging_l evel]
87 86
88 The script might take a while to run, it does the following things: 87 The script might take a while to run, it does the following things:
89 88
90 1. Requests information about your Crowdin project 89 1. Requests information about your Crowdin project
91 2. Checks all local locales are supported by Crowdin and enabled for your projec t 90 2. Checks all local locales are supported by Crowdin and enabled for your projec t
92 3. Renders all pages in your default language and extracts all page strings 91 3. Renders all pages in your default language and extracts all page strings
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 filter is invoked. For more information on Jinja2 filters see 285 filter is invoked. For more information on Jinja2 filters see
287 [official documentation](http://jinja.pocoo.org/docs/dev/api/#writing-filters). 286 [official documentation](http://jinja.pocoo.org/docs/dev/api/#writing-filters).
288 287
289 ### Custom functions and variables ### 288 ### Custom functions and variables ###
290 289
291 The `globals` directory can define custom Jinja2 globals which will be available 290 The `globals` directory can define custom Jinja2 globals which will be available
292 in all Jinja2 templates. Typically, this is used for custom functions. The file 291 in all Jinja2 templates. Typically, this is used for custom functions. The file
293 name should match the name of the function or variable to be defined, and export 292 name should match the name of the function or variable to be defined, and export
294 a variable with that name. E.g. `globals/myfunction.py` can define a function 293 a variable with that name. E.g. `globals/myfunction.py` can define a function
295 called `myfunction` that will become available to all Jinja2 templates. 294 called `myfunction` that will become available to all Jinja2 templates.
LEFTRIGHT

Powered by Google App Engine
This is Rietveld