spiegel-keyman/resources/build/l10n
Eberhard Beilharz 135121ed68
docs(common): Clarify l10n readme
Up- and download from Crowdin now happen automatically on GitHub
(at least once it's enabled again).
2020-08-21 11:41:36 +02:00
..
README.md docs(common): Clarify l10n readme 2020-08-21 11:41:36 +02:00

Localization Maintenance

Localization for Keyman is maintained at https://crowdin.com/project/keyman

Downloading and updating files between Keyman and Crowdin happens automatically on GitHub by way of the Crowdin git integration. The configuration file for all platforms is a YAML file named /crowdin.yml.

The only thing that needs to be done manually is to update crowdin.yml if new files get added (and of course translating the strings on the Crowdin website).

Manual up- and download with Crowdin CLI

The following describes how alternatively the Crowdin CLI (v3) tool could be used to automate downloading and updating files between Keyman and Crowdin.

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

/android/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, in the repo root folder,

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 the latest translations from Crowdin (all platforms), open a command line at the repo root 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

Tip

Microsoft offers a website that allows to check how terms used in Windows are translated in different languages: https://www.microsoft.com/en-us/language/Search.