spiegel-keyman/resources/build/l10n
Darcy Wong c334665609 chore(common): Cleanup unused folders and update README
Crowdin CLI doesn't extract into a temporary .crowdin-tmp folder so that can be removed. (.crowdin-tmp was used in prior Bash scripts).

Also moved note about using a VPN to the wiki https://github.com/keymanapp/keyman/wiki/Crowdin-CLI
2020-03-30 11:03:22 +07:00
..
README.md chore(common): Cleanup unused folders and update README 2020-03-30 11:03:22 +07:00

Localization Maintenance

Localization for Keyman is maintained at https://crowdin.com/project/keyman The Crowdin CLI (v3) tool is used to automate downloading and updating files between Keyman and Crowdin. The configuration file for each platform is a YAML file named crowdin.yml.

On Windows, use crowdin.bat instead of crowdin for all the syntax below.

Add File

When adding new files to https://crowdin.com/project/keyman/settings#files also go to the file "Settings" and edit Resulting file after translations export:. This is where the translated files will appear in the Crowdin download (Keyman.zip) which also determines where the translated files get extracted locally into the Keyman project.

For example, android/KMEA/strings.xml string uses

/KMEA/app/src/main/res/values-%android_code%/strings.xml

Setup

Install the Crowdin CLI (v3) for your OS. Note, it has a prerequisite on Java 8.

Environment Variables

In Crowdin, create a personal access token and set it as an environment variable CROWDIN_PERSONAL_TOKEN.

Also copy the project id from API v2 and set it as an environment variable CROWDIN_PROJECT_ID.

Testing Crowdin CLI is Set Up Correctly

To check your CLI setup,

crowdin list project

You should see the CLI fetching project info and generating a list of files associated with the project.

Downloading from Crowdin

To download a platform's latest translations from Crowdin, open a command line at a platform's folder and run:

crowdin download

To download latest translations for the specific language:

crowdin download -l {language_code}

To display a list of latest translations from Crowdin:

crowdin download --dryrun

Uploading to crowdin

To upload source files to Crowdin:

crowdin upload sources