jenkins-bot has submitted this change and it was merged.
Change subject: Only record skipped fuzzy and untranslated as hard
......................................................................
Only record skipped fuzzy and untranslated as hard
Change-Id: Ia558bfa2c02edf0df26b16b05dd5b0c38dac3043
---
M resources/js/ext.translate.editor.js
1 file changed, 10 insertions(+), 9 deletions(-)
Approvals:
Amire80: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/js/ext.translate.editor.js
b/resources/js/ext.translate.editor.js
index f82300c..ca551d4 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -157,15 +157,16 @@
* Record it to mark as hard.
*/
skip: function () {
- var translateEditor = this,
- api = new mw.Api();
-
- api.post( {
- action: 'hardmessages',
- title: translateEditor.message.title,
- token: mw.user.tokens.get( 'editToken' )
- } );
- // We don't care about the result of the above ajax call
+ // Only record skips of fuzzy or untranslated as hards
+ // @TODO devise better algorithm
+ if ( this.$messageItem.is( '.fuzzy, .untranslated' ) ) {
+ // We can just ignore the result even if it
fails
+ new mw.Api().post( {
+ action: 'hardmessages',
+ title: this.message.title,
+ token: mw.user.tokens.get( 'editToken' )
+ } );
+ }
},
/**
--
To view, visit https://gerrit.wikimedia.org/r/54209
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia558bfa2c02edf0df26b16b05dd5b0c38dac3043
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits