jenkins-bot has submitted this change and it was merged.

Change subject: Add support for page status indicators
......................................................................


Add support for page status indicators

Depends on I2389ff9a5332a2 and I90a8ae15ac8275d0

Change-Id: Ide9bd37cffcc4c4fd153cfd40b96ea4eaf7ed42b
---
M TranslateUtils.php
M resources/css/ext.translate.helplink.css
2 files changed, 20 insertions(+), 9 deletions(-)

Approvals:
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/TranslateUtils.php b/TranslateUtils.php
index a7151c1..f2e10c9 100644
--- a/TranslateUtils.php
+++ b/TranslateUtils.php
@@ -331,7 +331,7 @@
         * @since 2012-01-12
         */
        public static function addSpecialHelpLink( OutputPage $out, $to, 
$overrideBaseUrl = false ) {
-               $out->addModules( 'ext.translate.helplink' );
+               $out->addModuleStyles( 'ext.translate.helplink' );
                $text = wfMessage( 'translate-gethelp' )->escaped();
 
                if ( $overrideBaseUrl ) {
@@ -344,11 +344,18 @@
                        'a',
                        array(
                                'href' => $helpUrl,
-                               'target' => '_blank'
+                               'target' => '_blank',
+                               'class' => 'mw-translate-helplink',
                        ),
-                       "$text" );
-               $wrapper = Html::rawElement( 'div', array( 'class' => 
'mw-translate-helplink' ), $link );
-               $out->addHtml( $wrapper );
+                       $text
+               );
+
+               if ( method_exists( $out, 'addIndicators' ) ) {
+                       $out->addIndicators( array( 'translate-help' => $link ) 
);
+               } else {
+                       $wrapper = Html::rawElement( 'div', array( 'class' => 
'mw-translate-helplink-wrapper' ), $link );
+                       $out->addHtml( $wrapper );
+               }
        }
 
        /**
diff --git a/resources/css/ext.translate.helplink.css 
b/resources/css/ext.translate.helplink.css
index fd521b4..c6887e9 100644
--- a/resources/css/ext.translate.helplink.css
+++ b/resources/css/ext.translate.helplink.css
@@ -1,4 +1,11 @@
 .mw-translate-helplink {
+       /* @embed */
+       background: url(../images/help.png) no-repeat scroll left center 
transparent;
+       padding-left: 20px;
+}
+
+/* BC for MW <= 1.24 */
+.mw-translate-helplink-wrapper {
        float: right;
        width: 100%;
        display: block;
@@ -6,9 +13,6 @@
        margin-bottom: -10px;
 }
 
-.mw-translate-helplink a {
-       /* @embed */
-       background: url(../images/help.png) no-repeat scroll left center 
transparent;
-       padding-left: 20px;
+.mw-translate-helplink-wrapper .mw-translate-helplink {
        float: right;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide9bd37cffcc4c4fd153cfd40b96ea4eaf7ed42b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Nikerabbit <[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

Reply via email to