Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/57037


Change subject: When user modifies a translation, it should no longer be 
proofreadable
......................................................................

When user modifies a translation, it should no longer be proofreadable

Change-Id: Ice85a400663554e65755ff5eebc5f143923891bd
Fixes: The person icon signing "this is your own translation" does not appear.
Bug: 46687
Followup: I9218ee8a7dd308babe2f6a78eee1c4846c130367
---
M resources/css/ext.translate.proofread.css
M resources/js/ext.translate.proofread.js
2 files changed, 19 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/37/57037/1

diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
index e1ad24f..91a1d60 100644
--- a/resources/css/ext.translate.proofread.css
+++ b/resources/css/ext.translate.proofread.css
@@ -161,7 +161,7 @@
        color: #777777;
        display: inline-block;
        font-size: 13px;
-       padding-top: 35px;
+       padding-top: 10px;
        padding-right: 2px;
 }
 
diff --git a/resources/js/ext.translate.proofread.js 
b/resources/js/ext.translate.proofread.js
index 3f39366..222bfa3 100644
--- a/resources/js/ext.translate.proofread.js
+++ b/resources/js/ext.translate.proofread.js
@@ -135,9 +135,7 @@
                                        proofread.$message.find( 
'.tux-proofread-translation' )
                                                .text( translation );
                                        proofread.message.translation = 
translation;
-                                       proofread.$message.addClass( 
'own-translation' );
-                                       // Own translations cannot be reviewed, 
so hide the review button
-                                       proofread.disableProofread();
+                                       proofread.markSelfTranslation();
                                }
                        } );
 
@@ -207,12 +205,6 @@
                                                $( '<div>' )
                                                        .addClass( 
'tux-proofread-action-block one column' )
                                                        .append(
-                                                               
translatedBySelf ?
-                                                                       $( 
'<div>' )
-                                                                               
.addClass( 'translated-by-self' )
-                                                                               
.attr( 'title', mw.msg( 'tux-proofread-translated-by-self' ) )
-                                                                               
.tipsy( { gravity: 'e' } ):
-                                                                       $( [] ),
                                                                
$proofreadAction,
                                                                
otherReviewers.length ?
                                                                        $( 
'<div>' )
@@ -227,9 +219,7 @@
                        .addClass( this.message.properties.status );
 
                        if ( translatedBySelf ) {
-                               this.$message.addClass( 'own-translation' );
-                               // Own translations cannot be reviewed, so 
disable proofread
-                               this.disableProofread();
+                               this.markSelfTranslation();
                        }
 
                        /* Here we need to check that there are reviewers in 
the first place
@@ -245,6 +235,22 @@
                },
 
                /**
+                * Mark the message self translated.
+                */
+               markSelfTranslation: function () {
+                       // Own translations cannot be reviewed, so disable 
proofread
+                       this.disableProofread();
+                       if ( !this.$message.hasClass( 'own-translation' ) ) {
+                               this.$message.addClass( 'own-translation' )
+                                       .find( '.tux-proofread-action-block' )
+                                       .append( $( '<div>' )
+                                               .addClass( 'translated-by-self' 
)
+                                               .attr( 'title', mw.msg( 
'tux-proofread-translated-by-self' ) )
+                                               .tipsy( { gravity: 'e' } )
+                                       );
+                       }
+               },
+               /**
                 * Mark this message as proofread.
                 */
                proofread: function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice85a400663554e65755ff5eebc5f143923891bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to