Working with Git Branches

Translating software with branches often leads to nightmares: conflicts on translation files, lost translations, double translations, etc.

Let's say your production branch is master and you are working in a-feature-branch.

With most existing translation syncing tools, if a translation string/key is removed from master, it will also be removed from the translation server. If a-feature-branch still needs it, it would be lost. And so you will have to re-add it, and re-translate it.

Our Solution

With Translation.io, it is a little bit different : translation strings/keys of all branches are kept on the translation server. Some of them are shared because needed by all branches, some others are specific to a given branch.

What About Really Unused keys?

When at some point, you know all features have been merged into the current branch, and you want to remove all keys that are not used in the current branch. Then use the purge operation that will do exactly that.

To purge your project's translations :

rake translation:sync_and_purge

The former operation will do a regular sync plus a removal on the server of all keys that are not present anymore in the branch from where you are running the rake task.