Skip to content

SuperiorOS/crowdin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localized

Crowdin

crowdin_sync.py

Introduction

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

Prerequisites

crowdin-cli is required, check instructions at https://github.com/crowdin/crowdin-cli#installation

Install requirements using:

pip install -r requirements.txt

Setup translation source:

repo init -u https://github.com/SuperiorOS/manifest -b fourteen -m crowdin.xml --depth=1

Executing

Export the following environment variables to set the API keys and the base path.

export CROWDIN_API_KEY=your_api_key
export CROWDIN_BASE_PATH=your_base_path

Execute:

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

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.