summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/resources/js/ext.translate.special.translationstash.js')
-rw-r--r--MLEB/Translate/resources/js/ext.translate.special.translationstash.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/MLEB/Translate/resources/js/ext.translate.special.translationstash.js b/MLEB/Translate/resources/js/ext.translate.special.translationstash.js
index a6a94120..6a9b8587 100644
--- a/MLEB/Translate/resources/js/ext.translate.special.translationstash.js
+++ b/MLEB/Translate/resources/js/ext.translate.special.translationstash.js
@@ -68,7 +68,7 @@
// unicode-bidi: isolate
// is supported everywhere
$( '<span>' )
- .html( $( 'body' ).hasClass( 'rtl' ) ? '&rlm;' : '&lrm;' ),
+ .html( $( document.body ).hasClass( 'rtl' ) ? '&rlm;' : '&lrm;' ),
$( '<span>' )
.addClass( 'tux-list-translation' )
.attr( {
@@ -82,6 +82,13 @@
.append(
$( '<span>' )
.addClass( statusClass )
+ // The following messages are used here:
+ // * tux-status-optional
+ // * tux-status-fuzzy
+ // * tux-status-proofread
+ // * tux-status-translated
+ // * tux-status-saving
+ // * tux-status-unsaved
.text( statusMsg ? mw.msg( statusMsg ) : '' )
),
$( '<div>' )
@@ -167,7 +174,7 @@
getMessages( messagegroup, $messageTable.data( 'targetlangcode' ) )
.done( function ( result ) {
- var untranslated, messages = result.query.messagecollection;
+ var $untranslated, messages = result.query.messagecollection;
$messageTable.empty();
$.each( messages, function ( index, message ) {
@@ -184,11 +191,11 @@
} );
// Show the editor for the first untranslated message.
- untranslated = $( '.tux-message' )
+ $untranslated = $( '.tux-message' )
.has( '.tux-message-item.untranslated' )
.first();
- if ( untranslated.length ) {
- untranslated.data( 'translateeditor' ).show();
+ if ( $untranslated.length ) {
+ $untranslated.data( 'translateeditor' ).show();
}
updateStats();
@@ -207,7 +214,7 @@
// Some links in helpers will navigate away by default. But since the messages
// will change on this page on every load, we want to avoid that. Force the
// links to open on new window/tab.
- mw.translateHooks.add( 'showTranslationHelpers', function ( helpers, $editor ) {
+ mw.hook( 'mw.translate.editor.showTranslationHelpers' ).add( function ( helpers, $editor ) {
$editor.find( 'a' ).prop( 'target', '_blank' );
} );