Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug 1382535: Keep translations on delete #652

Merged
merged 1 commit into from
Jul 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion pontoon/base/static/js/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,9 @@ var Pontoon = (function (my) {

// Last translation deleted, no alternative available
} else {
$('#clear').click();
if (self.cachedTranslation === $('#translation').val()) {
$('#clear').click();
}
Copy link
Collaborator Author

@mathjazz mathjazz Jul 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens here is now is that we check if the text in the translation input is different than the last active translations (cachedTranslation). If yes, we don't clear the input.


if (entity.body && pluralForm === 0) {
self.postMessage("DELETE", {
Expand Down