Different Branches

if I’m working on 3 different git branches of the state of the application, how could I make Transifex aware of this? None of these branches know about each other’s diffs, but we’d like to have all the net new translation keys in Transifex so we can have them available for translators to get started on.

1 Like

I would recommend the creation of an Agile Workflow using Transifex that allows you to make iterative developments/changes to your source files. According to your particular requirement to use only 3 branches, I would suggest that one branch will be the Master Branch, while the other two will be used for Development. Keep in mind there is no set limit of development branches, so you can expand the number of development branches at any time without affecting your workflow.

There are two workflows that will support this setup:

#1. A developer can work on a development branch, merge their changes to the master branch, then push resources from the Master Branch to Transifex. This workflow can be incorporated into Transifex in one of two ways:

a. Our New Git Hub Integration: With the new GitHub Integration you will be able to connect a localization project in Transifex with a specific repository in GitHub using only the Transifex user interface. Any new resources in Github are automatically pushed to Transifex, and any translations are automatically pulled into Github (When translations are 100% complete, or 100% reviewed or 100% proof-read). The benefit of this approach is that its pretty much point and click as it does not require the creation of pull requests, webhooks or the use of a Continuous integration tool. This integration is described here.

b. Our classic Git-Hub Integration using our CLI and/or API: This method is based on our API,.the CLI commands are used to execute a basic workflow with just two basic commands: TX -PUSH to create new resources in Transifex and a TX -PULL to transfer the finished translations to the Github master branch.

This last step of transferring finished translations to the master branch can be automated by creating web-hooks in your repository. Transifex can then trigger this web-hook when a translation is 100% completed, 100% reviewed, 100% proof-read or Auto-filled with our Translation memory. The first step of creating new resources can be automated by incorporating a CI (continuous integration tool). The classic Github integration is described here.

The API can be used to perform functions at a string level such as adding instructions, tags, character limits into our Transifex Editor for file formats that do not support metadata. (E.G JSON). On a resource level, the API can be used to perform functions such as updating a resource or retrieving translation statistics such as %Translated or the workload of specific translators.

To ensure that only net new translation keys are added, have developers only push resources with new strings to the master branch. If by accident duplicate strings are found, translation memory auto-fill will automatically populate the translation, however duplicate strings increase your word count.

#2 Each repository/dev Branch will push a Diff based on a comparison with the master branch to Transifex. This process will create a new resource, keeping the initial resource intact, allowing for incremental changes. Transifex can store an unlimited amount of resources. The new resource will only contain net new translation keys. As long as developers are assigned a different set of updates, the addition of existing source strings will be eliminated. This eliminates the addition of duplicate source strings.

The workflow for pushing a Diff is as follows:
a. From the development branch, push the diff to your local workstation.
b. From the development station, push the diff into Transifex as a new resource, using the CLI or API. This diff should only contain net new translation keys as long as the developers are assigned unique strings to work on.
c. Transfer the finished translations to the master branch automatically by creating web-hooks in your repository. Transifex can then trigger these web-hooks when a translation is 100% completed, 100% reviewed, 100% proof-read or Auto-filled with our Translation memory.

One more point is that each resource in Transifex is independent. This means that the source content that is hosted in one resource is not being affected by the source content that is hosted in another resource of the same project.

1 Like

Hi

What do you do with the ressource that contain only the diff one the branch have been merged in master ?

This sounds interesting. What would be the best way to go about creating a .po file that only includes the diff between the master .po file and the branched .po file?

We automatically extract .po files from our code - so only uploading the diff between .po files is difficult for us