Git Product home page Git Product logo

crowdin's Introduction

crowdin_sync.py

Introduction

This script is used to synchronize SlimRom's translations with Crowdin's. Also, it can handle automatic commiting to Gerrit and pushing/downloading to/from Crowdin. Based on CyanogenMod's sync-script.

Prerequisites

The Ruby variant of crowdin-cli >= 0.5.2 is required for this to work.

\curl -sSL https://get.rvm.io | bash -s stable --ruby
source /home/your_username/.rvm/scripts/rvm # Add this to your .bashrc file!
rvm all do gem install crowdin-cli

python-git is used for Git integration.

sudo apt-get install python-git

Copy <omni_version>_extra_packages.xml to .repo/local_manifests of each <omni_version> tree to make sure you sync all the extra packages not included in the main manifest.

Executing

Export the following environment variables to set the API keys and the base path. Base path should contain all SlimRoms trees in subfolders, named after SlimRoms branches:

export SLIM_CROWDIN_API_KEY=your_api_key
export SLIM_CROWDIN_BASE_PATH=your_base_path

Execute:

./crowdin_sync.py --username your_gerrit_username --branch slim_version [--upload-sources] [--upload-translations] [--download]

Bugs

  • 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.

Submitting changes

This repository is preconfigured to use the git-review plugin. More information can be found at: https://pypi.python.org/pypi/git-review

You can upload your change to gerrit with commands like these:

git add *
git commit
git review

crowdin's People

Contributors

andi34 avatar chirayudesai avatar mikeng avatar therbom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.