3 min. read

Working with Git Branches

Michaël Hoste

Michaël Hoste

Founder & CEO

Who is Michaël?

Michaël is the founder of Translation.io. He is always interested in hearing your feedback on the product.

Feel free to get in touch: michael@translation.io

Illustrative image for the blog post 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
php artisan translation:sync_and_purge
npm run sync_and_purge

# Yarn
yarn sync_and_purge
npm run translation:sync -- --purge

# Yarn
yarn translation:sync -- --purge

This operation will do a regular sync plus a removal on the server of all keys that are not present anymore in the current branch.

Published on August 08, 2014
Ready to give it a try? Start your free 7-days trial