jenkins-bot has submitted this change and it was merged.

Change subject: Avoid suggesting current translation from translation memory
......................................................................


Avoid suggesting current translation from translation memory

Bug: 40711
Change-Id: Iba482a27ffb2cedc46097e6138512701c0e538f9
---
M resources/js/ext.translate.editor.helpers.js
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/js/ext.translate.editor.helpers.js 
b/resources/js/ext.translate.editor.helpers.js
index d489983..b002731 100644
--- a/resources/js/ext.translate.editor.helpers.js
+++ b/resources/js/ext.translate.editor.helpers.js
@@ -282,6 +282,11 @@
                                var $translation,
                                        alreadyOnTheList = false;
 
+                               if ( translation.local && translation.location 
=== translateEditor.message.title ) {
+                                       // Do not add self-suggestions
+                                       return true;
+                               }
+
                                // See if it is already listed, and increment 
use count
                                $tmSuggestions.find( '.tm-suggestion' ).each( 
function () {
                                        var $uses, count,

-- 
To view, visit https://gerrit.wikimedia.org/r/65415
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba482a27ffb2cedc46097e6138512701c0e538f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to