Merge "Make API documentation links language aware"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 5 Apr 2017 17:42:46 +0000 (17:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 5 Apr 2017 17:42:46 +0000 (17:42 +0000)
languages/i18n/en.json
languages/i18n/qqq.json
maintenance/getLagTimes.php
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
resources/src/mediawiki/mediawiki.js

index e87b6fb..abe7998 100644 (file)
        "userrights-groupsmember": "Member of:",
        "userrights-groupsmember-auto": "Implicit member of:",
        "userrights-groupsmember-type": "$1",
-       "userrights-groups-help": "You may alter the groups this user is in:\n* A checked box means the user is in that group.\n* An unchecked box means the user is not in that group.\n* A * indicates that you cannot remove the group once you have added it, or vice versa.\n* A # indicates that you can only put back the expiration time of this group; you cannot bring it forward.",
+       "userrights-groups-help": "You may alter the groups this user is in:\n* A checked box means the user is in that group.\n* An unchecked box means the user is not in that group.\n* A * indicates that you cannot remove the group once you have added it, or vice versa.\n* A # indicates that you can only put back the expiration time of this group membership; you cannot bring it forward.",
        "userrights-reason": "Reason:",
        "userrights-no-interwiki": "You do not have permission to edit user rights on other wikis.",
        "userrights-nodatabase": "Database $1 does not exist or is not local.",
        "userrights-expiry-options": "1 day:1 day,1 week:1 week,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year",
        "userrights-invalid-expiry": "The expiry time for group \"$1\" is invalid.",
        "userrights-expiry-in-past": "The expiry time for group \"$1\" is in the past.",
-       "userrights-cannot-shorten-expiry": "You cannot bring forward the expiry of group \"$1\". Only users with permission to add and remove this group can bring forward expiry times.",
+       "userrights-cannot-shorten-expiry": "You cannot bring forward the expiry of membership in group \"$1\". Only users with permission to add and remove this group can bring forward expiry times.",
        "userrights-conflict": "Conflict of user rights changes! Please review and confirm your changes.",
        "group": "Group:",
        "group-user": "Users",
index 444d168..b16c01b 100644 (file)
        "userrights-groupsmember": "Used when editing user groups in [[Special:Userrights]].\n\nThe message is followed by a list of group names.\n\nParameters:\n* $1 - (Optional) the number of items in the list following the message, for PLURAL\n* $2 - (Optional) the user name, for GENDER",
        "userrights-groupsmember-auto": "Used when editing user groups in [[Special:Userrights]]. The message is followed by a list of group names.\n\n\"Implicit\" is for groups that the user was automatically added to (such as \"autoconfirmed\"); cf. {{msg-mw|userrights-groupsmember}}\n\nParameters:\n* $1 - (Optional) the number of items in the list following the message, for PLURAL\n* $2 - (Optional) the user name, for GENDER",
        "userrights-groupsmember-type": "{{optional}}\nParameters:\n* $1 - list of group names\n* $2 - list of group member names. Used with labels {{msg-mw|Userrights-groupsmember}} and {{msg-mw|Userrights-groupsmember-auto}}",
-       "userrights-groups-help": "Instructions displayed on [[Special:UserRights]]. Parameters:\n* $1 - (Optional) a username, can be used for GENDER",
+       "userrights-groups-help": "Instructions displayed on [[Special:UserRights]].  \"Bring forward\" is a phrasal verb meaning \"move to an earlier time\". \"Put back\" means the opposite. Parameters:\n* $1 - (Optional) a username, can be used for GENDER",
        "userrights-reason": "Text beside log field when editing user groups\n\n{{Identical|Reason}}",
        "userrights-no-interwiki": "Error message when editing user groups",
        "userrights-nodatabase": "Error message when editing user groups.\n\n\"Local\" means databases/wikis of the same farm/cluster; that is, meta, enwiki, dewiki, commons, etc are all local databases of the Wikimedia Foundation.\n\nSee [{{canonicalurl:meta:Special:Log|type=rights}} meta:Special:Log?type=rights] for a usage of local databases: username@barwiki\n\nParameters:\n* $1 - database name",
index 677bfa2..ad2fdf8 100644 (file)
@@ -38,30 +38,37 @@ class GetLagTimes extends Maintenance {
        }
 
        public function execute() {
-               $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-               $stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
+               $services = MediaWikiServices::getInstance();
+               $lbFactory = $services->getDBLoadBalancerFactory();
+               $stats = $services->getStatsdDataFactory();
+               $lbsByType = [
+                       'main' => $lbFactory->getAllMainLBs(),
+                       'external' => $lbFactory->getAllExternalLBs()
+               ];
 
-               $lbs = $lbFactory->getAllMainLBs() + $lbFactory->getAllExternalLBs();
-               foreach ( $lbs as $cluster => $lb ) {
-                       if ( $lb->getServerCount() <= 1 ) {
-                               continue;
-                       }
-                       $lags = $lb->getLagTimes();
-                       foreach ( $lags as $serverIndex => $lag ) {
-                               $host = $lb->getServerName( $serverIndex );
-                               if ( IP::isValid( $host ) ) {
-                                       $ip = $host;
-                                       $host = gethostbyaddr( $host );
-                               } else {
-                                       $ip = gethostbyname( $host );
+               foreach ( $lbsByType as $type => $lbs ) {
+                       foreach ( $lbs as $cluster => $lb ) {
+                               if ( $lb->getServerCount() <= 1 ) {
+                                       continue;
                                }
+                               $lags = $lb->getLagTimes();
+                               foreach ( $lags as $serverIndex => $lag ) {
+                                       $host = $lb->getServerName( $serverIndex );
+                                       if ( IP::isValid( $host ) ) {
+                                               $ip = $host;
+                                               $host = gethostbyaddr( $host );
+                                       } else {
+                                               $ip = gethostbyname( $host );
+                                       }
 
-                               $starLen = min( intval( $lag ), 40 );
-                               $stars = str_repeat( '*', $starLen );
-                               $this->output( sprintf( "%10s %20s %3d %s\n", $ip, $host, $lag, $stars ) );
+                                       $starLen = min( intval( $lag ), 40 );
+                                       $stars = str_repeat( '*', $starLen );
+                                       $this->output( sprintf( "%10s %20s %3d %s\n", $ip, $host, $lag, $stars ) );
 
-                               if ( $this->hasOption( 'report' ) ) {
-                                       $stats->gauge( "loadbalancer.lag.$cluster.$host", $lag );
+                                       if ( $this->hasOption( 'report' ) ) {
+                                               $group = ( $type === 'external' ) ? 'external' : $cluster;
+                                               $stats->gauge( "loadbalancer.lag.$group.$host", intval( $lag * 1e3 ) );
+                                       }
                                }
                        }
                }
index 0e38942..3d63831 100644 (file)
                        // Override margin-top and -bottom rules from FieldLayout
                        margin: 0 !important; /* stylelint-disable-line declaration-no-important */
                }
+
+               .oo-ui-checkboxInputWidget {
+                       // Workaround for IE11 rendering issues. T162098
+                       display: block;
+               }
        }
 
        &-highlightButton {
index 5e180b5..86a9a0a 100644 (file)
                                cssBuffer = '',
                                cssBufferTimer = null,
                                cssCallbacks = $.Callbacks(),
-                               isIE9 = document.documentMode === 9,
                                rAF = window.requestAnimationFrame || setTimeout;
 
                        function getMarker() {
                         * @param {Function} [callback]
                         */
                        function addEmbeddedCSS( cssText, callback ) {
-                               var $style, styleEl;
-
                                function fireCallbacks() {
                                        var oldCallbacks = cssCallbacks;
                                        // Reset cssCallbacks variable so it's not polluted by any calls to
                                        cssBuffer = '';
                                }
 
-                               // By default, always create a new <style>. Appending text to a <style> tag is
-                               // is a performance anti-pattern as it requires CSS to be reparsed (T47810).
-                               //
-                               // Support: IE 6-9
-                               // Try to re-use existing <style> tags due to the IE stylesheet limit (T33676).
-                               if ( isIE9 ) {
-                                       $style = $( getMarker() ).prev();
-                                       // Verify that the element before the marker actually is a <style> tag created
-                                       // by mw.loader (not some other style tag, or e.g. a <meta> tag).
-                                       if ( $style.data( 'ResourceLoaderDynamicStyleTag' ) ) {
-                                               styleEl = $style[ 0 ];
-                                               styleEl.appendChild( document.createTextNode( cssText ) );
-                                               fireCallbacks();
-                                               return;
-                                       }
-                                       // Else: No existing tag to reuse. Continue below and create the first one.
-                               }
-
-                               $style = $( newStyleTag( cssText, getMarker() ) );
-
-                               if ( isIE9 ) {
-                                       $style.data( 'ResourceLoaderDynamicStyleTag', true );
-                               }
+                               $( newStyleTag( cssText, getMarker() ) );
 
                                fireCallbacks();
                        }
                                        el.media = media;
                                }
                                // If you end up here from an IE exception "SCRIPT: Invalid property value.",
-                               // see #addEmbeddedCSS, T33676, and T49277 for details.
+                               // see #addEmbeddedCSS, T33676, T43331, and T49277 for details.
                                el.href = url;
 
                                $( getMarker() ).before( el );
                                                // "https://example.org/x.js", "http://example.org/x.js", "//example.org/x.js", "/x.js"
                                                if ( /^(https?:)?\/?\//.test( modules ) ) {
                                                        if ( type === 'text/css' ) {
-                                                               // Support: IE 7-8
-                                                               // Use properties instead of attributes as IE throws security
-                                                               // warnings when inserting a <link> tag with a protocol-relative
-                                                               // URL set though attributes - when on HTTPS. See T43331.
                                                                l = document.createElement( 'link' );
                                                                l.rel = 'stylesheet';
                                                                l.href = modules;