What repositories, branches, commits, pull requests and forks mean for translators, what access to ask a client for, and the mistakes that break a build.
By Andrés Lacruz · · 7 min read
Sooner or later a software client will say "the strings are on GitHub, can you open a pull request?" The first time I heard it, I nodded and then went to look up what a pull request was. If that is where you are now, this post is for you. You don't need to learn to code. You need about six words, a sense of who approves what, and a short list of things not to break.
GitHub's own glossary has formal definitions. Here is how they map to work you already do.
In most apps the interface text isn't written into the code. Each language gets its own file, often JSON, where every string has a key (a name the code uses) and a value (the text people read). The English file might say "checkout.title": "Your cart" and the Spanish file "checkout.title": "Tu carrito". The code asks for checkout.title and gets whichever language the user picked.
Keeping those files in the same repository as the code means the text and the app move together. When a developer adds a button, they add its English string in the same change. When the app is released, every language file comes from the same version. Nobody has to email spreadsheets around and wonder which one is current. For a translator, it also means the history of every string is right there.
When you open a pull request, a few things usually happen.
First, automatic checks run. Teams set up tests that build the app and check files, and their results appear on the PR as status checks. If the project requires them, a PR can't be merged until they pass. A broken JSON file or a missing key is often caught here, before a human even looks.
Then someone reviews it. On GitHub a reviewer can comment, approve, or request changes, and can comment on a specific line or suggest an exact change. It feels very much like a client reviewing your tracked changes in Word, only with a green and red diff instead of coloured underlines.
Finally someone merges it, and your translation becomes part of the main version.
There are two common setups, and it is worth asking which one your client uses.
The developers merge. You open the PR, a developer checks that nothing broke, and they merge it. They usually can't judge your Spanish, so in practice they are approving the format, not the translation. Fine for small teams, but it means nobody is reviewing the language unless a second linguist is involved.
The linguist approves translation files. GitHub lets a team name owners for parts of the repo in a CODEOWNERS file. A line like /locales/es/ @your-username makes you the owner of the Spanish folder. Code owners are automatically asked to review any PR that touches their files, and the repo owner can turn on "Require review from Code Owners" so those changes can't be merged without that approval. One catch from GitHub's docs is that code owners must have write permission on the repository, so this setup implies more trust than the first one.
If the client has the repo in an organization, GitHub has several roles. Read is meant for people who view or discuss the project, and Write is for people who push changes regularly. The useful detail is that the Read role can fork the repository and send pull requests from that fork.
That makes read access plus a fork the easy ask. You can see everything and propose changes, but you can't change their project directly, so nobody on their side has to worry about an accidental push to the main branch. Two things to know before you ask:
For a public project you don't even need to ask. If you edit a file in someone else's repository in the browser, GitHub forks it for you and helps you open the pull request.
None of these are translation mistakes in the classic sense, which is why they catch good translators off guard.
{{count}}, {name}, %s and tags like <0>…</0> are filled in or read by the code. Keep them exactly as they are, including the braces. You can move them within the sentence, but don't translate them, drop them or add spaces inside."checkout.title" into "checkout.título", the app looks for a key that no longer exists and shows the raw key or the English text instead.item_one and item_other](https://www.i18next.com/translation-function/plurals), while Arabic needs six forms from _zero to _other. Your language may need forms that English doesn't have, and adding them is part of the job.A QA check for missing tags and numbers catches a good part of this before the developer's checks do.
You can already open a JSON file in TraduQ CAT, translate it with your TM and termbase, and get it back in its own format, with placeholders shown as tags so they are hard to break. The list of software formats is on the formats page of the docs. What is still manual is getting the files out of GitHub and back in.
So we're building a GitHub connection for TraduQ CAT. It isn't public yet, and I'm testing it on TraduQ's own Spanish interface. Here is what it does.
The files go straight from your browser to GitHub and back, without passing through TraduQ's server, the same way the CAT keeps your documents on your computer today. The first version needs permission to open pull requests in the repository. Sending the PR from your own fork, for clients who give you read access only, and exporting the files to send by other means are planned next.
If your clients keep their strings on GitHub and you'd like to try it early, tell me. And if a developer asks you for a pull request tomorrow, you now know it is just tracked changes with better manners.
Andrés Lacruz — EN↔ES translator and creator of TraduQ