From ef9f053eb64db3c1140549ba7eae1b3a55e30f78 Mon Sep 17 00:00:00 2001 From: Ralf Luther Date: Mon, 6 Nov 2017 13:27:30 +0100 Subject: Forgot to push the ReadMe update... --- README.mkdn | 92 ++++--------------------------------------------------------- 1 file changed, 6 insertions(+), 86 deletions(-) diff --git a/README.mkdn b/README.mkdn index 3417804..24eaf18 100644 --- a/README.mkdn +++ b/README.mkdn @@ -1,85 +1,5 @@ -A.) crowdin_sync.py (JAR version) -=============================== - -Introduction ------------- -This script is forked and modified from LineageOS and used to synchronize AICP translations with Crowdin. Also, it can handle -automatic commiting to Gerrit and pushing/downloading to/from Crowdin. - -As it might be easier to use, it is the preferred way. - -Prerequisites -------------- -1. The Crowdin Console Client (CLI) pre-build JAR >= 0.5.2 (see: https://github.com/crowdin/crowdin-cli) is required for this to work. - You can either build it yourself or download the latest standalone Java application and install it - from here: https://downloads.crowdin.com/cli/v1/crowdin-cli.jar - - Please make sure you have JAVA >=1.7.55 installed! - Now just copy the crowdin-cli.jar to the base directory of your ROM sources (e.g. /home/your_username/aicp), - where the crowdin_sync.py must reside too. - To make the Jar work with the Phython script, add the following line to your ~/.bashrc file (on Linux): - - alias crowdin='java -jar crowdin-cli.jar' - -2. Gitpython is used for Git integration and must be installed (also see: http://gitpython.readthedocs.io/en/stable/intro.html). - -3. Copy /config/AICP_version_extra_packages.xml to .repo/local_manifests of each "AICP_version" tree. - This makes sure you will sync all the extra packages not included in the main manifest. - Please remember that you should comment out the packages you already have in your local aicp_manifest.xml file - as these are device dependent! - -Executing ---------- -Export the needed environment variables to set the API key and the base path. -Base path should contain all AICP trees in subfolders, named after AICP branches. - -Needed directory structure: - -* /home - * /your_username - * /aicp - * /config/.yaml #all YAML config files go in here! - * /n7.1 - * /.repo - * /local_manifests/n7.1_extra_packages.xml - * /o8.0 - * /.repo - * /local_manifests/o8.0_extra_packages.xml - * crowdin_sync.py - * crowdin-cli.jar - -Enviroment variables to export: - - export AICP_CROWDIN_API_KEY=aicp_api_key - export AICP_CROWDIN_BASE_PATH=your_base_path - -Example: - - export AICP_CROWDIN_API_KEY=54e01e81--your-api-key--f6a2724a #Can be found in your project settings page! - export AICP_CROWDIN_BASE_PATH=~/aicp - -Execute: - -./crowdin_sync.py --username your_gerrit_username --branch AICP_version [--upload-sources] [--upload-translations] [--download] - -Examples: - -./crowdin_sync.py --username GerritName --branch n7.1 --upload-sources - -Will upload specified local files from the YAML-config to Crowdin. Translations already there will be preserved. - -./crowdin_sync.py --username GerritName --branch n7.1 --upload-translations - -Will upload local translations to Crowdin, based on YAML-config and from your local sources. - -./crowdin_sync.py --username GerritName --branch n7.1 --download - -Will download translations from Crowdin of the specified branch (n7.1), based on YAML-config, to your local sources, delete empty translations and -upload updated or new translations to Gerrit for review. - - -B.) crowdin-cli_sync.py (Ruby version) -====================================== +crowdin_sync.py +============== Introduction ------------ @@ -134,16 +54,16 @@ Example: export AICP_CROWDIN_BASE_PATH=~/aicp Execute: -(the python script "crowdin-cli_sync.py" and the "config" directory should be copied into the base +(the python script "crowdin_sync.py" and the "config" directory should be copied into the base folder structure, e.g. /home/your_username/aicp, like shown above) -./crowdin-cli_sync.py --username your_gerrit_username --branch AICP_version [--upload-sources] [--upload-translations] [--download] +./crowdin_sync.py --username your_gerrit_username --branch AICP_version [--upload-sources] [--upload-translations] [--download] -Bugs in both scripts +Bugs in the script -------------------- - When committing fails, the reason of it cannot be determined. Often this is just when there - are no new translations, so the script will not exit when this happens or just display + are no new translations, so the script will not exit when this happens or just display something like "Nothing to commit" or display error messages in the terminal! Submitting changes -- cgit v1.2.3