Marco Brohet | 3e5334a | 2014-02-28 01:16:37 +0100 | [diff] [blame] | 1 | cm_crowdin_sync.py |
| 2 | ================== |
| 3 | |
| 4 | Introduction |
| 5 | ------------ |
| 6 | This script is used to synchronize CyanogenMod's translations with Crowdin's. It automatically creates cm_caf.xml files, containing |
| 7 | CAF additions that cannot be seperated in CM source, based on the AOSP base file, and removes them after the push. Also, it can handle |
| 8 | automatic commiting to Git and pushing/downloading to/from Crowdin. |
| 9 | |
Marco Brohet | 3e5334a | 2014-02-28 01:16:37 +0100 | [diff] [blame] | 10 | Prerequisites |
| 11 | ------------- |
| 12 | The Ruby variant of crowdin-cli is required for this to work. |
Marco Brohet | 680098c | 2014-02-28 01:21:52 +0100 | [diff] [blame] | 13 | |
Marco Brohet | 3e5334a | 2014-02-28 01:16:37 +0100 | [diff] [blame] | 14 | \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 Brohet | 680098c | 2014-02-28 01:21:52 +0100 | [diff] [blame] | 17 | |
Marco Brohet | 3e5334a | 2014-02-28 01:16:37 +0100 | [diff] [blame] | 18 | python-git is used for Git integration. |
Marco Brohet | 680098c | 2014-02-28 01:21:52 +0100 | [diff] [blame] | 19 | |
Marco Brohet | 3e5334a | 2014-02-28 01:16:37 +0100 | [diff] [blame] | 20 | sudo apt-get install python-git |
Marco Brohet | 680098c | 2014-02-28 01:21:52 +0100 | [diff] [blame] | 21 | |
Marco Brohet | 3e5334a | 2014-02-28 01:16:37 +0100 | [diff] [blame] | 22 | The script is currently only python2 supported. |
| 23 | |
| 24 | Executing |
| 25 | --------- |
Michael Bestas | 2ea4e10 | 2014-04-05 13:25:33 +0300 | [diff] [blame^] | 26 | Go to root of your local copy of CyanogenMod's source code and execute: |
| 27 | |
Marco Brohet | 3e5334a | 2014-02-28 01:16:37 +0100 | [diff] [blame] | 28 | ./cm_crowdin_sync.py |
Marco Brohet (cobje) | 9229f9a | 2014-02-28 12:39:03 +0100 | [diff] [blame] | 29 | |
| 30 | Bugs |
| 31 | ---- |
Marco Brohet | 8b78a1b | 2014-02-28 21:01:26 +0100 | [diff] [blame] | 32 | - 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 Bestas | 2ea4e10 | 2014-04-05 13:25:33 +0300 | [diff] [blame^] | 34 | |
| 35 | Submitting changes |
| 36 | ------------------ |
| 37 | This repository is preconfigured to use the git-review plugin. More information can be found at: |
| 38 | https://pypi.python.org/pypi/git-review |
| 39 | |
| 40 | You can upload your change to gerrit with commands like these: |
| 41 | |
| 42 | git add * |
| 43 | git commit |
| 44 | git review |