Problem statement
Consider a repository configured as follows:
- The repository has a main branch for new development, and release branches for maintenance of released versions
- The
mainbranch is linked to a “main” project on Transifex - Each release branch is linked to a corresponding release project on Transifex. For example:
- The
release-1.xbranch is linked to a “1.x” project on Transifex - The
release-2.xbranch is linked to a “2.x” project on Transifex
- The
- All branches have the same directory structure.
- All integrations are configured to push translations by creating pull requests
I would like to note that a repository configured this way would not be a good candidate for the documented multi-branching functionality, which is designed for allowing translation work to begin before feature branches are merged. The release branches are not feature branches, and will never be merged.
This configuration exposes a major issue with the Transifex GitHub app integration: every project uses the same branch naming when creating PRs.
For example, if the aforementioned repository had the following resources:
resource-baseresource-extra
Edit: This is specifically an issue when the resources in each project are using the same slug. The following example assumes
resource-baseis the slug for the resource in both the “1.x” and “2.x” Transifex projects.
and a language (es_419 for example) was updated to pass the sync threshold in both 1.x and 2.x, then we would see:
- A string is updated in language
es_419in theresource-baseresource in the “1.x” project. The resource is over the threshold so a sync is queued. - PR “A” is created with
release-1.xas the base branch, andtranslations_resource-base_es_419as the head branch. - We assume PR “A” has not yet been merged.
- A string is updated in language
es_419in theresource-baseresource in the “2.x” project. The resource is over the threshold so a sync is queued. - The base branch of PR “A” is
release-1.x, which doesn’t match therelease-2.xbase branch of the translations the sync is trying to push.- It doesn’t make sense to try to add a commit to the existing
translations_resource-base_es_419head branch.
- It doesn’t make sense to try to add a commit to the existing
- PR “A” is closed, and PR “B” is created with
release-2.xas the base branch, andtranslations_resource-base_es_419as the head branch.
This causes extreme amounts of PR churn when strings are updated in multiple Transifex projects simultaneously.
In the case of the Open edX project, this resulted in over 19,000 PRs being created over the course of 2 days.
Proposed solution
I would like to propose a new sync content option for the Transifex GitHub app integration: “Pull request branch prefix”
It is currently possible to configure a commit message prefix, and a pull request title prefix. If it was also possible to configure a branch prefix, then the previously described scenario could have instead played out as:
- A string is updated in language
es_419in theresource-baseresource in the “1.x” project. The resource is over the threshold so a sync is queued. - PR “A” is created with
release-1.xas the base branch, and1x_translations_resource-base_es_419as the head branch. - We assume PR “A” has not yet been merged.
- A string is updated in language
es_419in theresource-baseresource in the “2.x” project. The resource is over the threshold so a sync is queued. - PR “B” is created with
release-2.xas the base branch, and2x_translations_resource-base_es_419as the head branch.
In this scenario, the PR head branches would not conflict at all, so the Transifex GitHub app integration would not need to close PR “A” in order to create PR “B”
Closing thoughts
I do not mean to imply that my proposed solution is the only solution to this issue. I am just hoping to demonstrate how given the additional setting it would be possible to avoid the issue I encountered.
I’m looking forward to hearing other thoughts on how to address this!
Thank you so much for reading this!

