jenkins-bot has submitted this change and it was merged.
Change subject: (Bug 45423) Add "Loading..." while translation helpers are
loading
......................................................................
(Bug 45423) Add "Loading..." while translation helpers are loading
Bug: 45423
Change-Id: I3ee5e3db3641afa51357fcf9b7d301e3042a47d0
---
M Translate.i18n.php
M Translate.php
M resources/css/ext.translate.editor.css
M resources/js/ext.translate.editor.helpers.js
M resources/js/ext.translate.editor.js
5 files changed, 16 insertions(+), 0 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Translate.i18n.php b/Translate.i18n.php
index b878440..bfe8f93 100644
--- a/Translate.i18n.php
+++ b/Translate.i18n.php
@@ -495,6 +495,7 @@
'tux-editor-close-tooltip' => 'Close',
'tux-editor-expand-tooltip' => 'Expand',
'tux-editor-collapse-tooltip' => 'Collapse',
+ 'tux-editor-loading' => 'Loading...',
);
@@ -1025,6 +1026,7 @@
{{Identical|Expand}}',
'tux-editor-collapse-tooltip' => 'Tooltip for the collapse icon of
translate editor.
{{Identical|Collapse}}',
+ 'tux-editor-loading' => 'Loading message while translation editor is
being prepared with helper information',
);
/** Afrikaans (Afrikaans)
diff --git a/Translate.php b/Translate.php
index ebc809a..577db57 100644
--- a/Translate.php
+++ b/Translate.php
@@ -292,6 +292,7 @@
'tux-editor-close-tooltip',
'tux-editor-expand-tooltip',
'tux-editor-collapse-tooltip',
+ 'tux-editor-loading',
),
'position' => 'top',
) + $resourcePaths;
diff --git a/resources/css/ext.translate.editor.css
b/resources/css/ext.translate.editor.css
index f2bc162..d598f06 100644
--- a/resources/css/ext.translate.editor.css
+++ b/resources/css/ext.translate.editor.css
@@ -344,3 +344,9 @@
.suggestiontext {
white-space: pre-wrap;
}
+
+.infocolumn .loading {
+ padding: 10px;
+ font-size: 14px;
+ color: #565656;
+}
diff --git a/resources/js/ext.translate.editor.helpers.js
b/resources/js/ext.translate.editor.helpers.js
index 924d182..828553d 100644
--- a/resources/js/ext.translate.editor.helpers.js
+++ b/resources/js/ext.translate.editor.helpers.js
@@ -402,6 +402,8 @@
title: this.message.title,
format: 'json'
} ).done( function ( result ) {
+ translateEditor.$editor.find( '.infocolumn
.loading' ).remove();
+
if ( !result.helpers ) {
mw.log( 'API did not return any
translation helpers.' );
return false;
diff --git a/resources/js/ext.translate.editor.js
b/resources/js/ext.translate.editor.js
index 5d4057b..ad179df 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -544,6 +544,11 @@
$infoColumn = $( '<div>' ).addClass(
'infocolumn' ),
translateEditor = this;
+ $infoColumn.append( $( '<div>' )
+ .addClass( 'row loading' )
+ .text( mw.msg( 'tux-editor-loading' ) )
+ );
+
if ( mw.config.get(
'wgTranslateDocumentationLanguageCode' ) ) {
if ( mw.translate.canTranslate() ) {
$messageDescSaveButton = $( '<button>' )
--
To view, visit https://gerrit.wikimedia.org/r/53140
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3ee5e3db3641afa51357fcf9b7d301e3042a47d0
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Pginer <[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