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 | --------- |
Marco Brohet | 680098c | 2014-02-28 01:21:52 +0100 | [diff] [blame] | 26 | Go to root of your local copy of CyanogenMod's source code |
Marco Brohet | 3e5334a | 2014-02-28 01:16:37 +0100 | [diff] [blame] | 27 | ./cm_crowdin_sync.py |
Marco Brohet (cobje) | 9229f9a | 2014-02-28 12:39:03 +0100 | [diff] [blame] | 28 | |
| 29 | Bugs |
| 30 | ---- |
Marco Brohet | 8b78a1b | 2014-02-28 21:01:26 +0100 | [diff] [blame] | 31 | - When committing fails, the reason of it cannot be determined. Often this is just when there |
| 32 | are no new translations, so the script will not exit when this happens. |