Plugin for Android Studio

This plugin lets you integrate your project in Android Studio with Crowdin. Upload new source strings and existing translations to the system instantly as well as download translations from your Crowdin project.

Opsætning

  1. Install the plugin via JetBrains Plugin repository.
  2. create a file with project credentials named crowdin.properties in the root directory of the project.
project-id=your-project-id api-token=personal-access-token

Source Files and Translations

The plugin will automatically find strings.xml file in the values directory, and if updated, the changes will be uploaded to Crowdin instantly. If you have more source files or the source file name differs from the default strings.xml, specify it in the sources parameter.

sources=file1.xml, file2.xml

By default, translations are exported to the Resources folder (**/resources/values-uk/strings.xml, **/resources/values-fr/strings.xml, …)

To set up your own source and translation pattern, use the following configuration in the crowdin.properties file:

files.source=/values/*.xml files.translation=/values-%android_code%/%original_file_name%

files.1.source=/another/path/*.xml files.1.translation=/another/path-%android_code%/%original_file_name%

Read more about the Placeholders to put the appropriate variables.

Note: Currently, %original_path% placeholder is not supported.

Additional Options

Til Android Studio-projekter, som benytter en git-VCS, opretter plugin’et automatisk korresponderende grene i Crowdin. Benytter du ikke grenfunktioner i Crowdin, så tilføj parameteren disable-branches=true i opsætningsfilen.

disable-branches=true

Tilføj auto-upload=false for at forhindre automatisk filoploading til Crowdin.

auto-upload=false

Afbenyttelse

To upload source files to Crowdin manually, use the menu Tools > Crowdin > Upload Sources or click the right mouse button on the file and select Upload to Crowdin.

To upload existing translations, use the menu Tools > Crowdin > Upload Translations.

To download translations from Crowdin, use the menu Tools > Crowdin > Download Translations.

Notater

  1. For versions 0.5.x see the branch 0.5.x. Please note that these versions are no longer supported.
  2. Migration from version 0.5.x to 1.x.x requires changes in your crowdin.properties file.

Var denne artikel nyttig?