Skip to content

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

@philipp-kern

Description

@philipp-kern

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 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: ProcessingProcessing translations, parsing translation files.Waiting for: DemandLow priority for development. Pull requests welcome. Can be prioritized by sponsorship.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions