WordPress / wordpress.org

WordPress.org Meta, Git-ified. Synced from git://meta.git.wordpress.org/ This repository is just a mirror of the WordPress Meta subversion repository. Please include a link to a pre-existing ticket on https://meta.trac.wordpress.org/ with every pull request.
https://meta.trac.wordpress.org/
109 stars 140 forks source link

Delete a suggestion from TM #357

Open amieiro opened 1 month ago

amieiro commented 1 month ago

This PR adds a button, only for the GTE, in the suggestions from the translation memory, to be able to delete a suggestion from the translation memory. This button is added only if the similarity between the current original and the suggestion from the translation memory is 100%.

Button visible only for a Galician GTE in a Galician string.

image

If the user is not a GTE, she won't have this button. Image for a user who isn't a Spanish GTE in a Spanish string.

image

This PR needs to implement the delete method for the Translation_Memory_Client class, but first we need a new method in the https://translate.wordpress.com/api/tm/ API.

The AJAX request implements the POST method, instead the DELETE method, because we need to send some data in the request, and the DELETE method doesn't allow it.