Versions Management

Localization That Does Not Delay the Releases

The biggest issue of agile localization is probably the fact that you should hold on the release until recently added texts are translated. The version’s management feature in Crowdin dramatically reduces the delays. This feature is also crucial for the projects that maintain more than one version.

Common App Localization Workflow

The common approach to apps localization looks like the following:

  • Developers are working on the changes in their own code branch
  • The branch is merged to the master or another pre-release branch similar to master and stays there until all of the newly added texts are translated

Main Issue

In most cases, application is simultaneously developed by few developers. They work in separate version branches, inside a version control system (GIT). A classic localization process is the following: new texts are uploaded from master branch to the translation server.

All texts from Branch 1 and Branch 2 will go to the translation server only after they are merged to the master, instead of being available for translation instantly.

Solution

With the new approach, the translation can start immediately after new texts appear in any of the code branches. When the feature branch is being merged to the pre-release or master branch, the translations for new texts will be ready for deployment.

Implementation in Crowdin

When your translators work on the project with all of the branches uploaded to Crowdin, the platform will highlight only the branches different to them. This means that translators will not translate the duplicates.

Start Using

To enable branches translation feature in your project, please, change the following setting via the Project Settings, General tab.

Any source text is considered as duplicate if there is the same text in the different version of the file (different branch), and it won’t be displayed to a translator. Being translated once, duplicated texts in other branches are populated with that translation automatically.

Version Branch Creation

In general, a branch in Crowdin is a regular directory marked with a special icon and behavior with duplicated strings. Branches can be created via the Project Settings, Files tab or via API/Synchronization tool (recommended).

If you use GitHub, Bitbucket or other VCS integration, selected for localization branches will be created in Crowdin automatically.

The example of a files structure in version control system and Crowdin:

Important! Project’s root directory also behaves with the duplicates as a separate version branch. You can store, for example, master’s files directly in project’s root, without placing them to a separate directory marked as a version branch.

Creating Branches via API

To create a branch via API, use the Add Directory method with is_branch=1 parameter:

POST https://api.crowdin.com/api/project/{project-identifier}/add-directory?key={project-key}&name={branch_name}&is_branch=1

Add File, Update File, Upload Translations and other methods that manipulate files and folders work with branch={branch_name} parameter.

Managing Branches with Synchronization Tool

There is no need to run a specific command to create version branches if the synchronization tool is used. The version branch would be created automatically while files uploading. Example of the source files/translations upload to the specified version branch:

$ crowdin-cli upload sources -b branch_name

$ crowdin-cli upload translations -b branch_name

Translations Export

Translations from all version branches are placed in one ZIP archive if they are downloaded through the web interface. Use the synchronization tool or API to download the version branches translations individually.

Translations Export via API

Export translations of the specified version branch:

GET https://api.crowdin.com/api/project/{project-identifier}/export?key={project-key}&branch={branch_name}

Download translations of the specified version branch:

GET https://api.crowdin.com/api/project/{project-identifier}/download/{package}.zip?key={project-key}&branch={branch_name}

Translations Export via Synchronization Tool

Download translations of the specified version branch:

$ crowdin-cli download -b branch_name

Merging Branches

Once the feature development is finished, an engineer merges the version branch with a master branch in the VCS. Consequently, the master branch will contain new texts from the feature branch. While synchronizing with Crowdin, all of the texts in the master branch are populated with translations made earlier in the appropriate branch.

After a sync of the updated master with Crowdin, the feature branch can be removed from Crowdin - translations stored in the master branch will remain.

The new workflow Crowdin recommends to implement:

It’s important to re-think and discuss the new workflow with the development team. The important thing to implement within the team is the agreement not to commit texts that probably will not go to the production.

GitHub Workflow & Crowdin

You can deploy your changes in the feature branch to verify them on production.