Nikerabbit has uploaded a new change for review.
https://gerrit.wikimedia.org/r/54209
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, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate
refs/changes/09/54209/1
diff --git a/resources/js/ext.translate.editor.js
b/resources/js/ext.translate.editor.js
index f82300c..ee38e5c 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -157,15 +157,18 @@
* Record it to mark as hard.
*/
skip: function () {
- var translateEditor = this,
- api = new mw.Api();
+ var 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 device better algorithm
+ if ( this.$messageItem.is( '.fuzzy, .untranslated' ) ) {
+ // We can just ignore the result even if it
fails
+ 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: newchange
Gerrit-Change-Id: Ia558bfa2c02edf0df26b16b05dd5b0c38dac3043
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits