We use Crowdin for localization. Bloom Reader's strings.xml is included in the general SIL-Bloom project in Crowdin and is aliased as Bloom Reader.
- Download the translations using the Crowdin plugin (see below). (Or manually download them and copy to the correct structure.)
- Run
processLocalizations.sh.- This remaps the language codes in the way we expect.
- At this point, existing files should be updated correctly.
- There will also be a bunch of new files added for languages we haven't included previously. Delete those.
- (Or decide to add them, thinking through what the language code should be. And update
processLocalizations.sh.)
- (Or decide to add them, thinking through what the language code should be. And update
Warning: with the current project settings in Crowdin, you will download all translated strings, even unapproved ones. Therefore, this process will add unapproved strings.
- Make sure you are on the
masterbranch. - After modifications have been made to
{BR root}/app/src/main/res/values/strings.xml, upload it using Crowdin plugin (see below).
Warning: This will also delete strings from Crowdin if the strings are not in the file.
The easiest way to upload new strings and download translations is through the Crowdin plugin for Android Studio.
The crowdin.yml file contains the project configuration.
- Install the Crowdin plugin from the JetBrains marketplace in Android Studio.
- Turn off the "Automatically upload sources" option in the Crowdin plugin settings.
a.
File->Settings->Tools->Crowdin. - Set your API token as an environment variable:
-
BLOOM_CROWDIN_TOKEN = your_api_token
The API token can be found in your Crowdin account settings if you have the appropriate permissions.
-
To upload source strings to Crowdin:
- In the Crowdin plugin UI, click the Upload tab.
- Click "Upload Sources".
To download translations from Crowdin:
- In the Crowdin plugin UI, click the Download tab.
- Click "Download Translations".
Warning: with the current project settings in Crowdin, you will download all translated strings, even unapproved ones.