WeblateOrg / WeblateOrg/weblate
Undo uploading translations using the "Replace existing translation file" file upload mode
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
### Describe the problem
When using the function to import whole translation files with the `replace` option set (https://docs.weblate.org/en/weblate-5.14.3/user/files.html#import-methods), as the documentation states, this replaces the whole translation with what is in the uploaded file.
If somebody decides to use this, not reading the documentation or [help text](https://github.com/WeblateOrg/weblate/pull/17238) and thinking they could update only their existing translations in the file, this would have an disastrous impact.
Because all translations are gone, and when restoring from backup .po files, the approval state as well as all comments, explanations, screenshots and history are missing.
### Solution brainstorm
Add an undo action for any uploaded files. Any translations changed/added after the upload need to be either undone as well or the user could be asked about them individually.
### Describe alternatives you have considered
Restore from backup.
### Screenshots
_No response_
### Additional context
This would be a safety feature for recovery - not sure how often this has happened in the wild.
Contributor guide
Assessment
This issue has not been assessed yet.