aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.mkdn52
-rw-r--r--config/o8.0.yaml4
2 files changed, 49 insertions, 7 deletions
diff --git a/README.mkdn b/README.mkdn
index 24eaf18..90c4b09 100644
--- a/README.mkdn
+++ b/README.mkdn
@@ -15,7 +15,7 @@ Prerequisites
<code>source /home/your_username/.rvm/scripts/rvm #Add this to your ~/.bashrc file</code>
- <code>rvm all do gem install crowdin-cli </code>
+ <code>rvm all do gem install crowdin-cli</code>
2. Gitpython is used for Git integration and must be installed (also see: http://gitpython.readthedocs.io/en/stable/intro.html).
@@ -41,7 +41,7 @@ Needed directory structure:
* /o8.0
* /.repo
* /local_manifests/o8.0_extra_packages.xml
- * crowdin-cli_sync.py
+ * crowdin_sync.py
Enviroment variables to export:
@@ -54,17 +54,55 @@ Example:
export AICP_CROWDIN_BASE_PATH=~/aicp
Execute:
-(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)
+(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)
<code>./crowdin_sync.py --username your_gerrit_username --branch AICP_version [--upload-sources] [--upload-translations] [--download] </code>
+The script incorporates also a little help that can be invoked by executing:
+
+<code>./crowdin_sync.py --help</code>
+
+It will display the following:
+
+<pre>usage: crowdin_sync.py [-h] -u USERNAME -b BRANCH [-c CONFIG]
+ [--upload-sources] [--upload-translations] [--download]
+
+Synchronising AICP translations with Crowdin
+
+optional arguments:
+ -h, --help show this help message and exit
+ -u USERNAME, --username USERNAME
+ Gerrit username
+ -b BRANCH, --branch BRANCH
+ AICP branch
+ -c CONFIG, --config CONFIG
+ Custom yaml config
+ --upload-sources Upload sources to AICP Crowdin
+ --upload-translations
+ Upload AICP translations to Crowdin
+ --download Download AICP translations from Crowdin</pre>
+
+Examples:
+
+<code>./crowdin_sync.py --username GerritName --branch n7.1 --upload-sources</code>
+
+Will upload specified local files from the YAML-config to Crowdin. Translations already there will be preserved.
+
+<code>./crowdin_sync.py --username GerritName --branch n7.1 --upload-translations</code>
+
+Will upload local translations to Crowdin, based on YAML-config and from your local sources.
+
+<code>./crowdin_sync.py --username GerritName --branch n7.1 --download</code>
+
+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.
+
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 something like
- "Nothing to commit" or display error messages in the terminal!
+ are no new translations, so the script will not exit when this happens or just display
+ "Finished! Nothing to do or commit anymore." or display error messages in the terminal!
Submitting changes
------------------
diff --git a/config/o8.0.yaml b/config/o8.0.yaml
index 322fb14..b82c941 100644
--- a/config/o8.0.yaml
+++ b/config/o8.0.yaml
@@ -144,6 +144,10 @@ files:
source: '/frameworks/base/packages/SystemUI/res/values/aicp_strings.xml'
translation: '/%original_path%-%android_code%/%original_file_name%'
languages_mapping: *anchor
+ -
+ source: '/frameworks/base/packages/SystemUI/res-keyguard/values/aicp_strings.xml'
+ translation: '/%original_path%-%android_code%/%original_file_name%'
+ languages_mapping: *anchor
# Packages