blob: 31c1120d34430afa51d2fa3445dc32060df3fd8a [file] [log] [blame]
Marco Brohet3e5334a2014-02-28 01:16:37 +01001cm_crowdin_sync.py
2==================
3
4Introduction
5------------
6This script is used to synchronize CyanogenMod's translations with Crowdin's. It automatically creates cm_caf.xml files, containing
7CAF additions that cannot be seperated in CM source, based on the AOSP base file, and removes them after the push. Also, it can handle
8automatic commiting to Git and pushing/downloading to/from Crowdin.
9
Marco Brohet3e5334a2014-02-28 01:16:37 +010010Prerequisites
11-------------
12The Ruby variant of crowdin-cli is required for this to work.
Marco Brohet680098c2014-02-28 01:21:52 +010013
Marco Brohet3e5334a2014-02-28 01:16:37 +010014 \curl -sSL https://get.rvm.io | bash -s stable --ruby
15 source /home/therbom/.rvm/scripts/rvm # Add this to your .bashrc file!
16 rvm all do gem install crowdin-cli
Marco Brohet680098c2014-02-28 01:21:52 +010017
Marco Brohet3e5334a2014-02-28 01:16:37 +010018python-git is used for Git integration.
Marco Brohet680098c2014-02-28 01:21:52 +010019
Marco Brohet3e5334a2014-02-28 01:16:37 +010020 sudo apt-get install python-git
Marco Brohet680098c2014-02-28 01:21:52 +010021
Marco Brohet3e5334a2014-02-28 01:16:37 +010022The script is currently only python2 supported.
23
24Executing
25---------
Michael Bestas2ea4e102014-04-05 13:25:33 +030026Go to root of your local copy of CyanogenMod's source code and execute:
27
Marco Brohet3e5334a2014-02-28 01:16:37 +010028 ./cm_crowdin_sync.py
Marco Brohet (cobje)9229f9a2014-02-28 12:39:03 +010029
30Bugs
31----
Marco Brohet8b78a1b2014-02-28 21:01:26 +010032 - When committing fails, the reason of it cannot be determined. Often this is just when there
33 are no new translations, so the script will not exit when this happens.
Michael Bestas2ea4e102014-04-05 13:25:33 +030034
35Submitting changes
36------------------
37This repository is preconfigured to use the git-review plugin. More information can be found at:
38https://pypi.python.org/pypi/git-review
39
40You can upload your change to gerrit with commands like these:
41
42 git add *
43 git commit
44 git review