Pull requests
Removed and renamed keys
When a push removes a key from your base language file, TolkBot removes its translations in each language's pull request. When a push renames a key, the translation moves to the new name.
A key removed from the source
TolkBot compares the base language file before and after each push to your default branch. Every key the file lost has its translation removed in that language's pull request, and the pull request counts it under Keys removed.
A plural goes as a group. With i18next suffix plurals, removing items_other from the English file also removes items_few and items_many from the Polish file, since those forms were translated from it. See Placeholders and plurals.
Only a push triggers this. A translation whose key was already missing from the base file before you connected the project, or that never was in the base file while TolkBot watched it, is in no push, so TolkBot leaves it alone. The Translations screen shows those keys, and you can remove them there with Remove.
Translations a person owns are kept
A translation a person wrote can be meant for that language only, so TolkBot doesn't remove it. It is kept when someone:
- wrote or edited it in the dashboard, or edited it in the repository after TolkBot wrote it
- locked the key
- has a draft for the key that isn't submitted yet
The pull request lists these under Source removed, translation kept, with the keys. Remove them by hand if they aren't needed.
Setting up a language that keeps the translations already in the repository marks every one of them as written by a person, so none of those is ever removed this way. Translations TolkBot writes afterwards are its own. See Adding a language.
The guard for large removals
Some pushes look like removals but aren't. TolkBot removes nothing from a file when the push:
- removed at least 10 keys and more than 40% of the file, which usually means keys moved to another file or were renamed in bulk
- deleted the base language file
- left the base language file empty, or in a state TolkBot couldn't read
The pull request lists these under Translations not removed, with the file and a sample of the keys. Their translations stay until a person removes them.
A renamed key
When a push removes one key and adds another with exactly the same text, in the same file, TolkBot treats it as a rename. The translation moves to the new key instead of being translated again, so it costs no credits, and the pull request counts it under Carried to renamed keys, naming the old and new key.
What belonged to the old key moves with it: a translation a person wrote stays theirs, and a locked key stays locked.
A rename is recognized only when the text pairs exactly one removed key with one added key. If two removed keys and one added key all say "Cancel", nothing is carried and the new key is translated like any other. A key moved to another file is a removal in one file and a new key in the other.
Keys TolkBot added itself
A key can exist only because TolkBot's open pull request added it: you added promo.banner to the base file, TolkBot translated it, and then you removed promo.banner again before merging. Left alone, the pull request would merge a translation with no source into your repository.
So the next run takes it back out of the pull request. It counts under Keys removed like any other removal. If a person edited the key on the pull request's branch, locked it or is drafting it, it stays, and the pull request lists it under Kept although the source no longer has it.
Turning it off
Remove translations when a key is removed from the source, under the project's Settings → Workflow, is on by default. With it off, the translations of removed keys stay in your files until you remove them, and a renamed key keeps its old translation as well as getting a copy at the new name. Keys TolkBot added to its own pull request are removed either way. See Workflow settings.