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

Side by Side Diff: docs/usage/syncing-translations.md

Issue 29628724: Issue 5521 - Restructure CMS documentation to make it easier to use and extend (Closed) Base URL: https://hg.adblockplus.org/cms
Patch Set: Add initial API docs Created Dec. 13, 2017, 11:08 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Syncing translations #
2
3 Before syncing translations ensure the following:
4
5 - The `crowdin-project-name` setting has been set in the site's configuration.
6 - The `urllib3` Python module is installed.
7
8 Now to sync with Crowdin type the following:
9
10 python -m cms.bin.translate www_directory crowdin_project_api_key [logging_l evel]
11
12 The script might take a while to run, it does the following things:
13
14 1. Requests information about your Crowdin project
15 2. Checks all local locales are supported by Crowdin and enabled for your projec t
16 3. Renders all pages in your default language and extracts all page strings
17 4. Creates any required directories in your Crowdin project
18 5. Uploads any new page strings and updates any existing page strings
19 6. Uploads any pre-existing translation files for any newly uploaded pages
20 7. Requests Crowdin generate a fresh translations export archive
21 8. Downloads the archive of translations and extracts it replacing all local
22 translation files
23
24 Notes:
25
26 - You have to use the Crowdin project's API key, not your account API key
27 - You should probably enable "Skip untranslated strings" under your
28 project settings.
29 - Translations are only _uploaded_ for new files. If you are syncing with
30 Crowdin for the first time, and you have existing translation files pay
31 attention to any warnings. If there are any problems it is recommended
32 you re-create another fresh Crowdin project and try again. (Otherwise
33 translations for the pages already uploaded could be lost!)
34 - If you are running the script from a cronjob or similar you will probably
35 want to set the logging level to `ERROR` or similar
OLDNEW

Powered by Google App Engine
This is Rietveld