GitHub (Txgh)

With Txgh, you can connect GitHub and Transifex together and integrate localization into your development process. Built by our friends at Strava, Txgh is a Sinatra server that serves as a bridge between Transifex and GitHub. It ensures you always have up-to-date translations in GitHub, and that your source content in Transifex are kept up-to-date with what's in GitHub.

Note

Txgh is written in Ruby on Rails. A Java fork of it is also available at this repository.

A free Amazon EC2 instance. The basic free Amazon Linux AMI should be enough. It comes with Ruby, Git and pretty much all you need. If you don't want to use EC2, you can use any kind of server with a recent version of Ruby installed with the ability to receive and send HTTP API traffic from the internet.

Maintainer access to your Transifex project.

The ability to add Service Hooks to your GitHub repo.

Once you've got your EC2 instance, connect to it using ssh. You'll do all your work from there. Take a note of its public DNS name, as you'll need it later.

If your Transifex project currently uses the Transifex Command Line Client, you probably have a Transifex config file checked into your repo. Its default location is under a .tx/ folder in the root of your git repo. If it doesn't contain one, use this support article to create one, or use this template:

Now, you can keep the server running and go configure the webhooks in Transifex and in GitHub:

How to configure webhooks in GitHub. You will want to point the new service hook you've created to: http://<public DNS name>:9292/hooks/github.

To configure your webhooks in Transifex, you will need to go to your project management page and point the webhook URL to: http://:9292/hooks/transifex.

That's it! While this starts the server in development mode in a free ec2 server, if you do any kind of larger scale development, you would probably want to run this on a more stable instance, in production mode, with appropriate monitoring. But once you've configured the webhooks, any change that makes a file be 100% translated in Transifex will trigger the server to push a new commit to GitHub with the updated translations files and any change in GitHub to the source files will trigger the server to update the source content in Transifex.