WeblateOrg / WeblateOrg/weblate

Undo uploading translations using the "Replace existing translation file" file upload mode

Open
#17,243 1 comment 0 reactions 0 assignees View on GitHub
Area: Processing Waiting for: Demand
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.