[MediaWiki-commits] [Gerrit] Segmentation: Add test for figure tags - change (mediawiki...cxserver)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/119931 Change subject: Segmentation: Add test for figure tags .. Segmentation: Add test for figure tags Change-Id: I109c13613d8927bdd7b9346e5d20110e51220816 --- M tests/segmentation/SegmentationTests.json 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/31/119931/1 diff --git a/tests/segmentation/SegmentationTests.json b/tests/segmentation/SegmentationTests.json index 23cc2df..a65b30a 100644 --- a/tests/segmentation/SegmentationTests.json +++ b/tests/segmentation/SegmentationTests.json @@ -27,6 +27,10 @@ { source: pa href=\#\Hydrogen/a is a a href=\#\gas/a/p, result: p id=\0\span class=\cx-segment\ data-segmentid=\1\a class=\cx-link\ data-linkid=\2\ href=\#\Hydrogen/a is a a class=\cx-link\ data-linkid=\3\ href=\#\gas/a/span/p + }, + { + source: figurea href=\#\img src=\img.png\/afigcaptionFigure caption/figcaption/figure, + result: figure id=\0\a class=\cx-link\ data-linkid=\1\ href=\#\img src=\img.png\/img/afigcaption id=\2\span class=\cx-segment\ data-segmentid=\3\Figure caption/span/figcaption/figure } ], hi: [ -- To view, visit https://gerrit.wikimedia.org/r/119931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I109c13613d8927bdd7b9346e5d20110e51220816 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver 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
[MediaWiki-commits] [Gerrit] Rollback transactions if job throws an exception. - change (mediawiki/core)
Brian Wolff has uploaded a new change for review. https://gerrit.wikimedia.org/r/119932 Change subject: Rollback transactions if job throws an exception. .. Rollback transactions if job throws an exception. I believe this is the cause of db referential integrity issues on commons, where exceptions thrown during revision insertion (perhaps due to ExternalStorage failures) are creating entries in the page table, that don't have a valid page_latest field, since if such an exception happens while doing a PublishStashedFile job, the incomplete transaction ends up being committed when runJobs.php exits (or on next job that does $dbw-begin()) Bug: 32551 Change-Id: I5807e64440ff6c6651fbbb4924645d05d843b98e --- M includes/db/Database.php M includes/db/LBFactory.php M includes/db/LoadBalancer.php M includes/jobqueue/jobs/AssembleUploadChunksJob.php M includes/jobqueue/jobs/PublishStashedFileJob.php M includes/specials/SpecialRunJobs.php M maintenance/runJobs.php 7 files changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/119932/1 diff --git a/includes/db/Database.php b/includes/db/Database.php index 91ab0ca..29e60a3 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -3510,6 +3510,23 @@ } /** +* If there is an open (non-automatic) transaction, roll it back. +* +* Meant to be used when something bad happens (e.g. in a catch block) +* and its unclear if there is a half-done transaction. If there is +* a half done transaction, then we would want to kill it, however if +* there is a transaction open just for DB_TRX, then the data is +* probably still good, and it should stay. +* +* @param $string $fname Calling functions name +*/ + public function maybeRollbackOpenTransaction( $fname = __METHOD__ ) { + if ( $this-mTrxLevel !$this-mTrxAutomatic ) { + $this-rollback( $fname ); + } + } + + /** * Issues the ROLLBACK command to the database server. * * @see DatabaseBase::rollback() diff --git a/includes/db/LBFactory.php b/includes/db/LBFactory.php index ae105e2..6b58b15 100644 --- a/includes/db/LBFactory.php +++ b/includes/db/LBFactory.php @@ -191,6 +191,13 @@ function commitMasterChanges() { $this-forEachLBCallMethod( 'commitMasterChanges' ); } + + /** +* Rollback all pending (non-automatic) transactions +*/ + function rollbackMasterChanges( $fname = __METHOD__ ) { + $this-forEachLBCallMethod( 'rollbackMasterChanges', array( $fname ) ); + } } /** diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index de4c2f5..a4a006d 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -950,6 +950,28 @@ } /** +* Issue ROLLBACK only on master, only if pending (non-automatic) transaction. +* +* Meant in case of something bad happening, and we want to get rid of all +* open transactions. +* +* @param String $fname Calling method's name. +*/ + function rollbackMasterChanges( $fname = __METHOD__ ) { + // Always 0, but who knows.. :) + $masterIndex = $this-getWriterIndex(); + foreach ( $this-mConns as $conns2 ) { + if ( empty( $conns2[$masterIndex] ) ) { + continue; + } + /** @var DatabaseBase $conn */ + foreach ( $conns2[$masterIndex] as $conn ) { + $conn-maybeRollbackOpenTransaction( $fname ); + } + } + } + + /** * @param $value null * @return Mixed */ diff --git a/includes/jobqueue/jobs/AssembleUploadChunksJob.php b/includes/jobqueue/jobs/AssembleUploadChunksJob.php index 19b0558..7577f47 100644 --- a/includes/jobqueue/jobs/AssembleUploadChunksJob.php +++ b/includes/jobqueue/jobs/AssembleUploadChunksJob.php @@ -112,6 +112,8 @@ ) ); $this-setLastError( get_class( $e ) . : . $e-getText() ); + // For good measure. + wfGetLBFactory()-rollbackMasterChanges( __METHOD__ ); return false; } diff --git a/includes/jobqueue/jobs/PublishStashedFileJob.php b/includes/jobqueue/jobs/PublishStashedFileJob.php index d7667f3..664269e 100644 --- a/includes/jobqueue/jobs/PublishStashedFileJob.php +++ b/includes/jobqueue/jobs/PublishStashedFileJob.php @@ -125,6 +125,9 @@ ) );
[MediaWiki-commits] [Gerrit] merging all cucumber preference feature files to one-bug 62636 - change (qa/browsertests)
Jagori79 has uploaded a new change for review. https://gerrit.wikimedia.org/r/119933 Change subject: merging all cucumber preference feature files to one-bug 62636 .. merging all cucumber preference feature files to one-bug 62636 Change-Id: Iaec791ddb00822d8995714f09812c658fa2172a5 --- A tests/browser/features/preferences.feature 1 file changed, 73 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/33/119933/1 diff --git a/tests/browser/features/preferences.feature b/tests/browser/features/preferences.feature new file mode 100644 index 000..53527cd --- /dev/null +++ b/tests/browser/features/preferences.feature @@ -0,0 +1,73 @@ +# +# This file is subject to the license terms in the LICENSE file found in the +# qa-browsertests top-level directory and at +# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of +# qa-browsertests, including this file, may be copied, modified, propagated, or +# distributed except according to the terms contained in the LICENSE file. +# +# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the +# qa-browsertests top-level directory and at +# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS +# +@chrome @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_6 @internet_explorer_7 @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @login @phantomjs @test2.wikipedia.org +Feature: Preferences + + Scenario: Preferences Appearance +Given I am logged in +When I navigate to Preferences + And I click Appearance +Then I can select skins + And I have a link to Custom CSS + And I have a link to Custom Javascript + And I can select image size + And I can select thumbnail size + And I can select Threshold for stub link + And I can select underline preferences + And I have advanced options checkboxes + And I have Math options radio buttons + And I can click Save + And I can restore default settings + + + Scenario: Preferences Date Time +Given I am logged in +When I navigate to Preferences + And I click Date and time +Then I can select date format + And I can see server time + And I can see local time + And I can select my time zone + + + Scenario: Preferences Editing +Given I am logged in +When I navigate to Preferences + And I click Editing +Then I can select edit area font style + And I can select section editing via edit links + And I can select section editing by right clicking + And I can select section editing by double clicking + And I can select to prompt me when entering a blank edit summary + And I can select to warn me when I leave an edit page with unsaved changes + And I can select show edit toolbar + And I can select enable enhanced editing toolbar + And I can select enable wizards for inserting links, tables as well as the search and replace function + And I can select show preview on first edit + And I can select show preview before edit box + And I can select live preview + + + Scenario: Preferences User profile +Given I am logged in +When I navigate to Preferences + And I click User profile +Then I can see my Basic informations + And I can change my language + And I can change my gender + And I have more language settings + And I can see my signature + And I can change my signature + And I can see my email + And I can change my email options + And I can click Save + And I can restore default settings -- To view, visit https://gerrit.wikimedia.org/r/119933 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaec791ddb00822d8995714f09812c658fa2172a5 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Jagori79 jagor...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .jshintrc and .jshintignore - change (mediawiki...cxserver)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/119934 Change subject: Add .jshintrc and .jshintignore .. Add .jshintrc and .jshintignore Change-Id: I9cdaccdd8fbc8835fb972a0ff9b83b97655fcbdf --- A .jshintignore A .jshintrc 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/34/119934/1 diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..dbf0821 --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules/* \ No newline at end of file diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..2fa0d18 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,28 @@ +{ + camelcase: true, + curly: true, + eqeqeq: true, + immed: true, + latedef: true, + newcap: true, + noarg: true, + noempty: true, + nonew: true, + quotmark: single, + trailing: true, + undef: true, + unused: true, + onevar: true, + bitwise: true, + forin: false, + regexp: false, + strict: true, + laxbreak: true, + smarttabs: true, + multistr: true, + browser: true, + node: true, + predef: [ + jQuery + ] +} -- To view, visit https://gerrit.wikimedia.org/r/119934 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9cdaccdd8fbc8835fb972a0ff9b83b97655fcbdf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver 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
[MediaWiki-commits] [Gerrit] Adjust datetime in email confirmation email - change (mediawiki/core)
01tonythomas has uploaded a new change for review. https://gerrit.wikimedia.org/r/119936 Change subject: Adjust datetime in email confirmation email .. Adjust datetime in email confirmation email The email confirmation expiration datetime was adjusted to show time according to user Preference. Bug: 27158 Change-Id: I58b2f6a0a37de4092ab4a24a950ad0b402229135 --- M includes/User.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/36/119936/1 diff --git a/includes/User.php b/includes/User.php index 6d9f372..b591c84 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3860,10 +3860,10 @@ $this-getRequest()-getIP(), $this-getName(), $url, - $wgLang-timeanddate( $expiration, false ), + $wgLang-timeanddate( $expiration, true ), $invalidateURL, $wgLang-date( $expiration, false ), - $wgLang-time( $expiration, false ) )-text() ); + $wgLang-time( $expiration, true ) )-text() ); } /** -- To view, visit https://gerrit.wikimedia.org/r/119936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58b2f6a0a37de4092ab4a24a950ad0b402229135 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove the server folder since it moved to another repo - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/119935 Change subject: Remove the server folder since it moved to another repo .. Remove the server folder since it moved to another repo Server code moved to mediawiki/services/cxserver repo Change-Id: Icae59beca361de528f68d5f5a337a3aae18a90f7 --- M .jshintignore M .jshintrc D server/ContentTranslationService.js D server/README.md D server/Server.js D server/config.example.js D server/models/DataModelManager.js D server/mt/CXMTInterface.js D server/mt/providers/Rot13.js D server/package.json D server/pageloader/MediaWikiApiPageLoader.js D server/pageloader/PageLoader.js D server/pageloader/ParsoidPageLoader.js D server/public/index.html D server/public/js/main.js D server/segmentation/CXParserFactory.js D server/segmentation/CXSegmenter.js D server/segmentation/languages/CXParser.js D server/segmentation/languages/hi/CXParserHi.js D server/segmentation/languages/index.js D server/tests/segmentation/SegmentationTests.js D server/tests/segmentation/SegmentationTests.json 22 files changed, 1 insertion(+), 1,068 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/35/119935/1 diff --git a/.jshintignore b/.jshintignore index 4abf74c..9b692f1 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,3 +1,2 @@ # upstream libs -lib/* -server/node_modules/* \ No newline at end of file +lib/* \ No newline at end of file diff --git a/.jshintrc b/.jshintrc index 513b04b..d7649a3 100644 --- a/.jshintrc +++ b/.jshintrc @@ -21,7 +21,6 @@ smarttabs: true, multistr: true, browser: true, - node: true, predef: [ mediaWiki, jQuery, diff --git a/server/ContentTranslationService.js b/server/ContentTranslationService.js deleted file mode 100644 index 21814a3..000 --- a/server/ContentTranslationService.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * ContentTranslation server - * - * @file - * @copyright See AUTHORS.txt - * @license GPL-2.0+ - */ - -/** - * @class ContentTranslationService - * @singleton - * @private - */ - -'use strict'; - -var instanceName, context, - express = require( 'express' ), - args = require( 'minimist' )( process.argv.slice( 2 ) ); - -var port = args.port || 8000; - -var app = express(); -var server = require( 'http' ).createServer( app ); -var io = require( 'socket.io' ).listen( server ); -var redis = require( 'redis' ); - -// Use Redis as the store for socket.io -var RedisStore = require( 'socket.io/lib/stores/redis' ); -io.set( 'store', - new RedisStore( { - redisPub: redis.createClient(), - redisSub: redis.createClient(), - redisClient: redis.createClient() - } ) -); - -instanceName = 'worker(' + process.pid + ')'; -// socket.io connection establishment -io.sockets.on( 'connection', function ( socket ) { - var dataModelManager, - CXDataModelManager, - redisSub = redis.createClient(); - - console.log( '[CX] Client connected to ' + instanceName + '). Socket: ' + socket.id ); - redisSub.subscribe( 'cx' ); - redisSub.on( 'message', function ( channel, message ) { - socket.emit( 'cx.data.update', JSON.parse( message ) ); - console.log( '[CX] Received from channel #' + channel + ':' + message ); - } ); - - socket.on( 'cx.init', function ( data ) { - CXDataModelManager = require( __dirname + '/models/DataModelManager.js' ).CXDataModelManager; - context = { - sourceLanguage: data.sourceLanguage, - targetLanguage: data.targetLanguage, - sourcePage: data.sourcePage, - pub: redis.createClient(), - store: redis.createClient() - }; - // Inject the session context to dataModelManager - // It should take care of managing the data model and pushing - // it to the client through socket. - dataModelManager = new CXDataModelManager( context ); - } ); - - socket.on( 'disconnect', function () { - console.warn( '[CX] Dsconnecting from redis' ); - redisSub.quit(); - } ); - -} ); - -// Everything else goes through this. -app.use( express.static( __dirname + '/public' ) ); -console.log( '[CX] ' + instanceName + ' ready. Listening on port: ' + port ); -server.listen( port ); - -module.exports = app; diff --git a/server/README.md b/server/README.md deleted file mode 100644 index 0333296..000 --- a/server/README.md +++ /dev/null @@ -1,47 +0,0 @@ -ContentTranslation is a tool that allows editors to translate pages from -one language to another with the help of machine translation and other -translation tools. - -This is the server
[MediaWiki-commits] [Gerrit] Minor update for README - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/119937 Change subject: Minor update for README .. Minor update for README Change-Id: Ibe58b1ffc07a676c6b080e738557b677af399ed7 --- M README.md 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/37/119937/1 diff --git a/README.md b/README.md index 7532f10..6ef1554 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,13 @@ ## Developing and installing For information on installing ContentTranslation on a local wiki, please -see https://www.mediawiki.org/wiki/Extension:ContentTranslation +see [Setup][] For information about running tests and contributing code to ContentTranslation, -see [CONTRIBUTING][]. Patch submissions are reviewed and managed with +see [Contributing][]. Patch submissions are reviewed and managed with [Gerrit][]. [Content translation]: http://www.mediawiki.org/wiki/Content_translation -[CONTRIBUTING]: CONTRIBUTING.md +[Setup]:https://www.mediawiki.org/wiki/Extension:ContentTranslation +[Contributing]: CONTRIBUTING.md [Gerrit]:https://www.mediawiki.org/wiki/Gerrit -- To view, visit https://gerrit.wikimedia.org/r/119937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe58b1ffc07a676c6b080e738557b677af399ed7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation 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
[MediaWiki-commits] [Gerrit] SpecialMobileWebApp: Make styles and startup scripts cache - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/119938 Change subject: SpecialMobileWebApp: Make styles and startup scripts cache .. SpecialMobileWebApp: Make styles and startup scripts cache Change-Id: I877b38017c51b3b40f35de5ab1bf9381cae39ca6 --- M includes/specials/SpecialMobileWebApp.php 1 file changed, 96 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/38/119938/1 diff --git a/includes/specials/SpecialMobileWebApp.php b/includes/specials/SpecialMobileWebApp.php index 50433a9..00155d7 100644 --- a/includes/specials/SpecialMobileWebApp.php +++ b/includes/specials/SpecialMobileWebApp.php @@ -21,19 +21,113 @@ $this-genAppCache(); } + /** +* Given HTML markup searches for URLs inside elements +* FIXME: Refactor OutputPage in MediaWiki core so this is unnecessary +* @param string $html +* @param string $tag A tag to extract URLs from (e.g. 'link' or 'script') +* @param string $attr An attribute to find the URL (e.g. 'href' or 'src') +* @return array of urls +*/ + private function extractUrls( $html, $tag, $attr ) { + $doc = new DOMDocument(); + $doc-loadHTML( $html ); + $links = $doc-getElementsByTagName( $tag ); + $urls = array(); + foreach( $links as $link ) { + $val = $link-getAttribute( $attr ); + if ( $val ) { + $urls[] = $val; + } + } + return $urls; + } + + /** +* Utility function to get relative path part of the URL. +* @param string $url The URL from which to extract the relative path +* @return string The relative path of the URL +*/ + private function getRelativePath( $url ) { + // first, let's try the easy way + $parts = wfParseUrl( $url ); + // if that didn't work, let's try the standard way + $parts = $parts ? $parts : parse_url( $url ); + return isset( $parts['path'] ) isset( $parts['query'] ) ? + $parts['path'] . '?' . $parts['query'] : + $parts['path']; + } + + /** +* Generates a cache manifest for the current skin +* that contains JavaScript start up URL, and the URLs +* for stylesheets in the page for use in an offline web +* application +* See: http://www.w3.org/TR/2011/WD-html5-20110525/offline.html +*/ private function genAppCache() { - $urls = # Manifest URLs will be listed here.\n; + // This parameter currently hardcoded + $target = 'mobile'; + + $out = $this-getOutput(); + $out-setTarget( $target ); + $css = $out-buildCssLinks(); + $scriptUrls = implode( \n, $this-extractUrls( $out-getHeadScripts(), 'script', 'src' ) ); + $scriptUrls = $this-getRelativePath( $scriptUrls ); + $styleUrls = implode( \n, $this-extractUrls( $css, 'link', 'href' ) ); + $styleUrls = $this-getRelativePath( $styleUrls ); + $rl = $out-getResourceLoader(); + $styles = $out-getModuleStyles(); + $ctx = new ResourceLoaderContext( $rl, new FauxRequest() ); + + $fr = new FauxRequest( array( + 'debug' = false, + 'lang' = $this-getLanguage()-getCode(), + 'modules' = 'startup', + 'only' = 'scripts', + 'skin' = $out-getSkin()-getSkinName(), + 'target' = $out-getTarget(), + )); + $rlcCtx = new ResourceLoaderContext( new ResourceLoader(), $fr ); + + $startupUrl = ResourceLoaderStartUpModule::getStartupModulesUrl( $rlcCtx ); + $startupUrl = $this-getRelativePath( $startupUrl ); + + // Add a ts parameter for cachebusting when things change + $urls = $startupUrl\n$scriptUrls\n$styleUrls; + // TODO: add timestamp components in checksum calculation? + // Granted, it's used below. So maybe that's good enough, + // at least if we're totally confident in the timestamp logic. + // We'll just make it more user friendly in time. $checksum = sha1( $urls ); $req = $this-getRequest(); $resp = $req-response(); $resp-header( 'Content-type: text/cache-manifest; charset=UTF-8' ); - $resp-header( 'Cache-Control: public, max-age=300, s-max-age=300' ); + $resp-header( 'Cache-Control: public,
[MediaWiki-commits] [Gerrit] Remove the server folder since it moved to another repo - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Remove the server folder since it moved to another repo .. Remove the server folder since it moved to another repo Server code moved to mediawiki/services/cxserver repo Change-Id: Icae59beca361de528f68d5f5a337a3aae18a90f7 --- M .jshintignore M .jshintrc D server/ContentTranslationService.js D server/README.md D server/Server.js D server/config.example.js D server/models/DataModelManager.js D server/mt/CXMTInterface.js D server/mt/providers/Rot13.js D server/package.json D server/pageloader/MediaWikiApiPageLoader.js D server/pageloader/PageLoader.js D server/pageloader/ParsoidPageLoader.js D server/public/index.html D server/public/js/main.js D server/segmentation/CXParserFactory.js D server/segmentation/CXSegmenter.js D server/segmentation/languages/CXParser.js D server/segmentation/languages/hi/CXParserHi.js D server/segmentation/languages/index.js D server/tests/segmentation/SegmentationTests.js D server/tests/segmentation/SegmentationTests.json 22 files changed, 1 insertion(+), 1,068 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintignore b/.jshintignore index 4abf74c..9b692f1 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,3 +1,2 @@ # upstream libs -lib/* -server/node_modules/* \ No newline at end of file +lib/* \ No newline at end of file diff --git a/.jshintrc b/.jshintrc index 513b04b..d7649a3 100644 --- a/.jshintrc +++ b/.jshintrc @@ -21,7 +21,6 @@ smarttabs: true, multistr: true, browser: true, - node: true, predef: [ mediaWiki, jQuery, diff --git a/server/ContentTranslationService.js b/server/ContentTranslationService.js deleted file mode 100644 index 21814a3..000 --- a/server/ContentTranslationService.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * ContentTranslation server - * - * @file - * @copyright See AUTHORS.txt - * @license GPL-2.0+ - */ - -/** - * @class ContentTranslationService - * @singleton - * @private - */ - -'use strict'; - -var instanceName, context, - express = require( 'express' ), - args = require( 'minimist' )( process.argv.slice( 2 ) ); - -var port = args.port || 8000; - -var app = express(); -var server = require( 'http' ).createServer( app ); -var io = require( 'socket.io' ).listen( server ); -var redis = require( 'redis' ); - -// Use Redis as the store for socket.io -var RedisStore = require( 'socket.io/lib/stores/redis' ); -io.set( 'store', - new RedisStore( { - redisPub: redis.createClient(), - redisSub: redis.createClient(), - redisClient: redis.createClient() - } ) -); - -instanceName = 'worker(' + process.pid + ')'; -// socket.io connection establishment -io.sockets.on( 'connection', function ( socket ) { - var dataModelManager, - CXDataModelManager, - redisSub = redis.createClient(); - - console.log( '[CX] Client connected to ' + instanceName + '). Socket: ' + socket.id ); - redisSub.subscribe( 'cx' ); - redisSub.on( 'message', function ( channel, message ) { - socket.emit( 'cx.data.update', JSON.parse( message ) ); - console.log( '[CX] Received from channel #' + channel + ':' + message ); - } ); - - socket.on( 'cx.init', function ( data ) { - CXDataModelManager = require( __dirname + '/models/DataModelManager.js' ).CXDataModelManager; - context = { - sourceLanguage: data.sourceLanguage, - targetLanguage: data.targetLanguage, - sourcePage: data.sourcePage, - pub: redis.createClient(), - store: redis.createClient() - }; - // Inject the session context to dataModelManager - // It should take care of managing the data model and pushing - // it to the client through socket. - dataModelManager = new CXDataModelManager( context ); - } ); - - socket.on( 'disconnect', function () { - console.warn( '[CX] Dsconnecting from redis' ); - redisSub.quit(); - } ); - -} ); - -// Everything else goes through this. -app.use( express.static( __dirname + '/public' ) ); -console.log( '[CX] ' + instanceName + ' ready. Listening on port: ' + port ); -server.listen( port ); - -module.exports = app; diff --git a/server/README.md b/server/README.md deleted file mode 100644 index 0333296..000 --- a/server/README.md +++ /dev/null @@ -1,47 +0,0 @@ -ContentTranslation is a tool that allows editors to translate pages from -one language to another with the help of machine translation and other -translation tools. - -This is the server component of ContentTranslation. - -Installation -
[MediaWiki-commits] [Gerrit] (bug 61345) Clicking Comment (n) in Collapsed View doesn't... - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 61345) Clicking Comment (n) in Collapsed View doesn't expand the topic .. (bug 61345) Clicking Comment (n) in Collapsed View doesn't expand the topic Bug: 61345 Change-Id: Iea331e63883b4bd391e7d87c66824a46f2345d81 --- M modules/discussion/ui.js 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js index fad8f65..17404c7 100644 --- a/modules/discussion/ui.js +++ b/modules/discussion/ui.js @@ -68,9 +68,14 @@ // Does this href contain a hash? if ( index -1 ) { - $target = this.$container.find( target.substr(index) ); + $target = this.$container.find( target.substr( index ) ); + // Does this element exist within our container? if ( $target.length ) { + // ensure the topic is expanded, needs the speed=0 + // otherwise focus and expand animations combine oddly + this.topicExpand( $target.closest( '.flow-topic-children-container' ), 0 ); + // Great, scroll to it and then focus. $target.conditionalScrollIntoView().queue( function () { mw.flow.editor.focus( $( this ).find( 'textarea' ) ); -- To view, visit https://gerrit.wikimedia.org/r/118299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea331e63883b4bd391e7d87c66824a46f2345d81 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Bsitu bs...@wikimedia.org Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Werdna agarr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Minor update for README - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Minor update for README .. Minor update for README Change-Id: Ibe58b1ffc07a676c6b080e738557b677af399ed7 --- M README.md 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/README.md b/README.md index 7532f10..78f937a 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,13 @@ ## Developing and installing For information on installing ContentTranslation on a local wiki, please -see https://www.mediawiki.org/wiki/Extension:ContentTranslation +see [Setup][] For information about running tests and contributing code to ContentTranslation, -see [CONTRIBUTING][]. Patch submissions are reviewed and managed with +see [Contributing][]. Patch submissions are reviewed and managed with [Gerrit][]. -[Content translation]: http://www.mediawiki.org/wiki/Content_translation -[CONTRIBUTING]: CONTRIBUTING.md -[Gerrit]:https://www.mediawiki.org/wiki/Gerrit +[Content translation]: http://www.mediawiki.org/wiki/Content_translation +[Setup]: https://www.mediawiki.org/wiki/Extension:ContentTranslation +[Contributing]:CONTRIBUTING.md +[Gerrit]: https://www.mediawiki.org/wiki/Gerrit -- To view, visit https://gerrit.wikimedia.org/r/119937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe58b1ffc07a676c6b080e738557b677af399ed7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable MWLogger logging for legacy logging methods - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/119941 Change subject: Enable MWLogger logging for legacy logging methods .. Enable MWLogger logging for legacy logging methods Introduces the $wgUseMWLoggerForLegacyFunctions that enables the use of the MWLogger PSR-3 logger for legacy global logging functions. When enabled wfDebug, wfDebugLog and wfLogDBError will route their log messages to MWLogger instances. Requires the MWLogger system introduced in I5c82299 and the Composer managed libraries from Ie667944. Change-Id: I1e5596d590144fbfdfd5f18bc42cf1ef0dbcac12 --- M includes/DefaultSettings.php M includes/GlobalFunctions.php 2 files changed, 61 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/41/119941/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 97cdae8..9653c9d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5008,6 +5008,17 @@ $wgMWLoggerDefaultSpi = 'MWLoggerMonologSpi'; /** + * Feature switch to enable use of PSR-3 logger for legacy global logging + * functions. + * + * When enabled wfDebug, wfDebugLog and wfLogDBError will route their log + * events to MWLogger instances. + * + * @since 1.23 + */ +$wgUseMWLoggerForLegacyFunctions = false; + +/** * Configuration for MonologFactory logger factory. * * Default configuration installs a null handler that will silently discard diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a6f936f..ef06d95 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -933,6 +933,7 @@ */ function wfDebug( $text, $dest = 'all' ) { global $wgDebugLogFile, $wgProfileOnly, $wgDebugRawPage, $wgDebugLogPrefix; + global $wgUseMWLoggerForLegacyFunctions; if ( !$wgDebugRawPage wfIsDebugRawPage() ) { return; @@ -954,12 +955,22 @@ MWDebug::debugMsg( $text ); } - if ( $wgDebugLogFile != '' !$wgProfileOnly ) { - # Strip unprintables; they can switch terminal modes when binary data - # gets dumped, which is pretty annoying. - $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1f]!', ' ', $text ); - $text = $wgDebugLogPrefix . $text; - wfErrorLog( $text, $wgDebugLogFile ); + if ( !$wgProfileOnly ) { + if ( $wgUseMWLoggerForLegacyFunctions ) { + $log = MWLogger::getInstance( 'wfDebug' ); + $ctx = array(); + if ( $wgDebugLogPrefix !== '' ) { + $ctx['prefix'] = $wgDebugLogPrefix; + } + $log-debug( trim($text), $ctx ); + + } elseif ( $wgDebugLogFile != '' ) { + # Strip unprintables; they can switch terminal modes when binary data + # gets dumped, which is pretty annoying. + $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1f]!', ' ', $text ); + $text = $wgDebugLogPrefix . $text; + wfErrorLog( $text, $wgDebugLogFile ); + } } } @@ -1041,7 +1052,7 @@ * - false: same as 'private' */ function wfDebugLog( $logGroup, $text, $dest = 'all' ) { - global $wgDebugLogGroups; + global $wgDebugLogGroups, $wgUseMWLoggerForLegacyFunctions; $text = trim( $text ) . \n; @@ -1054,7 +1065,15 @@ if ( !isset( $wgDebugLogGroups[$logGroup] ) ) { if ( $dest !== 'private' ) { - wfDebug( [$logGroup] $text, $dest ); + if ( $wgUseMWLoggerForLegacyFunctions ) { + $log = MWLogger::getInstance( $logGroup ); + $log-debug( trim($text), array( + 'wiki' = wfWikiID(), + 'host' = wfHostname(), + ) ); + } else { + wfDebug( [$logGroup] $text, $dest ); + } } return; } @@ -1079,7 +1098,16 @@ $time = wfTimestamp( TS_DB ); $wiki = wfWikiID(); $host = wfHostname(); - wfErrorLog( $time $host $wiki: $text, $destination ); + if ( $wgUseMWLoggerForLegacyFunctions ) { + $log = MWLogger::getInstance( $destination ); + $log-debug( trim($text), array( + 'wiki' = $wiki, + 'host' = $host, + ) ); + + } else { + wfErrorLog( $time $host $wiki: $text, $destination ); + } } /** @@ -1088,10 +1116,10 @@ * @param string $text database error message. */ function wfLogDBError( $text ) {
[MediaWiki-commits] [Gerrit] Add a PSR-3 based logging interface - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/119940 Change subject: Add a PSR-3 based logging interface .. Add a PSR-3 based logging interface The MWLogger class is actually a thin wrapper around any PSR-3 LoggerInterface implementation. Named MWLogger instances can be obtained from the MWLogger::getInstance() static method. MWLogger expects a class implementing the MWLoggerSpi interface to act as a factory for new MWLogger instances. A concrete MWLoggerSpi implementation using the Monolog library is also provided. New classes introduced: ; MWLogger : PSR-3 compatible logger that wraps any \Psr\Log\LoggerInterface implementation ; MWLoggerSpi : Service provider interface for MWLogger factories ; MWLoggerMonologSpi : MWLoggerSpi for creating instances backed by the monolog logging library ; MwLogHandler : Monolog handler that replicates the udp2log and file logging functionality of wfErrorLog() New globals introduced: ; $wgMWLoggerDefaultSpi : Default SPI to use with MWLogger ; $wgMWLoggerMonologSpiConfig : Configuration for MWLoggerMonologSpi describing how to configure the Monolog logger instances. This change relies on the Composer managed Psr\Log and Monolog libraries introduced in Ie667944. Change-Id: I5c822995a181a38c844f4a13cb172297827e0031 --- A docs/mwlogger.txt M includes/AutoLoader.php M includes/DefaultSettings.php A includes/debug/Logger.php A includes/debug/LoggerSpi.php A includes/debug/monolog/MonologSpi.php A includes/debug/monolog/MwLogHandler.php 7 files changed, 772 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/40/119940/1 diff --git a/docs/mwlogger.txt b/docs/mwlogger.txt new file mode 100644 index 000..d860651 --- /dev/null +++ b/docs/mwlogger.txt @@ -0,0 +1,23 @@ +MWLogger implements a PSR-3 [0] compatible message logging system. + +The MWLogger::getInstance() static method is the means by which most code +acquires an MWLogger instance. This in turn delegates creation of MWLogger +instances to a class implementing the MWLoggerSpi service provider interface. + +The service provider interface allows the backend logging library to be +implemented in multiple ways. The $wgMWLoggerDefaultSpi global provides the +classname of the default MWLoggerSpi implementation to be loaded at runtime. +This can either be the name of a class implementing the MWLoggerSpi with +a zero argument constructor or a callable that will return an MWLoggerSpi +instance. Alternately the MWLogger::registerProvider method can be called +to inject an MWLoggerSpi instance into MWLogger and bypass the use of this +configuration variable. + +The MWLoggerMonologSpi class implements a service provider to generate +MWLogger instances that use the Monolog [1] logging library. See the PHP docs +(or source) for MWLoggerMonologSpi for details on the configuration of this +provider. The default configuration installs a null handler that will silently +discard all logging events. + +[0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md +[1]: https://github.com/Seldaek/monolog diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index d651796..dd9f4d6 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -493,6 +493,10 @@ # includes/debug 'MWDebug' = 'includes/debug/Debug.php', + 'MWLogger' = 'includes/debug/Logger.php', + 'MWLoggerSpi' = 'includes/debug/LoggerSpi.php', + 'MWLoggerMonologSpi' = 'includes/debug/monolog/MonologSpi.php', + 'MwLogHandler' = 'includes/debug/monolog/MwLogHandler.php', # includes/deferred 'DataUpdate' = 'includes/deferred/DataUpdate.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c6ebb35..97cdae8 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4994,6 +4994,41 @@ $wgDebugLogGroups = array(); /** + * Default service provider for creating MWLogger instances. + * + * This can either be the name of a class implementing the MWLoggerSpi with + * a zero argument constructor or a callable that will return an MWLoggerSpi + * instance. Alternately the MWLogger::registerProvider method can be called + * to inject an MWLoggerSpi instance into MWLogger and bypass the use of this + * configuration variable. + * + * @since 1.23 + * @var $wgMWLoggerDefaultSpi array|callable + */ +$wgMWLoggerDefaultSpi = 'MWLoggerMonologSpi'; + +/** + * Configuration for MonologFactory logger factory. + * + * Default configuration installs a null handler that will silently discard + * all logging events. + * + * @since 1.23 + */ +$wgMWLoggerMonologSpiConfig = array( + 'loggers' = array( + '@default' = array( + 'handlers' = array( 'null' ), + ), + ), + 'handlers' = array( + 'null' =
[MediaWiki-commits] [Gerrit] Enable MWLogger logging for wfLogProfilingData - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/119942 Change subject: Enable MWLogger logging for wfLogProfilingData .. Enable MWLogger logging for wfLogProfilingData Output structured profiling report data from wfLogProfilingData when $wgUseMWLoggerForLegacyFunctions is enabled. Requires Ie667944, I5c82299, and I1e5596d. Change-Id: Iae11e1e4fe970ada74136f0e969dc624c586ce17 --- M includes/DefaultSettings.php M includes/GlobalFunctions.php M includes/profiler/Profiler.php 3 files changed, 87 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/42/119942/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 9653c9d..cb37f6e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5011,8 +5011,8 @@ * Feature switch to enable use of PSR-3 logger for legacy global logging * functions. * - * When enabled wfDebug, wfDebugLog and wfLogDBError will route their log - * events to MWLogger instances. + * When enabled wfDebug, wfDebugLog, wfLogDBError and wfLogProfilingData + * will route their log events to MWLogger instances. * * @since 1.23 */ diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index ef06d95..a511560 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1265,7 +1265,7 @@ */ function wfLogProfilingData() { global $wgRequestTime, $wgDebugLogFile, $wgDebugRawPage, $wgRequest; - global $wgProfileLimit, $wgUser; + global $wgProfileLimit, $wgUser, $wgUseMWLoggerForLegacyFunctions; StatCounter::singleton()-flush(); @@ -1286,42 +1286,71 @@ $profiler-logData(); // Check whether this should be logged in the debug file. - if ( $wgDebugLogFile == '' || ( !$wgDebugRawPage wfIsDebugRawPage() ) ) { + if ( !wgUseMWLoggerForLegacyFunctions ( + $wgDebugLogFile == '' || ( !$wgDebugRawPage wfIsDebugRawPage() ) ) ) { return; } - $forward = ''; + $ctx = array( 'elapsed' = $elapsed ); if ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { - $forward = ' forwarded for ' . $_SERVER['HTTP_X_FORWARDED_FOR']; + $ctx['forwarded_for'] = $_SERVER['HTTP_X_FORWARDED_FOR']; } if ( !empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { - $forward .= ' client IP ' . $_SERVER['HTTP_CLIENT_IP']; + $ctx['client_ip'] = $_SERVER['HTTP_CLIENT_IP']; } if ( !empty( $_SERVER['HTTP_FROM'] ) ) { - $forward .= ' from ' . $_SERVER['HTTP_FROM']; + $ctx['from'] = $_SERVER['HTTP_FROM']; } - if ( $forward ) { - $forward = \t(proxied via {$_SERVER['REMOTE_ADDR']}{$forward}); + if ( isset( $ctx['forwarded_for'] ) || + isset( $ctx['client_ip'] ) || + isset( $ctx['from'] ) ) { + $ctx['proxy'] = $_SERVER['REMOTE_ADDR']; } + // Don't load $wgUser at this late stage just for statistics purposes - // @todo FIXME: We can detect some anons even if it is not loaded. See User::getId() + // @todo FIXME: We can detect some anons even if it is not loaded. + // See User::getId() if ( $wgUser-isItemLoaded( 'id' ) $wgUser-isAnon() ) { - $forward .= ' anon'; + $ctx['anon'] = 'anon'; } // Command line script uses a FauxRequest object which does not have // any knowledge about an URL and throw an exception instead. try { - $requestUrl = $wgRequest-getRequestURL(); + $ctx['url'] = urldecode( $wgRequest-getRequestURL() ); } catch ( MWException $e ) { - $requestUrl = 'n/a'; + $ctx['url'] = 'n/a'; } - $log = sprintf( %s\t%04.3f\t%s\n, - gmdate( 'YmdHis' ), $elapsed, - urldecode( $requestUrl . $forward ) ); + if ( $wgUseMWLoggerForLegacyFunctions ) { + $log = MWLogger::getInstance( 'wfLogProfilingData' ); + // NOTE: MWLogger output only supports function report logging + $raw = $profiler-getRawFunctionReport(); + $log-info( 'Total: {total}', array_merge( $ctx, $raw ) ); - wfErrorLog( $log . $profiler-getOutput(), $wgDebugLogFile ); + } else { + $forward = ''; + if ( isset( $ctx['forwarded_for'] )) { + $forward = forwarded for {$ctx['forwarded_for']}; + } + if ( isset( $ctx['client_ip'] ) ) { + $forward .= client IP {$ctx['client_ip']}; + } + if ( isset( $ctx['from'] ) ) { + $forward .= from {$ctx['from']}; + } + if ( $forward ) { +
[MediaWiki-commits] [Gerrit] Add Composer managed libraries - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/119939 Change subject: Add Composer managed libraries .. Add Composer managed libraries This is the initial step towards implementing the Structured logging RFC [0]. The Psr\Log and Monolog libraries are included in the new libs directory which is managed using Composer. The includes/AutoLoader.php script has been modified to require the lib/autoload.php class autoloader script generated by Composer. The PHP 5.4+ \Psr\Log\LoggerAwareTrait and \Psr\Log\LoggerTrait classes have been removed from lib to make the Jenkins lint job less sad. [0]: https://www.mediawiki.org/wiki/Requests_for_comment/Structured_logging See also: I1431b24 (Monolithic implementation) Change-Id: Ie667944416187cfd2ae6016c9e2fa28f4204bcd7 --- M .gitignore M includes/AutoLoader.php A libs/README A libs/autoload.php A libs/composer.json A libs/composer.lock A libs/composer/ClassLoader.php A libs/composer/autoload_classmap.php A libs/composer/autoload_namespaces.php A libs/composer/autoload_psr4.php A libs/composer/autoload_real.php A libs/composer/installed.json A libs/monolog/monolog/CHANGELOG.mdown A libs/monolog/monolog/LICENSE A libs/monolog/monolog/README.mdown A libs/monolog/monolog/composer.json A libs/monolog/monolog/doc/extending.md A libs/monolog/monolog/doc/sockets.md A libs/monolog/monolog/doc/usage.md A libs/monolog/monolog/phpunit.xml.dist A libs/monolog/monolog/src/Monolog/ErrorHandler.php A libs/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php A libs/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php A libs/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php A libs/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php A libs/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php A libs/monolog/monolog/src/Monolog/Formatter/LineFormatter.php A libs/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php A libs/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php A libs/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php A libs/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php A libs/monolog/monolog/src/Monolog/Handler/AbstractHandler.php A libs/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php A libs/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php A libs/monolog/monolog/src/Monolog/Handler/AmqpHandler.php A libs/monolog/monolog/src/Monolog/Handler/BufferHandler.php A libs/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php A libs/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php A libs/monolog/monolog/src/Monolog/Handler/CubeHandler.php A libs/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php A libs/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php A libs/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php A libs/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php A libs/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php A libs/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php A libs/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php A libs/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php A libs/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php A libs/monolog/monolog/src/Monolog/Handler/GelfHandler.php A libs/monolog/monolog/src/Monolog/Handler/GroupHandler.php A libs/monolog/monolog/src/Monolog/Handler/HandlerInterface.php A libs/monolog/monolog/src/Monolog/Handler/HipChatHandler.php A libs/monolog/monolog/src/Monolog/Handler/LogglyHandler.php A libs/monolog/monolog/src/Monolog/Handler/MailHandler.php A libs/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php A libs/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php A libs/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php A libs/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php A libs/monolog/monolog/src/Monolog/Handler/NullHandler.php A libs/monolog/monolog/src/Monolog/Handler/PushoverHandler.php A libs/monolog/monolog/src/Monolog/Handler/RavenHandler.php A libs/monolog/monolog/src/Monolog/Handler/RedisHandler.php A libs/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php A libs/monolog/monolog/src/Monolog/Handler/SocketHandler.php A libs/monolog/monolog/src/Monolog/Handler/StreamHandler.php A libs/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php A libs/monolog/monolog/src/Monolog/Handler/SyslogHandler.php A libs/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php A libs/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php A libs/monolog/monolog/src/Monolog/Handler/TestHandler.php A libs/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php A libs/monolog/monolog/src/Monolog/Logger.php A libs/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php A
[MediaWiki-commits] [Gerrit] Exclude prop=uploadwarning from allimages and stashimageinfo - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Exclude prop=uploadwarning from allimages and stashimageinfo .. Exclude prop=uploadwarning from allimages and stashimageinfo Was added with I4a0af8986f924cd127a73828e72da6998f28536c, but looks only useful on prop=imageinfo Change-Id: I59c5f11f83be7e59f317686ab7fa16ad6fda008b --- M includes/api/ApiQueryAllImages.php M includes/api/ApiQueryStashImageInfo.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index 0591fa9..6e2c31f 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -378,7 +378,7 @@ ); } - private $propertyFilter = array( 'archivename', 'thumbmime' ); + private $propertyFilter = array( 'archivename', 'thumbmime', 'uploadwarning' ); public function getResultProperties() { return array_merge( diff --git a/includes/api/ApiQueryStashImageInfo.php b/includes/api/ApiQueryStashImageInfo.php index 3595cf9..6a49e60 100644 --- a/includes/api/ApiQueryStashImageInfo.php +++ b/includes/api/ApiQueryStashImageInfo.php @@ -72,7 +72,7 @@ private $propertyFilter = array( 'user', 'userid', 'comment', 'parsedcomment', - 'mediatype', 'archivename', + 'mediatype', 'archivename', 'uploadwarning', ); public function getAllowedParams() { -- To view, visit https://gerrit.wikimedia.org/r/112341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59c5f11f83be7e59f317686ab7fa16ad6fda008b Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org Gerrit-Reviewer: Yurik yu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add makefile - change (mediawiki...mathoid)
Physikerwelt has submitted this change and it was merged. Change subject: Add makefile .. Add makefile Change-Id: Id92aab295d19f5ee0026d03f5e0d4c1d44da1e8e npm version of debian package Change-Id: I5f30ebebae567232778127a95bd3b3306c907af5 Prepere for next build * update changelog * add npm build dependency Change-Id: Ifc558fea814cacb33cd7d6a1d451c04d19009d9f Remove version from the npm dependency for now To buld you need at least npm 1.3.0 but dpgk can not finde the npm version, if npm is installed from ppa:chris-lea/node.js Change-Id: I21d32731f06187ebfaf450164089a597fe63d163 WIP: support for MathML input Mathoid on its way to understand MathML input Change-Id: I5f30ebebae567232778127a95bd3b3306c907af5 --- M Makefile M Math A debian/README A debian/README.Debian A debian/README.source A debian/changelog A debian/compat A debian/control A debian/copyright A debian/docs A debian/files A debian/mathoid.debhelper.log A debian/mathoid.default A debian/mathoid.init A debian/mathoid.install A debian/mathoid.logrotate A debian/mathoid.postinst A debian/mathoid.postrm A debian/mathoid.preinst.debhelper A debian/mathoid.prerm.debhelper A debian/mathoid.substvars A debian/mathoid.upstart A debian/rules A debian/source/format A debian/upstart/mathoid.conf M engine.js M index.html M main.js M mathoid-worker.js 29 files changed, 569 insertions(+), 34 deletions(-) Approvals: jenkins-bot: Verified diff --git a/Makefile b/Makefile index a571329..8b138e0 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,6 @@ -.PHONY: all clean install - -all: install - -install: - npm install - -clean: - rm -rf node_modules +all: + npm install + +.PHONY: clean +clean: + rm -rf node_modules diff --git a/Math b/Math index 7059fc8..d463f88 16 --- a/Math +++ b/Math -Subproject commit 7059fc825f456ca923f78931341c454211e04623 +Subproject commit d463f88c18b16d06d0af30619d6baf2ded489bc1 diff --git a/debian/README b/debian/README new file mode 100644 index 000..6cd09c3 --- /dev/null +++ b/debian/README @@ -0,0 +1,6 @@ +The Debian Package mathoid + + +Comments regarding the Package + + -- Moritz Schubotz (Physikerwelt) w...@physikerwelt.de Tue, 11 Feb 2014 17:56:54 + diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 000..588f126 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +mathoid for Debian +-- + +possible notes regarding this package - if none, delete this file + + -- Moritz Schubotz (Physikerwelt) w...@physikerwelt.de Tue, 11 Feb 2014 17:56:54 + diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 000..11c79ca --- /dev/null +++ b/debian/README.source @@ -0,0 +1,9 @@ +mathoid for Debian +-- + +this file describes information about the source package, see Debian policy +manual section 4.14. You WILL either need to modify or delete this file + + + + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000..bc8fe16 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,17 @@ +mathoid (0.1.2) precise; urgency=low + + * Change to semantic version numbers + + -- Moritz Schubotz (Physikerwelt) w...@physikerwelt.de Wed, 12 Feb 2014 23:46:11 + + +mathoid (0.1-0ubuntu1) precise; urgency=low + + * use npm to build the node_packages folder + + -- Moritz Schubotz (Physikerwelt) w...@physikerwelt.de Wed, 12 Feb 2014 21:57:50 + + +mathoid (0.1-0) precise; urgency=low + + * Initial Release. + + -- Moritz Schubotz (Physikerwelt) w...@physikerwelt.de Tue, 11 Feb 2014 17:56:54 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 000..92d71ee --- /dev/null +++ b/debian/control @@ -0,0 +1,18 @@ +Source: mathoid +Section: web +Priority: extra +Maintainer: Moritz Schubotz (Physikerwelt) w...@physikerwelt.de +# To buld you need at least npm 1.3.0 but dpgk can not finde the npm version, +# if npm is installed from ppa:chris-lea/node.js +Build-Depends: debhelper (= 8.0.0), make, npm (= 1.3.0) +Standards-Version: 3.9.2 +Homepage: http://www.formulasearchengine.com/Mathoid +Vcs-Git: https://github.com/physikerwelt/mathoid-deploy.git +Vcs-Browser: https://github.com/physikerwelt/mathoid-deploy + +Package: mathoid +Architecture: any +Depends: nodejs (=0.8.0), phantomjs (=1.9.0), logrotate, adduser, ${shlibs:Depends}, ${misc:Depends} +Enhances: mediawiki +Description: Web service converting LaTeX to MathML + Conversion from LaTeX to MathML node.js web service that uses Phantomjs in the background. See http://www.formulasearchengine.com/mathoid. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000..6ba5044 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,30 @@ +Format:
[MediaWiki-commits] [Gerrit] Remove redundant code and improve accuracy - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Remove redundant code and improve accuracy .. Remove redundant code and improve accuracy Change-Id: I00c6953a041b38c68b658377516a82e8aa9cdb6c --- M resources/js/ext.uls.compactlinks.js 1 file changed, 2 insertions(+), 7 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.compactlinks.js b/resources/js/ext.uls.compactlinks.js index c3fdcfc..27b0695 100644 --- a/resources/js/ext.uls.compactlinks.js +++ b/resources/js/ext.uls.compactlinks.js @@ -198,7 +198,7 @@ currentLangs = getInterlanguageList(), numLanguages = 9, minLanguages = 7, - flagForNumberOfLangs = 0, i, + i, finalList; //Final list of languages to be displayed on page if ( $numOfLangCurrently 9) { @@ -206,7 +206,6 @@ if ( $numOfLangCurrently 9 $numOfLangCurrently = 12 ) { finalList = displayLanguages( minLanguages ); } else { - flagForNumberOfLangs = 1; finalList = displayLanguages( numLanguages ); } @@ -215,11 +214,7 @@ } addULSlink(); - if ( !flagForNumberOfLangs ) { - addLabel( $numOfLangCurrently, minLanguages ); - } else { - addLabel( $numOfLangCurrently, numLanguages ); - } + addLabel( $numOfLangCurrently, finalList.length ); } } -- To view, visit https://gerrit.wikimedia.org/r/119480 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00c6953a041b38c68b658377516a82e8aa9cdb6c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Niharika29 niharikakohl...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adds-changes: generate prev maxrevid if it's missing, small ... - change (operations/dumps)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/119943 Change subject: adds-changes: generate prev maxrevid if it's missing, small code cleanups .. adds-changes: generate prev maxrevid if it's missing, small code cleanups * remove unneeded imports * write out maxrevid for previous run if it's missing and use that for current run boundary * log class instead of 'if verbose' everywhere * turn retrieval of current max revid and prev max revid into dump steps like everything else Change-Id: I7fc3a1768b1487e6ee67f9170936a6862033c7bf --- M xmldumps-backup/incrementals/generateincrementals.py 1 file changed, 130 insertions(+), 108 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps refs/changes/43/119943/1 diff --git a/xmldumps-backup/incrementals/generateincrementals.py b/xmldumps-backup/incrementals/generateincrementals.py index 42761f2..ad2553a 100644 --- a/xmldumps-backup/incrementals/generateincrementals.py +++ b/xmldumps-backup/incrementals/generateincrementals.py @@ -3,23 +3,16 @@ # from the previous adds changes dump, dump stubs, dump history file # based on stubs. -import ConfigParser import getopt import os -import re import sys -import WikiDump -from WikiDump import FileUtils, TimeUtils, MiscUtils -import subprocess -import socket import time -import IncrDumpLib -from IncrDumpLib import Lock, Config, RunSimpleCommand, MultiVersion +from IncrDumpLib import Config, RunSimpleCommand, MultiVersion from IncrDumpLib import DBServer, IncrementDir, IncrementDumpsError -from IncrDumpLib import MaxRevIDFile, StatusFile, IndexFile, IncrDumpLockFile +from IncrDumpLib import MaxRevIDFile, StatusFile, IndexFile from IncrDumpLib import StubFile, RevsFile, MD5File, IncDumpDirs -from IncrDumpLib import IncrDumpLock, MaxRevIDLock, StatusInfo -from subprocess import Popen, PIPE +from IncrDumpLib import IncrDumpLock, StatusInfo +from WikiDump import FileUtils, TimeUtils from os.path import exists import hashlib import traceback @@ -27,26 +20,26 @@ class MaxRevID(object): -def __init__(self, config, date, cutoff): +def __init__(self, config, date, cutoff, dryrun): self._config = config self.date = date self.cutoff = cutoff -self.maxID = 0 +self.dryrun = dryrun +self.maxID = None def getMaxRevID(self, wikiName): query = (select rev_id from revision where rev_timestamp \%s\ order by rev_timestamp desc limit 1 % self.cutoff) db = DBServer(self._config, wikiName) -# get the result -c = db.buildSqlCommand(query) self.maxID = RunSimpleCommand.runWithOutput(db.buildSqlCommand(query), shell=True) def recordMaxRevID(self, wikiName): self.getMaxRevID(wikiName) -fileObj = MaxRevIDFile(self._config, self.date, wikiName) -FileUtils.writeFileInPlace(fileObj.getPath(), self.maxID, - self._config.fileperms) +if not self.dryrun: +fileObj = MaxRevIDFile(self._config, self.date, wikiName) +FileUtils.writeFileInPlace(fileObj.getPath(), self.maxID, + self._config.fileperms) def readMaxRevIDFromFile(self, wikiName, date=None): if date is None: @@ -84,30 +77,28 @@ for w in self._config.allWikisList: result = self.doOneWiki(w) if result: -if (self.verbose): -print result for wiki , w, is , result +log(self.verbose, result for wiki %s is %s +% (w, result)) text = text + li + result + /li\n indexText = (self._config.readTemplate(incrs-index.html) % {items: text}) FileUtils.writeFileInPlace(self.indexFile.getPath(), indexText, self._config.fileperms) -def doOneWiki(self, w): +def doOneWiki(self, w, date=None): if (w not in self._config.privateWikisList and w not in self._config.closedWikisList): -self.incrDumpsDirs = IncDumpDirs(self._config, w) +incrDumpsDirs = IncDumpDirs(self._config, w) if not exists(self.incrDir.getIncDirNoDate(w)): -if (self.verbose): -print No dump for wiki , w -next -if date: +log(self.verbose, No dump for wiki %s % w) +return +if date is not None: incrDate = date else: -incrDate = self.incrDumpsDirs.getLatestIncrDate(True) +incrDate = incrDumpsDirs.getLatestIncrDate(True) if not incrDate: -if (self.verbose): -print No dump for wiki , w -
[MediaWiki-commits] [Gerrit] adds-changes: generate prev maxrevid if it's missing, small ... - change (operations/dumps)
ArielGlenn has submitted this change and it was merged. Change subject: adds-changes: generate prev maxrevid if it's missing, small code cleanups .. adds-changes: generate prev maxrevid if it's missing, small code cleanups * remove unneeded imports * write out maxrevid for previous run if it's missing and use that for current run boundary * log class instead of 'if verbose' everywhere * turn retrieval of current max revid and prev max revid into dump steps like everything else Change-Id: I7fc3a1768b1487e6ee67f9170936a6862033c7bf --- M xmldumps-backup/incrementals/generateincrementals.py 1 file changed, 130 insertions(+), 108 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/xmldumps-backup/incrementals/generateincrementals.py b/xmldumps-backup/incrementals/generateincrementals.py index 42761f2..ad2553a 100644 --- a/xmldumps-backup/incrementals/generateincrementals.py +++ b/xmldumps-backup/incrementals/generateincrementals.py @@ -3,23 +3,16 @@ # from the previous adds changes dump, dump stubs, dump history file # based on stubs. -import ConfigParser import getopt import os -import re import sys -import WikiDump -from WikiDump import FileUtils, TimeUtils, MiscUtils -import subprocess -import socket import time -import IncrDumpLib -from IncrDumpLib import Lock, Config, RunSimpleCommand, MultiVersion +from IncrDumpLib import Config, RunSimpleCommand, MultiVersion from IncrDumpLib import DBServer, IncrementDir, IncrementDumpsError -from IncrDumpLib import MaxRevIDFile, StatusFile, IndexFile, IncrDumpLockFile +from IncrDumpLib import MaxRevIDFile, StatusFile, IndexFile from IncrDumpLib import StubFile, RevsFile, MD5File, IncDumpDirs -from IncrDumpLib import IncrDumpLock, MaxRevIDLock, StatusInfo -from subprocess import Popen, PIPE +from IncrDumpLib import IncrDumpLock, StatusInfo +from WikiDump import FileUtils, TimeUtils from os.path import exists import hashlib import traceback @@ -27,26 +20,26 @@ class MaxRevID(object): -def __init__(self, config, date, cutoff): +def __init__(self, config, date, cutoff, dryrun): self._config = config self.date = date self.cutoff = cutoff -self.maxID = 0 +self.dryrun = dryrun +self.maxID = None def getMaxRevID(self, wikiName): query = (select rev_id from revision where rev_timestamp \%s\ order by rev_timestamp desc limit 1 % self.cutoff) db = DBServer(self._config, wikiName) -# get the result -c = db.buildSqlCommand(query) self.maxID = RunSimpleCommand.runWithOutput(db.buildSqlCommand(query), shell=True) def recordMaxRevID(self, wikiName): self.getMaxRevID(wikiName) -fileObj = MaxRevIDFile(self._config, self.date, wikiName) -FileUtils.writeFileInPlace(fileObj.getPath(), self.maxID, - self._config.fileperms) +if not self.dryrun: +fileObj = MaxRevIDFile(self._config, self.date, wikiName) +FileUtils.writeFileInPlace(fileObj.getPath(), self.maxID, + self._config.fileperms) def readMaxRevIDFromFile(self, wikiName, date=None): if date is None: @@ -84,30 +77,28 @@ for w in self._config.allWikisList: result = self.doOneWiki(w) if result: -if (self.verbose): -print result for wiki , w, is , result +log(self.verbose, result for wiki %s is %s +% (w, result)) text = text + li + result + /li\n indexText = (self._config.readTemplate(incrs-index.html) % {items: text}) FileUtils.writeFileInPlace(self.indexFile.getPath(), indexText, self._config.fileperms) -def doOneWiki(self, w): +def doOneWiki(self, w, date=None): if (w not in self._config.privateWikisList and w not in self._config.closedWikisList): -self.incrDumpsDirs = IncDumpDirs(self._config, w) +incrDumpsDirs = IncDumpDirs(self._config, w) if not exists(self.incrDir.getIncDirNoDate(w)): -if (self.verbose): -print No dump for wiki , w -next -if date: +log(self.verbose, No dump for wiki %s % w) +return +if date is not None: incrDate = date else: -incrDate = self.incrDumpsDirs.getLatestIncrDate(True) +incrDate = incrDumpsDirs.getLatestIncrDate(True) if not incrDate: -if (self.verbose): -print No dump for wiki , w -next +log(self.verbose,
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/json-rewrite' - change (mediawiki...LocalisationUpdate)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/119944 Change subject: Merge remote-tracking branch 'origin/json-rewrite' .. Merge remote-tracking branch 'origin/json-rewrite' Change-Id: I146d20c133d3d0b607230e907c76423574e27dfe --- M .gitreview 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LocalisationUpdate refs/changes/44/119944/1 diff --git a/.gitreview b/.gitreview index f9975eb..da37d04 100644 --- a/.gitreview +++ b/.gitreview @@ -2,4 +2,4 @@ host=gerrit.wikimedia.org port=29418 project=mediawiki/extensions/LocalisationUpdate.git -defaultbranch=json-rewrite +defaultbranch=master -- To view, visit https://gerrit.wikimedia.org/r/119944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I146d20c133d3d0b607230e907c76423574e27dfe Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LocalisationUpdate Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New LocalisationUpdate config - change (operations/mediawiki-config)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/119945 Change subject: New LocalisationUpdate config .. New LocalisationUpdate config Depends on I146d20c133d3d0b Change-Id: Ia006f3a5e24ee4adab2514a59def3232697e2e8b --- M wmf-config/CommonSettings.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/45/119945/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 38d1fa1..a8736a3 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1608,6 +1608,11 @@ if ( $wmgUseLocalisationUpdate ) { require_once( $IP/extensions/LocalisationUpdate/LocalisationUpdate.php ); $wgLocalisationUpdateDirectory = /var/lib/l10nupdate/cache-$wmfVersionNumber; + $wgLocalisationUpdateRepository = 'local'; + $wgLocalisationUpdateRepositories['local'] = array( + 'mediawiki' = '/var/lib/l10nupdate/mediawiki/core/%PATH%', + 'extension' = '/var/lib/l10nupdate/mediawiki/extensions/%NAME%/%PATH%', + ); } if ( $wmgEnableLandingCheck ) { -- To view, visit https://gerrit.wikimedia.org/r/119945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia006f3a5e24ee4adab2514a59def3232697e2e8b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New LocalisationUpdate config - change (operations/puppet)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/119946 Change subject: New LocalisationUpdate config .. New LocalisationUpdate config Depends on Ia006f3a5e24ee4a Change-Id: I111489144d32064374c2dc45b87ee50936f66bf5 --- M files/misc/l10nupdate/l10nupdate-1 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/46/119946/1 diff --git a/files/misc/l10nupdate/l10nupdate-1 b/files/misc/l10nupdate/l10nupdate-1 index 53eca2a..cd2c20e 100755 --- a/files/misc/l10nupdate/l10nupdate-1 +++ b/files/misc/l10nupdate/l10nupdate-1 @@ -5,6 +5,7 @@ BINDIR=/usr/local/bin MWMULTIDIR=$MW_COMMON_SOURCE/multiversion +# The configuration in CommonSettings.php should match GITDIR and GITREPOS GITDIR=/var/lib/l10nupdate/mediawiki GITURL=https://gerrit.wikimedia.org/r/p/mediawiki GITREPOS=core extensions @@ -64,12 +65,8 @@ fi echo Running updates for $mwVerNum (on $mwDbName) - # --svnurl below is a misnomer, obviously, but LU will take it just fine - # Eventually LU should also be changed to be able to use git, for 3rd party usage if /usr/local/bin/mwscript extensions/LocalisationUpdate/update.php \ --wiki=$mwDbName \ - --svnurl=$GITDIR \ - --all \ --quiet then echo Rebuilding localization cache at `date --rfc-3339=seconds` -- To view, visit https://gerrit.wikimedia.org/r/119946 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I111489144d32064374c2dc45b87ee50936f66bf5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add link to PD help translatable pages from sidebar - change (mediawiki/core)
Nemo bis has uploaded a new change for review. https://gerrit.wikimedia.org/r/119947 Change subject: Add link to PD help translatable pages from sidebar .. Add link to PD help translatable pages from sidebar Reuses the existing helppage default message and adds it to ignored messages as Special:MyLanguage is used and translations have to be removed: this does not bother customised local links. Now using HTTPS URL to mediawiki.org per Brion on bug 54835. This slightly increases the footprint of the change but should keep everything functionally equivalent. The sidebar is not bothered by full URLs, except in self-defeating tests which are also fixed here. Bug: 53887 Change-Id: I999b97729536dbab4a3a5efd8d6f86527f031948 --- M RELEASE-NOTES-1.22 M includes/EditPage.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messageTypes.inc M skins/CologneBlue.php M tests/phpunit/skins/SideBarTest.php M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js 8 files changed, 53 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/119947/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 66a3bb9..cf04415 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -9,6 +9,12 @@ === Changes since 1.22.4 === +* (bug 53887) Reintroduced a link to help pages in the default sidebar, that + any sysop can customize by editing [[MediaWiki:Sidebar]] locally. The link + now points to a mediawiki.org page which is guaranteed to exist. Nothing needs + to be done on your end, but remember to adjust [[MediaWiki:Sidebar]] for the + needs of your wikis. Everyone can help with the shared documentation by + translating: https://www.mediawiki.org/wiki/Special:Translate/agg-Help_pages . * (bug 53888) Corrected a regression in 1.22 which introduced red links on the login page. If you previously installed 1.22.x and have created a local page to make the red link blue, write its title as in [[MediaWiki:helplogin-url]] diff --git a/includes/EditPage.php b/includes/EditPage.php index 530e267..6071469 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2049,10 +2049,27 @@ } # Try to add a custom edit intro, or use the standard one if this is not possible. if ( !$this-showCustomIntro() !$this-mTitle-exists() ) { + $helpLink = Skin::makeInternalOrExternalUrl( + wfMessage( 'helppage' )-inContentLanguage()-text() + ); if ( $wgUser-isLoggedIn() ) { - $wgOut-wrapWikiMsg( div class=\mw-newarticletext\\n$1\n/div, 'newarticletext' ); + $wgOut-wrapWikiMsg( + // Suppress the external link icon, consider the help url an internal one + div class=\mw-newarticletext plainlinks\\n$1\n/div, + array( + 'newarticletext', + $helpLink + ) + ); } else { - $wgOut-wrapWikiMsg( div class=\mw-newarticletextanon\\n$1\n/div, 'newarticletextanon' ); + $wgOut-wrapWikiMsg( + // Suppress the external link icon, consider the help url an internal one + div class=\mw-newarticletextanon plainlinks\\n$1\n/div, + array( + 'newarticletextanon', + $helpLink + ) + ); } } # Give a notice if the user is editing a deleted/moved page... diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 26ce598..4f82b86 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -644,6 +644,7 @@ ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage +** helppage|help * SEARCH * TOOLBOX * LANGUAGES', # do not translate or duplicate this message to other languages @@ -912,7 +913,7 @@ 'disclaimerpage' = 'Project:General disclaimer', 'edithelp' = 'Editing help', 'edithelppage' = 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Editing_pages', # do not translate or duplicate this message to other languages -'helppage' = 'Help:Contents', +'helppage' = 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents',
[MediaWiki-commits] [Gerrit] Rename variables for better comprehension - change (mediawiki...UniversalLanguageSelector)
Niharika29 has uploaded a new change for review. https://gerrit.wikimedia.org/r/119948 Change subject: Rename variables for better comprehension .. Rename variables for better comprehension Change-Id: Ifa8da084a93e85201564bae3aa71b0c3c899894b --- M resources/js/ext.uls.compactlinks.js 1 file changed, 15 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/48/119948/1 diff --git a/resources/js/ext.uls.compactlinks.js b/resources/js/ext.uls.compactlinks.js index 27b0695..6e3b370 100644 --- a/resources/js/ext.uls.compactlinks.js +++ b/resources/js/ext.uls.compactlinks.js @@ -196,19 +196,27 @@ function manageInterlaguageList() { var $numOfLangCurrently = $( '.interlanguage-link' ).length, currentLangs = getInterlanguageList(), - numLanguages = 9, - minLanguages = 7, + longListLength = 9, + maxLanguageCheck = 12, + shortListLength = 7, i, - finalList; //Final list of languages to be displayed on page + finalList; // Final list of languages to be displayed on page - if ( $numOfLangCurrently 9) { + // If the total number of languages are between 9(longListLength) and 12(inclusive) then + // we show only 7 (shortListLength) languages (to avoid displaying 2/3 more languages) + // Else, we show 9 languages. Please note that as per the current design of the system, this + // does not always hold true. The language list might exceed 9. This will be fixed as we refine + // the algo for the languages being shown. + + if ( $numOfLangCurrently longListLength ) { hideLanguages(); - if ( $numOfLangCurrently 9 $numOfLangCurrently = 12 ) { - finalList = displayLanguages( minLanguages ); + if ( $numOfLangCurrently longListLength $numOfLangCurrently = maxLanguageCheck ) { + finalList = displayLanguages( shortListLength ); } else { - finalList = displayLanguages( numLanguages ); + finalList = displayLanguages( longListLength ); } + // Output all the languages we have in the finalList to the page for ( i in finalList ) { addLanguage( $.uls.data.getAutonym( finalList[i] ), currentLangs[ finalList[i] ] ); } -- To view, visit https://gerrit.wikimedia.org/r/119948 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa8da084a93e85201564bae3aa71b0c3c899894b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Niharika29 niharikakohl...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make logstash and kibana roles work in labs - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Make logstash and kibana roles work in labs .. Make logstash and kibana roles work in labs Add realm specific configuration following the model of role::elasticsearch so that logstash installs in wmflabs can be performed with puppet. Change-Id: I2649590a2f130b5fbf5f4f997dfa4ba18d4c1cbf --- M manifests/role/kibana.pp M manifests/role/logstash.pp A templates/kibana/apache-auth-ldap.erb A templates/kibana/apache-auth-local.erb M templates/kibana/apache.conf.erb 5 files changed, 77 insertions(+), 22 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/kibana.pp b/manifests/role/kibana.pp index fe6a16c..871cbde 100644 --- a/manifests/role/kibana.pp +++ b/manifests/role/kibana.pp @@ -8,16 +8,52 @@ include ::apache include ::passwords::ldap::production -$hostname = 'logstash.wikimedia.org' -$deploy_dir= '/srv/deployment/kibana/kibana' -$es_host = '127.0.0.1' -$es_port = 9200 -$ldap_authurl = 'ldaps://virt1000.wikimedia.org virt0.wikimedia.org/ou=people,dc=wikimedia,dc=org?cn' -$ldap_bindpass = $passwords::ldap::production::proxypass -$ldap_binddn = 'cn=proxyagent,ou=profile,dc=wikimedia,dc=org' -$ldap_group= 'cn=wmf,ou=groups,dc=wikimedia,dc=org' -$auth_realm= 'WMF Labs (use wiki login name not shell)' -$serveradmin = 'r...@wikimedia.org' +if ($::realm == 'labs') { +if ($::hostname =~ /^deployment-/) { +# Beta +$hostname= 'logstash.beta.wmflabs.org' +$deploy_dir = '/srv/deployment/kibana/kibana' +$auth_realm = 'Logstash (see [[office:User:BDavis_(WMF)/logstash]])' +$auth_file = '/data/project/logstash/.htpasswd' +$require_ssl = true +} else { +# Regular labs instance +$hostname = $::kibana_hostname ? { +undef = $::hostname, +default = $::kibana_hostname, +} +$deploy_dir = $::kibana_deploydir ? { +undef = '/srv/deployment/kibana/kibana', +default = $::kibana_deploydir, +} +$auth_realm = $::kibana_authrealm ? { +undef = 'Logstash', +default = $::kibana_authrealm, +} +$auth_file = $::kibana_authfile ? { +undef = '/data/project/logstash/.htpasswd', +default = $::kibana_authfile, +} +$require_ssl = false +} +$serveradmin = root@${hostname} +$apache_auth = template('kibana/apache-auth-local.erb') +} else { +# Production +$hostname = 'logstash.wikimedia.org' +$deploy_dir= '/srv/deployment/kibana/kibana' +$serveradmin = 'r...@wikimedia.org' +$require_ssl = true + +$ldap_authurl = 'ldaps://virt1000.wikimedia.org virt0.wikimedia.org/ou=people,dc=wikimedia,dc=org?cn' +$ldap_bindpass = $passwords::ldap::production::proxypass +$ldap_binddn = 'cn=proxyagent,ou=profile,dc=wikimedia,dc=org' +$ldap_group= 'cn=wmf,ou=groups,dc=wikimedia,dc=org' +$auth_realm= 'WMF Labs (use wiki login name not shell)' +$apache_auth = template('kibana/apache-auth-ldap.erb') +} +$es_host = '127.0.0.1' +$es_port = 9200 class { '::kibana': default_route = '/dashboard/elasticsearch/default', diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp index 6014477..0d22115 100644 --- a/manifests/role/logstash.pp +++ b/manifests/role/logstash.pp @@ -3,7 +3,7 @@ # == Class: role::logstash # -# Provisions LogStash, Redis, and ElasticSearch. +# Provisions Logstash, Redis, and ElasticSearch. # class role::logstash { include ::elasticsearch::ganglia @@ -12,16 +12,25 @@ deployment::target { 'elasticsearchplugins': } +$minimum_master_nodes = $::realm ? { +'production' = 2, +'labs' = 1, +} +$expected_nodes = $::realm ? { +'production' = 2, +'labs' = 1, +} + class { '::elasticsearch': multicast_group = '224.2.2.5', master_eligible = true, -minimum_master_nodes = 2, -cluster_name = production-logstash-${::site}, +minimum_master_nodes = $minimum_master_nodes, +cluster_name = ${::realm}-logstash-${::site}, heap_memory = '5G', plugins_dir = '/srv/deployment/elasticsearch/plugins', auto_create_index= true, -expected_nodes = 3, -recover_after_nodes = 2, +expected_nodes = $expected_nodes, +recover_after_nodes = $minimum_master_nodes,
[MediaWiki-commits] [Gerrit] Split re-usable parts out of ContributionsQuery - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Split re-usable parts out of ContributionsQuery .. Split re-usable parts out of ContributionsQuery Change-Id: I8dac314453d1bdffe076007a57cb8b1aa7242431 --- M Flow.php M container.php A includes/Formatter/AbstractQuery.php M includes/Formatter/ContributionsQuery.php 4 files changed, 274 insertions(+), 222 deletions(-) Approvals: Werdna: Looks good to me, but someone else must approve Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/Flow.php b/Flow.php index 825a292..21cc076 100755 --- a/Flow.php +++ b/Flow.php @@ -149,6 +149,7 @@ $wgAutoloadClasses['Flow\Log\Formatter'] = $dir . 'includes/Log/Formatter.php'; $wgAutoloadClasses['Flow\Log\PostModerationLogger'] = $dir . 'includes/Log/PostModerationLogger.php'; $wgAutoloadClasses['Flow\Formatter\AbstractFormatter'] = $dir . 'includes/Formatter/AbstractFormatter.php'; +$wgAutoloadClasses['Flow\Formatter\AbstractQuery'] = $dir . 'includes/Formatter/AbstractQuery.php'; $wgAutoloadClasses['Flow\Formatter\CheckUser'] = $dir . 'includes/Formatter/CheckUser.php'; $wgAutoloadClasses['Flow\Formatter\ContributionsQuery'] = $dir . 'includes/Formatter/ContributionsQuery.php'; $wgAutoloadClasses['Flow\Formatter\Contributions'] = $dir . 'includes/Formatter/Contributions.php'; diff --git a/container.php b/container.php index cfe73fb..7c0f35b 100644 --- a/container.php +++ b/container.php @@ -506,8 +506,8 @@ $c['contributions.query'] = $c-share( function( $c ) { return new Flow\Formatter\ContributionsQuery( $c['storage'], - $c['memcache'], $c['repository.tree'], + $c['memcache'], $c['db.factory'] ); } ); diff --git a/includes/Formatter/AbstractQuery.php b/includes/Formatter/AbstractQuery.php new file mode 100644 index 000..f7dbeb3 --- /dev/null +++ b/includes/Formatter/AbstractQuery.php @@ -0,0 +1,262 @@ +?php + +namespace Flow\Formatter; + +use Flow\Model\AbstractRevision; +use Flow\Model\PostRevision; +use Flow\Model\Header; +use Flow\Model\Workflow; +use Flow\Data\ManagerGroup; +use Flow\Model\UUID; +use Flow\Repository\TreeRepository; + +/** + * Base class that collects the data necessary to utilize AbstractFormatter + * based on a list of revisions. In some cases formatters will not utilize + * this query and will instead receive data from a table such as the core + * recentchanges. + */ +abstract class AbstractQuery { + /** +* @var ManagerGroup +*/ + protected $storage; + + /** +* @var TreeRepository +*/ + protected $treeRepo; + + /** +* @var UUID[] Associative array of post ID to root post's UUID object. +*/ + protected $rootPostIdCache = array(); + + /** +* @var PostRevision[] Associative array of post ID to PostRevision object. +*/ + protected $postCache = array(); + + /** +* @var Workflow[] Associative array of workflow ID to Workflow object. +*/ + protected $workflowCache = array(); + + /** +* @param ManagerGroup $storage +* @param TreeRepository $treeRepo +*/ + public function __construct( ManagerGroup $storage, TreeRepository $treeRepo ) { + $this-storage = $storage; + $this-treeRepo = $treeRepo; + } + + /** +* Entry point for batch loading metadata for a variety of revisions +* into the internal cache. +* +* @param AbstractRevision[] $results +*/ + protected function loadMetadataBatch( array $results ) { + // Batch load data related to a list of revisions + $postIds = array(); + $workflowIds = array(); + $previousRevisionIds = array(); + foreach( $results as $result ) { + if ( $result instanceof PostRevision ) { + // If top-level, then just get the workflow. + // Otherwise we need to find the root post. + if ( $result-isTopicTitle() ) { + $workflowIds[] = $result-getPostId(); + } else { + $postIds[] = $result-getPostId(); + } + } elseif ( $result instanceof Header ) { + $workflowIds[] = $result-getWorkflowId(); + } + + $previousRevisionIds[get_class( $result )][] = $result-getPrevRevisionId(); + } + + // map from post Id to the related root post id + $rootPostIds = array_filter( $this-treeRepo-findRoots( $postIds ) ); + + $rootPostRequests =
[MediaWiki-commits] [Gerrit] Sort the combined header+topic revisions after merging - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Sort the combined header+topic revisions after merging .. Sort the combined header+topic revisions after merging Change-Id: I3851469b3b8995a0aebfcb9f7444c9975789ba5a --- M includes/Data/BoardHistoryStorage.php 1 file changed, 5 insertions(+), 6 deletions(-) Approvals: Werdna: Looks good to me, but someone else must approve Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/BoardHistoryStorage.php b/includes/Data/BoardHistoryStorage.php index a33b160..b23602e 100644 --- a/includes/Data/BoardHistoryStorage.php +++ b/includes/Data/BoardHistoryStorage.php @@ -25,12 +25,11 @@ if ( count( $queries ) 1 ) { throw new DataModelException( __METHOD__ . ' expects only one value in $queries', 'process-data' ); } - return RevisionStorage::mergeExternalContent( -array( -$this-findHeaderHistory( $queries, $options ) + -$this-findTopicListHistory( $queries, $options ) -) - ); + $merged = $this-findHeaderHistory( $queries, $options ) + + $this-findTopicListHistory( $queries, $options ); + // newest items at the begining of the list + krsort( $merged ); + return RevisionStorage::mergeExternalContent( array( $merged ) ); } function findHeaderHistory( array $queries, array $options = array() ) { -- To view, visit https://gerrit.wikimedia.org/r/115531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3851469b3b8995a0aebfcb9f7444c9975789ba5a Gerrit-PatchSet: 12 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Bsitu bs...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Werdna agarr...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 62916) Only add hash if it is not None. - change (pywikibot/core)
FelixReimann has uploaded a new change for review. https://gerrit.wikimedia.org/r/119949 Change subject: (bug 62916) Only add hash if it is not None. .. (bug 62916) Only add hash if it is not None. A newly created Claim seems to have claim.hash=None now. This leads site.py to add hash to the query and results in an API Error of working code. Change-Id: I627ed24ed4e71abb560376b1ec2655852134285e --- M pywikibot/site.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/49/119949/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index 78196a5..05a42c6 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3865,7 +3865,9 @@ params['baserevid'] = claim.on_item.lastrevid if bot: params['bot'] = 1 -if not new and hasattr(qualifier, 'hash'): +if (not new and +hasattr(qualifier, 'hash') and +qualifier.hash is not None): params['snakhash'] = qualifier.hash params['token'] = self.token(claim, 'edit') #build up the snak -- To view, visit https://gerrit.wikimedia.org/r/119949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I627ed24ed4e71abb560376b1ec2655852134285e Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: FelixReimann fe...@fex-it.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 62916) Only add hash if it is not None. - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 62916) Only add hash if it is not None. .. (bug 62916) Only add hash if it is not None. A newly created Claim seems to have claim.hash=None now. This leads site.py to add hash to the query and results in an API Error of previously working code. Change-Id: I627ed24ed4e71abb560376b1ec2655852134285e --- M pywikibot/site.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/site.py b/pywikibot/site.py index 78196a5..0d1e92d 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3865,7 +3865,9 @@ params['baserevid'] = claim.on_item.lastrevid if bot: params['bot'] = 1 -if not new and hasattr(qualifier, 'hash'): +if (not new and +hasattr(qualifier, 'hash') and +qualifier.hash is not None): params['snakhash'] = qualifier.hash params['token'] = self.token(claim, 'edit') #build up the snak -- To view, visit https://gerrit.wikimedia.org/r/119949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I627ed24ed4e71abb560376b1ec2655852134285e Gerrit-PatchSet: 3 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: FelixReimann fe...@fex-it.de Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] move mounts on stat1/1002 from dataset2 to dataset1001 - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/119950 Change subject: move mounts on stat1/1002 from dataset2 to dataset1001 .. move mounts on stat1/1002 from dataset2 to dataset1001 Change-Id: I363f84665d86db7a95bd3f8128d34c3c811883f9 --- M manifests/misc/statistics.pp 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/50/119950/1 diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index ae09004..e3efc15 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -129,7 +129,7 @@ } } -# Mounts /data from dataset2 server. +# Mounts /data from dataset1001 server. # xmldumps and other misc files needed # for generating statistics are here. class misc::statistics::dataset_mount { @@ -139,9 +139,9 @@ file { /mnt/data: ensure = directory } mount { /mnt/data: -device = 208.80.152.185:/data, +device = 208.80.154.11:/data, fstype = nfs, -options = ro,bg,tcp,rsize=8192,wsize=8192,timeo=14,intr,addr=208.80.152.185, +options = ro,bg,tcp,rsize=8192,wsize=8192,timeo=14,intr,addr=208.80.154.11, atboot = true, require = [File['/mnt/data'], Class[nfs::common]], ensure = mounted, -- To view, visit https://gerrit.wikimedia.org/r/119950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I363f84665d86db7a95bd3f8128d34c3c811883f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] move mounts on stat1/1002 from dataset2 to dataset1001 - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: move mounts on stat1/1002 from dataset2 to dataset1001 .. move mounts on stat1/1002 from dataset2 to dataset1001 Change-Id: I363f84665d86db7a95bd3f8128d34c3c811883f9 --- M manifests/misc/statistics.pp 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index ae09004..e3efc15 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -129,7 +129,7 @@ } } -# Mounts /data from dataset2 server. +# Mounts /data from dataset1001 server. # xmldumps and other misc files needed # for generating statistics are here. class misc::statistics::dataset_mount { @@ -139,9 +139,9 @@ file { /mnt/data: ensure = directory } mount { /mnt/data: -device = 208.80.152.185:/data, +device = 208.80.154.11:/data, fstype = nfs, -options = ro,bg,tcp,rsize=8192,wsize=8192,timeo=14,intr,addr=208.80.152.185, +options = ro,bg,tcp,rsize=8192,wsize=8192,timeo=14,intr,addr=208.80.154.11, atboot = true, require = [File['/mnt/data'], Class[nfs::common]], ensure = mounted, -- To view, visit https://gerrit.wikimedia.org/r/119950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I363f84665d86db7a95bd3f8128d34c3c811883f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] enable category_redirect.py for sh-wiki - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119951 Change subject: enable category_redirect.py for sh-wiki .. enable category_redirect.py for sh-wiki Change-Id: I308cbcc7d704b121f106112f9a56ebbde04e6aa8 --- M category_redirect.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/51/119951/1 diff --git a/category_redirect.py b/category_redirect.py index 0354831..d428783 100644 --- a/category_redirect.py +++ b/category_redirect.py @@ -72,6 +72,7 @@ 'pt': Categoria:!Redirecionamentos de categorias, 'ru': Категория:Википедия:Категории-дубликаты, 'simple': Category:Category redirects, +'sh': uKategorija:Preusmjerene kategorije Wikipedije 'vi': uThể loại:Thể loại đổi hướng, 'zh': uCategory:已重定向的分类, }, -- To view, visit https://gerrit.wikimedia.org/r/119951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I308cbcc7d704b121f106112f9a56ebbde04e6aa8 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update ES puppet conf - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Update ES puppet conf .. Update ES puppet conf * No need to store the deb file anymore, the module manages repos * New version of ES * Updated the elasticsearch module to latest master Change-Id: I03386f1119186d623f642d6ead6fd3df8020014c --- M puppet/modules/elasticsearch M puppet/site.pp 2 files changed, 8 insertions(+), 4 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/elasticsearch b/puppet/modules/elasticsearch index 70b70fb..aa39994 16 --- a/puppet/modules/elasticsearch +++ b/puppet/modules/elasticsearch -Subproject commit 70b70fb70782dbd64a0bc52fa9d4d4d3437e28d3 +Subproject commit aa399948655beca3ecc192e933ba7a497d1cbe8f diff --git a/puppet/site.pp b/puppet/site.pp index 171d522..09d9c24 100644 --- a/puppet/site.pp +++ b/puppet/site.pp @@ -31,9 +31,13 @@ user = 'betawiki', } - package { 'elasticsearch': -provider = dpkg, -ensure = latest, -source = '/root/packages/elasticsearch-0.90.3.deb' + class { 'elasticsearch': +manage_repo = true, +repo_version = '1.0', +config = {}, + } + + elasticsearch::plugin { 'mobz/elasticsearch-head': +module_dir = 'head' } } -- To view, visit https://gerrit.wikimedia.org/r/119727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03386f1119186d623f642d6ead6fd3df8020014c Gerrit-PatchSet: 2 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw-update-l10n: show # of threads used - change (mediawiki...scap)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/119952 Change subject: mw-update-l10n: show # of threads used .. mw-update-l10n: show # of threads used Append the number of threads being used when rebuilding the localisation cache and refreshing the cdb json files. Message shown would be: Updating LocalisationCache for master using 2 thread(s) Change-Id: I07df7f030647e3eb0938507ed2139d72b19fa4bf --- M bin/mw-update-l10n 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/52/119952/1 diff --git a/bin/mw-update-l10n b/bin/mw-update-l10n index d3e7eeb..08200aa 100755 --- a/bin/mw-update-l10n +++ b/bin/mw-update-l10n @@ -98,7 +98,7 @@ fi # Rebuild all the CDB files for each language - echo -n Updating LocalisationCache for $mwVerNum... + echo -n Updating LocalisationCache for $mwVerNum... using $THREADS thread(s) sudo -u l10nupdate $BINDIR/mwscript rebuildLocalisationCache.php \ --wiki=$mwDbName --outdir=$mwL10nCacheDir $QUIET \ --threads=$THREADS $FORCE_FULL_REBUILD || -- To view, visit https://gerrit.wikimedia.org/r/119952 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07df7f030647e3eb0938507ed2139d72b19fa4bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove enableSiteLinkWidget setting in the client - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove enableSiteLinkWidget setting in the client .. Remove enableSiteLinkWidget setting in the client This is true by default, and has been for a while and true, as used on wikimedia sites. The setting was introduced when the widget was introduced, just in case there were performance issues and it had to be disabled. No need for the setting now and makes things over complex. Change-Id: I5e143dbba00dc524ce412c3ab6abd53abbd90226 --- M client/RELEASE-NOTES M client/WikibaseClient.hooks.php M client/config/WikibaseClient.default.php M client/includes/RepoItemLinkGenerator.php M client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php M docs/options.wiki 6 files changed, 5 insertions(+), 12 deletions(-) Approvals: WikidataJenkins: Verified Daniel Kinzler: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/client/RELEASE-NOTES b/client/RELEASE-NOTES index 2aaf900..eba16cf 100644 --- a/client/RELEASE-NOTES +++ b/client/RELEASE-NOTES @@ -3,7 +3,8 @@ Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Wikibase_Client Latest version of the release notes: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Wikibase.git;a=blob;f=client/RELEASE-NOTES - +=== Version 0.5 === +* Removed enableSiteLinkWidget setting, which was true by default. === Version 0.4 === (dev) diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index db4b34a..4900c43 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -503,7 +503,7 @@ // (as that only runs after the element initially appeared). $out-addModules( 'wikibase.client.nolanglinks' ); - if ( $settings-getSetting( 'enableSiteLinkWidget' ) === true $user-isLoggedIn() === true ) { + if ( $user-isLoggedIn() === true ) { // Add the JavaScript which lazy-loads the link item widget // (needed as jquery.wikibase.linkitem has pretty heavy dependencies) $out-addModules( 'wikibase.client.linkitem.init' ); @@ -588,7 +588,6 @@ WikibaseClient::getDefaultInstance()-getNamespaceChecker(), $repoLinker, $entityIdParser, - $settings-getSetting( 'enableSiteLinkWidget' ), $siteGroup ); diff --git a/client/config/WikibaseClient.default.php b/client/config/WikibaseClient.default.php index 77660b7..36eaf5e 100644 --- a/client/config/WikibaseClient.default.php +++ b/client/config/WikibaseClient.default.php @@ -37,7 +37,6 @@ 'wikibase-property' = 'Property' ), 'allowDataTransclusion' = true, - 'enableSiteLinkWidget' = true, 'propagateChangesToRepo' = true, 'otherProjectsLinks' = array(), diff --git a/client/includes/RepoItemLinkGenerator.php b/client/includes/RepoItemLinkGenerator.php index 0008102..90e0588 100644 --- a/client/includes/RepoItemLinkGenerator.php +++ b/client/includes/RepoItemLinkGenerator.php @@ -19,8 +19,6 @@ protected $entityIdParser; - protected $enableSiteLinkWidget; - protected $siteGroup; /** @@ -29,16 +27,14 @@ * @param NamespaceChecker $namespaceChecker * @param RepoLinker $repoLinker * @param EntityIdParser $entityIdParser -* @param boolean $enableSiteLinkWidget * @param string $siteGroup */ public function __construct( NamespaceChecker $namespaceChecker, RepoLinker $repoLinker, - EntityIdParser $entityIdParser, $enableSiteLinkWidget, $siteGroup ) { + EntityIdParser $entityIdParser, $siteGroup ) { $this-namespaceChecker = $namespaceChecker; $this-repoLinker = $repoLinker; $this-entityIdParser = $entityIdParser; - $this-enableSiteLinkWidget = $enableSiteLinkWidget; $this-siteGroup = $siteGroup; } @@ -63,7 +59,7 @@ // link to the associated item on the repo $editLink = $this-getEditLinksLink( $entityId ); } else { - if ( $this-enableSiteLinkWidget === true ! $isAnon ) { + if ( !$isAnon ) { $editLink = $this-getAddLinksLink(); } } diff --git a/client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php b/client/tests/phpunit/includes/RepoItemLinkGeneratorTest.php index 5f9c0db..c6d65bc 100644 ---
[MediaWiki-commits] [Gerrit] Fix: Remove MathML out if used as input - change (mediawiki...mathoid)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119953 Change subject: Fix: Remove MathML out if used as input .. Fix: Remove MathML out if used as input * For some reason it causes problems if the input MathML is used in the output and contains special chars. * Since the output MathML is not really needed in the output the mml field is set to '' and src field is set to the static value 'mathml' in that case. Bug 62921 Change-Id: I1781c18eb2a766eba16757da4f265fde42573fb2 --- M engine.js 1 file changed, 397 insertions(+), 173 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid refs/changes/53/119953/1 diff --git a/engine.js b/engine.js index 5b3a7df..94c9277 100644 --- a/engine.js +++ b/engine.js @@ -1,183 +1,407 @@ -// perfect singleton -window.engine = (new (function() { +// Version +var VERSION = '0.1-dev'; - this.Q = MathJax.Hub.queue; - this.tex = null; - this.mml = null; - this.buffer = []; +var system = require('system'); +var args = system.args; +var server = require('webserver').create(); +var page = require('webpage').create(); +var fs = require('fs'); -//jax to MathML -function toMathML(jax,callback) { -var mml, -success = false; -try { -mml = jax.root.toMathML(''); -if( mml.indexOf('mtext mathcolor=red') == -1 ){ -success = true; -} -} catch(err) { -if (!err.restart) {throw err;} // an actual error -return MathJax.Callback.After([toMathML,jax,callback],err.restart); +var usage = +'Usage: phantomjs main.js [options]\n' + +'Options:\n' + +' -h,--helpPrint this usage message and exit\n' + +' -v,--version Print the version number and exit\n' + +' -p,--port port IP port on which to start the server\n' + +' -r,--requests num Process this many requests and then exit. -1 means \n' + +' never stop.\n' + +' -b,--bench pageUse alternate bench page (default is index.html)\n' + +' -d,--debug Enable verbose debug messages\n'; + +var port = 16000; +var requests_to_serve = -1; +var bench_page = 'index.html'; +var debug = false; + +// Parse command-line options. This keeps track of which one we are on +var arg_num = 1; + +// Helper function for option parsing. Allow option/arg in any of +// these forms: +//1: -p 1234 +//2: --po 1234 +//3: --po=1234 +// Returns: +//1 or 2: true +//3: '1234' +//else: false +function option_match(name, takes_optarg, arg) { +var ieq = arg.indexOf('='); + +var arg_key; +if (arg.substr(0, 2) == '--' (takes_optarg ieq != -1)) { // form #3 +arg_key = arg.substring(2, ieq); +if (name.substr(0, arg_key.length) == arg_key) { +return arg.substr(ieq + 1); } -MathJax.Callback(callback)(mml,success); +return false; } - // bind helper. - this.bind = function(method) { -var engine = this; -return function() { - return method.apply(engine, arguments); -}; - }; - - // Initialize engine. - this._init = function() { -this.Q.Push(this.bind(function () { - this.tex = { -div: document.getElementById(math-tex), -jax: MathJax.Hub.getAllJax(math-tex)[0], -last_width: null, -last_q: '' - } - this.mml = { -div: document.getElementById(math-mml), -jax: MathJax.Hub.getAllJax(math-mml)[0], -last_width: null, -last_q: '' - } - this._process_buffered(); -})); - }; - - // This helper function determines whether or not a text node inside the SVG - // output from MathJax is an error message. It uses the default error message - // fill color. Note that the constant #C00 could be overriden by the MathJax - // config!! - this._text_is_error = function(txt) { -return txt.getAttribute(fill) == #C00 - txt.getAttribute(stroke) == none; - }; - - // Serialize an (svg) element - this._serialize = function(svg) { -var tmpDiv = document.createElement('div'); -tmpDiv.appendChild(svg); -return tmpDiv.innerHTML; - }; - - // MathJax keeps parts of SVG symbols in one hidden svg at - // the begining of the DOM, this function should take two - // SVGs and return one stand-alone svg which could be - // displayed like an image on some different page. - this._merge = function(svg) { -var origDefs = document.getElementById('MathJax_SVG_Hidden') - .nextSibling.childNodes[0]; -var defs = origDefs.cloneNode(false); - -// append shallow defs and change xmlns. -svg.insertBefore(defs, svg.childNodes[0]); -svg.setAttribute(xmlns, http://www.w3.org/2000/svg;); - -// clone and copy all used paths into local defs. -// xlink:href in uses FIX
[MediaWiki-commits] [Gerrit] mw-update-l10n: show # of threads used - change (mediawiki...scap)
jenkins-bot has submitted this change and it was merged. Change subject: mw-update-l10n: show # of threads used .. mw-update-l10n: show # of threads used Append the number of threads being used when rebuilding the localisation cache and refreshing the cdb json files. Message shown would be: Updating LocalisationCache for master using 2 thread(s) Change-Id: I07df7f030647e3eb0938507ed2139d72b19fa4bf --- M bin/mw-update-l10n 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/mw-update-l10n b/bin/mw-update-l10n index d3e7eeb..1bcb780 100755 --- a/bin/mw-update-l10n +++ b/bin/mw-update-l10n @@ -98,7 +98,7 @@ fi # Rebuild all the CDB files for each language - echo -n Updating LocalisationCache for $mwVerNum... + echo -n Updating LocalisationCache for $mwVerNum using $THREADS thread(s)... sudo -u l10nupdate $BINDIR/mwscript rebuildLocalisationCache.php \ --wiki=$mwDbName --outdir=$mwL10nCacheDir $QUIET \ --threads=$THREADS $FORCE_FULL_REBUILD || -- To view, visit https://gerrit.wikimedia.org/r/119952 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07df7f030647e3eb0938507ed2139d72b19fa4bf Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] enable category_redirect.py for sh-wiki, update from compat - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119954 Change subject: enable category_redirect.py for sh-wiki, update from compat .. enable category_redirect.py for sh-wiki, update from compat Change-Id: Iaff63bea4dfc042eb99a05093ca52df0d0887fe4 --- M pywikibot/families/wikipedia_family.py M scripts/category_redirect.py 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/54/119954/1 diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index 350fbfa..215c4d9 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -94,6 +94,13 @@ 'simple': (u'Category redirect', u'Categoryredirect', u'Catredirect',), +'sh': (u'Prekat', + u'Preusmeri kategoriju', + u'Preusmjeri kategoriju', + u'Prekategorizuj', + u'Catred', + u'Catredirect', + u'Category redirect'), 'sl': (u'Category redirect',), 'sq': (u'Kategori e zhvendosur', u'Category redirect',), diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py index 8d3f10a..7e71e1c 100755 --- a/scripts/category_redirect.py +++ b/scripts/category_redirect.py @@ -62,6 +62,7 @@ 'pt': Categoria:!Redirecionamentos de categorias, 'ru': Категория:Википедия:Категории-дубликаты, 'simple': Category:Category redirects, +'sh': uKategorija:Preusmjerene kategorije Wikipedije, 'vi': uThể loại:Thể loại đổi hướng, 'zh': uCategory:已重定向的分类, }, -- To view, visit https://gerrit.wikimedia.org/r/119954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaff63bea4dfc042eb99a05093ca52df0d0887fe4 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] enable category_redirect.py for sh-wiki, update from compat - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: enable category_redirect.py for sh-wiki, update from compat .. enable category_redirect.py for sh-wiki, update from compat Change-Id: Iaff63bea4dfc042eb99a05093ca52df0d0887fe4 --- M pywikibot/families/wikipedia_family.py M scripts/category_redirect.py 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index 350fbfa..215c4d9 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -94,6 +94,13 @@ 'simple': (u'Category redirect', u'Categoryredirect', u'Catredirect',), +'sh': (u'Prekat', + u'Preusmeri kategoriju', + u'Preusmjeri kategoriju', + u'Prekategorizuj', + u'Catred', + u'Catredirect', + u'Category redirect'), 'sl': (u'Category redirect',), 'sq': (u'Kategori e zhvendosur', u'Category redirect',), diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py index 8d3f10a..7e71e1c 100755 --- a/scripts/category_redirect.py +++ b/scripts/category_redirect.py @@ -62,6 +62,7 @@ 'pt': Categoria:!Redirecionamentos de categorias, 'ru': Категория:Википедия:Категории-дубликаты, 'simple': Category:Category redirects, +'sh': uKategorija:Preusmjerene kategorije Wikipedije, 'vi': uThể loại:Thể loại đổi hướng, 'zh': uCategory:已重定向的分类, }, -- To view, visit https://gerrit.wikimedia.org/r/119954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaff63bea4dfc042eb99a05093ca52df0d0887fe4 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Option to increase verbosity of refreshCdbJsonFiles - change (mediawiki...scap)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/119955 Change subject: Option to increase verbosity of refreshCdbJsonFiles .. Option to increase verbosity of refreshCdbJsonFiles Generating the JSON and md5 files can take a while (up to 2 minutes on the beta cluster) which leave people with little clues about what is going on. The patch adds an optional --verbose option to refreshCdbJsonFiles which is passed to it whenever mw-update-l10n is invoked with --verbose. Change-Id: I0cfd59f0fd1ab962522b9d3008631560433959a0 --- M bin/mw-update-l10n M bin/refreshCdbJsonFiles 2 files changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap refs/changes/55/119955/1 diff --git a/bin/mw-update-l10n b/bin/mw-update-l10n index 1bcb780..cec4f3b 100755 --- a/bin/mw-update-l10n +++ b/bin/mw-update-l10n @@ -21,6 +21,7 @@ fi QUIET=--quiet +VERBOSE= FORCE_FULL_REBUILD= TEMP=`getopt -o '' -l verbose -- $@` if [ $? -ne 0 ]; then @@ -31,6 +32,7 @@ case $1 in --verbose) QUIET= + VERBOSE='--verbose' shift ;; --) @@ -103,9 +105,12 @@ --wiki=$mwDbName --outdir=$mwL10nCacheDir $QUIET \ --threads=$THREADS $FORCE_FULL_REBUILD || die + echo done # Include JSON versions of the CDB files and add MD5 files - sudo -u l10nupdate $BINDIR/refreshCdbJsonFiles --directory=$MW_COMMON_SOURCE/php-$mwVerNum/cache/l10n \ + echo Generating JSON versions and md5 files... + sudo -u l10nupdate $BINDIR/refreshCdbJsonFiles $VERBOSE \ + --directory=$MW_COMMON_SOURCE/php-$mwVerNum/cache/l10n \ --threads=$THREADS \ || die diff --git a/bin/refreshCdbJsonFiles b/bin/refreshCdbJsonFiles index 9fd4c13..37180ed 100755 --- a/bin/refreshCdbJsonFiles +++ b/bin/refreshCdbJsonFiles @@ -2,7 +2,7 @@ ?php /** - * Create JSON/MD5 files for all CDB files in a directory + * Create JSON/MD5 files for all CDB files in a directory. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ } $script = new RefreshCdbJsonFiles( - getopt( '', array( 'directory:', 'threads:' ) ) + getopt( '', array( 'verbose', 'directory:', 'threads:' ) ) ); $script-execute(); @@ -53,12 +53,13 @@ public function __construct( array $params ) { foreach ( array( 'directory' ) as $par ) { if ( !isset( $params[$par] ) ) { - die( Usage: refreshCdbJsonFiles . + die( Usage: refreshCdbJsonFiles [--verbose] . --directory directory --threads integer\n ); } } $this-params = $params; + $this-params['verbose'] = isset( $params['verbose'] ); $this-params['threads'] = isset( $params['threads'] ) ? $params['threads'] : 1; } @@ -146,6 +147,9 @@ protected function doUpdate( $directory, array $files, $resFile ) { $rebuilt = 0; foreach ( $files as $file ) { + if ( $this-params['verbose' ) { + $this-output( Processing $directory/$file\n ); + } $newCdbMd5 = md5_file( $directory/$file ); if ( is_file( $directory/upstream/$file.MD5 ) is_file( $directory/upstream/$file.json ) -- To view, visit https://gerrit.wikimedia.org/r/119955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0cfd59f0fd1ab962522b9d3008631560433959a0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/scap Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix JS error seen on TwnMainPage if webfonts were enabled - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/119956 Change subject: Fix JS error seen on TwnMainPage if webfonts were enabled .. Fix JS error seen on TwnMainPage if webfonts were enabled Fixed by adding dependency to needed module Change-Id: Ic1295c00d7f02580f808944cf181827f71e2791e --- M Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/56/119956/1 diff --git a/Resources.php b/Resources.php index bfe56ae..a1a5918 100644 --- a/Resources.php +++ b/Resources.php @@ -80,6 +80,7 @@ $wgResourceModules['ext.uls.eventlogger'] = array( 'scripts' = 'resources/js/ext.uls.eventlogger.js', 'dependencies' = array( + 'mediawiki.user', 'schema.UniversalLanguageSelector', 'schema.UniversalLanguageSelector-tofu', ), -- To view, visit https://gerrit.wikimedia.org/r/119956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1295c00d7f02580f808944cf181827f71e2791e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fastpath getMulti/gotMulti when using CachingObjectMapper - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: fastpath getMulti/gotMulti when using CachingObjectMapper .. fastpath getMulti/gotMulti when using CachingObjectMapper Change-Id: I0cc83545119cf5e011694eebf50d87df015e3d90 --- M includes/Data/BasicObjectMapper.php M includes/Data/CachingObjectMapper.php M includes/Data/ObjectLocator.php M includes/Data/ObjectMapper.php 4 files changed, 56 insertions(+), 23 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/BasicObjectMapper.php b/includes/Data/BasicObjectMapper.php index f2906c3..71789c5 100644 --- a/includes/Data/BasicObjectMapper.php +++ b/includes/Data/BasicObjectMapper.php @@ -29,4 +29,8 @@ public function fromStorageRow( array $row, $object = null ) { return call_user_func( $this-fromStorageRow, $row, $object ); } + + public function get( array $pk ) { + return null; + } } diff --git a/includes/Data/CachingObjectMapper.php b/includes/Data/CachingObjectMapper.php index cd1557f..82ec6d6 100644 --- a/includes/Data/CachingObjectMapper.php +++ b/includes/Data/CachingObjectMapper.php @@ -2,6 +2,8 @@ namespace Flow\Data; +use Flow\Model\UUID; + class CachingObjectMapper implements ObjectMapper { protected $toStorageRow; @@ -67,18 +69,21 @@ } /** -* @param array|string $pk -* @return object +* @param array $primaryKey +* @return object|null * @throws \InvalidArgumentException -* @throws \OutOfBoundsException */ - public function get( $pk ) { - $pk = (array)$pk; - ksort( $pk ); - if ( array_keys( $pk ) !== $this-primaryKey ) { + public function get( array $primaryKey ) { + $primaryKey = UUID::convertUUIDs( $primaryKey ); + ksort( $primaryKey ); + if ( array_keys( $primaryKey ) !== $this-primaryKey ) { throw new \InvalidArgumentException; } - return $this-loaded[$pk]; + try { + return $this-loaded[$primaryKey]; + } catch ( \OutOfBoundsException $e ) { + return null; + } } public function clear() { diff --git a/includes/Data/ObjectLocator.php b/includes/Data/ObjectLocator.php index dcd2cf1..7493870 100644 --- a/includes/Data/ObjectLocator.php +++ b/includes/Data/ObjectLocator.php @@ -66,6 +66,7 @@ if ( !$queries ) { return array(); } + $keys = array_keys( reset( $queries ) ); if ( isset( $options['sort'] ) !is_array( $options['sort'] ) ) { $options['sort'] = ObjectManager::makeArray( $options['sort'] ); @@ -156,21 +157,30 @@ if ( !$objectIds ) { return array(); } - $pk = $this-storage-getPrimaryKeyColumns(); + $primaryKey = $this-storage-getPrimaryKeyColumns(); $queries = array(); + $retval = null; foreach ( $objectIds as $id ) { - $queries[] = array_combine( $pk, ObjectManager::makeArray( $id ) ); + //check internal cache + $query = array_combine( $primaryKey, ObjectManager::makeArray( $id ) ); + $obj = $this-mapper-get( $query ); + if ( $obj === null ) { + $queries[] = $query; + } else { + $retval[] = $obj; + } } - // primary key is unique, but indexes still return their results as array - // to be consistent. undo that for a flat result array - $res = $this-findMulti( $queries ); - if ( !$res ) { - return null; + if ( $queries ) { + $res = $this-findMulti( $queries ); + if ( $res ) { + foreach ( $res as $row ) { + // primary key is unique, but indexes still return their results as array + // to be consistent. undo that for a flat result array + $retval[] = reset( $row ); + } + } } - $retval = array(); - foreach ( $res as $row ) { - $retval[] = reset( $row ); - } + return $retval; } @@ -204,14 +214,20 @@ return true; } - $pk =
[MediaWiki-commits] [Gerrit] Support additional spaces in dates, e.g. 31. 12. 2013 - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/119958 Change subject: Support additional spaces in dates, e.g. 31. 12. 2013 .. Support additional spaces in dates, e.g. 31. 12. 2013 Technically you need to use narrow spaces in 31. 12. 2013. Since narrow spaces aren't easy to use people either left them out or use normal spaces. Both should be supported in most cases. Change-Id: I139cf76fa8876c4ac416dbb81232bd172fd9eda3 --- M lib/includes/parsers/DateTimeParser.php M lib/includes/parsers/YearMonthTimeParser.php M lib/tests/phpunit/parsers/DateTimeParserTest.php M lib/tests/phpunit/parsers/YearMonthTimeParserTest.php 4 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/58/119958/1 diff --git a/lib/includes/parsers/DateTimeParser.php b/lib/includes/parsers/DateTimeParser.php index 85b26bc..898c0fe 100644 --- a/lib/includes/parsers/DateTimeParser.php +++ b/lib/includes/parsers/DateTimeParser.php @@ -80,7 +80,7 @@ * @return mixed */ private function getValueWithFixedSeparators( $value ) { - return preg_replace( '/\s+/', '.', $value ); + return preg_replace( '/[\s.]+/', '.', $value ); } /** diff --git a/lib/includes/parsers/YearMonthTimeParser.php b/lib/includes/parsers/YearMonthTimeParser.php index d91c555..9e5f3d8 100644 --- a/lib/includes/parsers/YearMonthTimeParser.php +++ b/lib/includes/parsers/YearMonthTimeParser.php @@ -48,7 +48,7 @@ */ protected function stringParse( $value ) { //Matches Year and month separated by a separator, \p{L} matches letters outside the ASCII range - if( !preg_match( '/^([\d\p{L}]+)[\/\-\s\.\,]([\d\p{L}]+)$/', trim( $value ), $matches ) ) { + if( !preg_match( '/^([\d\p{L}]+)\s*[\/\-\s.,]\s*([\d\p{L}]+)$/', trim( $value ), $matches ) ) { throw new ParseException( 'Failed to parse year and month: ' . $value ); } list( ,$a, $b ) = $matches; diff --git a/lib/tests/phpunit/parsers/DateTimeParserTest.php b/lib/tests/phpunit/parsers/DateTimeParserTest.php index de40bec..8754ffd 100644 --- a/lib/tests/phpunit/parsers/DateTimeParserTest.php +++ b/lib/tests/phpunit/parsers/DateTimeParserTest.php @@ -50,12 +50,16 @@ array( '+2010-10-10T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), '10.10.2010' = array( '+2010-10-10T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), + '10. 10. 2010' = + array( '+2010-10-10T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), '10 10 2010' = array( '+2010-10-10T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), '10/10/0010' = array( '+0010-10-10T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), '1 July 2013' = array( '+2013-07-01T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), + '1. July 2013' = + array( '+2013-07-01T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), '1 Jul 2013' = array( '+2013-07-01T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), 'January 9 1920' = diff --git a/lib/tests/phpunit/parsers/YearMonthTimeParserTest.php b/lib/tests/phpunit/parsers/YearMonthTimeParserTest.php index 11291eb..b46e833 100644 --- a/lib/tests/phpunit/parsers/YearMonthTimeParserTest.php +++ b/lib/tests/phpunit/parsers/YearMonthTimeParserTest.php @@ -73,12 +73,16 @@ array( '+1999-01-00T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_MONTH , TimeFormatter::CALENDAR_GREGORIAN ), '1/1999' = array( '+1999-01-00T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_MONTH , TimeFormatter::CALENDAR_GREGORIAN ), + '1 / 1999' = + array( '+1999-01-00T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_MONTH , TimeFormatter::CALENDAR_GREGORIAN ), '1 1999' = array( '+1999-01-00T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_MONTH ,
[MediaWiki-commits] [Gerrit] Fix JS error seen on TwnMainPage if webfonts were enabled - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Fix JS error seen on TwnMainPage if webfonts were enabled .. Fix JS error seen on TwnMainPage if webfonts were enabled Fixed by adding dependency to needed module Change-Id: Ic1295c00d7f02580f808944cf181827f71e2791e --- M Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index bfe56ae..a1a5918 100644 --- a/Resources.php +++ b/Resources.php @@ -80,6 +80,7 @@ $wgResourceModules['ext.uls.eventlogger'] = array( 'scripts' = 'resources/js/ext.uls.eventlogger.js', 'dependencies' = array( + 'mediawiki.user', 'schema.UniversalLanguageSelector', 'schema.UniversalLanguageSelector-tofu', ), -- To view, visit https://gerrit.wikimedia.org/r/119956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1295c00d7f02580f808944cf181827f71e2791e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unnecessary re-renderings in snakview - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/119959 Change subject: Remove unnecessary re-renderings in snakview .. Remove unnecessary re-renderings in snakview This is a part of the fix for bug 61739 and a prerequisite for fixing bug 62527. Change-Id: I59981f22a2827833be861dffbe50e6dc52c68ab9 --- M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js 1 file changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/59/119959/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js index baae07c..0b58da1 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js @@ -546,8 +546,11 @@ */ _setValue: function( value ) { value = value || {}; - this.propertyId( value.property || null ); - this.snakType( value.snaktype || null ); + + this._propertyId = value.property || null; + this._snakType = value.snaktype || null ; + + this._updateVariation(); if( this._variation ) { // give other Snak information to variation object. Remove basic info since these should @@ -561,6 +564,10 @@ } this.draw(); + }, + + _updateValue: function( changes ) { + this._setValue( this._getValue(), changes ); }, /** @@ -607,12 +614,9 @@ return this._propertyId; } if( propertyId !== this._propertyId ) { - this._propertyId = propertyId; - this._updateVariation(); - - // re-draw areas with changes: - this.drawSnakTypeSelector(); - this.drawVariation(); + this._updateValue( { + property: propertyId + } ); } }, @@ -634,13 +638,9 @@ } if( snakType !== this._snakType ) { // TODO: check whether given snak type is actually valid! - // set snak and update variation strategy since it depends on the Snak's type: - this._snakType = snakType; - this._updateVariation(); - - // re-draw areas with changes: - this.drawSnakTypeSelector(); - this.drawVariation(); + this._updateValue( { + snaktype: snaktype + } ); } }, -- To view, visit https://gerrit.wikimedia.org/r/119959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59981f22a2827833be861dffbe50e6dc52c68ab9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename variables for better comprehension - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Rename variables for better comprehension .. Rename variables for better comprehension Change-Id: Ifa8da084a93e85201564bae3aa71b0c3c899894b --- M resources/js/ext.uls.compactlinks.js 1 file changed, 15 insertions(+), 7 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.compactlinks.js b/resources/js/ext.uls.compactlinks.js index 27b0695..6e3b370 100644 --- a/resources/js/ext.uls.compactlinks.js +++ b/resources/js/ext.uls.compactlinks.js @@ -196,19 +196,27 @@ function manageInterlaguageList() { var $numOfLangCurrently = $( '.interlanguage-link' ).length, currentLangs = getInterlanguageList(), - numLanguages = 9, - minLanguages = 7, + longListLength = 9, + maxLanguageCheck = 12, + shortListLength = 7, i, - finalList; //Final list of languages to be displayed on page + finalList; // Final list of languages to be displayed on page - if ( $numOfLangCurrently 9) { + // If the total number of languages are between 9(longListLength) and 12(inclusive) then + // we show only 7 (shortListLength) languages (to avoid displaying 2/3 more languages) + // Else, we show 9 languages. Please note that as per the current design of the system, this + // does not always hold true. The language list might exceed 9. This will be fixed as we refine + // the algo for the languages being shown. + + if ( $numOfLangCurrently longListLength ) { hideLanguages(); - if ( $numOfLangCurrently 9 $numOfLangCurrently = 12 ) { - finalList = displayLanguages( minLanguages ); + if ( $numOfLangCurrently longListLength $numOfLangCurrently = maxLanguageCheck ) { + finalList = displayLanguages( shortListLength ); } else { - finalList = displayLanguages( numLanguages ); + finalList = displayLanguages( longListLength ); } + // Output all the languages we have in the finalList to the page for ( i in finalList ) { addLanguage( $.uls.data.getAutonym( finalList[i] ), currentLangs[ finalList[i] ] ); } -- To view, visit https://gerrit.wikimedia.org/r/119948 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa8da084a93e85201564bae3aa71b0c3c899894b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Niharika29 niharikakohl...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tidy up various bits of Time Parsers - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/119960 Change subject: Tidy up various bits of Time Parsers .. Tidy up various bits of Time Parsers Change-Id: Id56c75102aaf4783a70e2a4fa1fb0d75ef65fdc3 --- M lib/includes/parsers/DateTimeParser.php M lib/includes/parsers/EraParser.php M lib/includes/parsers/MonthNameUnlocalizer.php M lib/includes/parsers/TimeParser.php M lib/includes/parsers/YearTimeParser.php M lib/tests/phpunit/parsers/TimeParserTest.php M lib/tests/phpunit/parsers/YearMonthTimeParserTest.php 7 files changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/60/119960/1 diff --git a/lib/includes/parsers/DateTimeParser.php b/lib/includes/parsers/DateTimeParser.php index b130f1a..f69e2f8 100644 --- a/lib/includes/parsers/DateTimeParser.php +++ b/lib/includes/parsers/DateTimeParser.php @@ -26,7 +26,7 @@ /** * @var MonthNameUnlocalizer */ - private $monthUnlocaliser; + private $monthUnlocalizer; /** * @var EraParser @@ -35,7 +35,7 @@ public function __construct( EraParser $eraParser, ParserOptions $options = null ) { parent::__construct( $options ); - $this-monthUnlocaliser = new MonthNameUnlocalizer(); + $this-monthUnlocalizer = new MonthNameUnlocalizer(); $this-eraParser = $eraParser; } @@ -58,7 +58,7 @@ try{ $value = $this-getValueWithFixedYearLengths( $this-getValueWithFixedSeparators( - $this-monthUnlocaliser-unlocalize( + $this-monthUnlocalizer-unlocalize( trim( $value ), $options-getOption( ValueParser::OPT_LANG ), new ParserOptions() diff --git a/lib/includes/parsers/EraParser.php b/lib/includes/parsers/EraParser.php index f72c144..91fb221 100644 --- a/lib/includes/parsers/EraParser.php +++ b/lib/includes/parsers/EraParser.php @@ -16,9 +16,12 @@ class EraParser extends StringValueParser { /** -* Constants representing the CE and BCE +* @since 0.5 */ const CURRENT_ERA = '+'; + /** +* @since 0.5 +*/ const BEFORE_CURRENT_ERA = '-'; /** @@ -66,6 +69,8 @@ } /** +* Removes any parse-able Era information from the given string value +* * @param string $value * * @return string diff --git a/lib/includes/parsers/MonthNameUnlocalizer.php b/lib/includes/parsers/MonthNameUnlocalizer.php index 4c47689..785a2ec 100644 --- a/lib/includes/parsers/MonthNameUnlocalizer.php +++ b/lib/includes/parsers/MonthNameUnlocalizer.php @@ -6,7 +6,7 @@ use ValueParsers\ParserOptions; /** - * Class to unlocalize month names using Mediawiki's Language object + * Class to unlocalise month names using Mediawiki's Language object * * @since 0.5 * diff --git a/lib/includes/parsers/TimeParser.php b/lib/includes/parsers/TimeParser.php index 43f944b..035d0c9 100644 --- a/lib/includes/parsers/TimeParser.php +++ b/lib/includes/parsers/TimeParser.php @@ -51,7 +51,7 @@ /** * @return StringValueParser[] */ - protected function getParsers() { + private function getParsers() { $parsers = array(); $eraParser = new EraParser( $this-getOptions() ); diff --git a/lib/includes/parsers/YearTimeParser.php b/lib/includes/parsers/YearTimeParser.php index b95dffb..bc81a1b 100644 --- a/lib/includes/parsers/YearTimeParser.php +++ b/lib/includes/parsers/YearTimeParser.php @@ -43,7 +43,6 @@ $this-getOptions() ); - //@todo inject me [= $this-eraParser = $eraParser; } diff --git a/lib/tests/phpunit/parsers/TimeParserTest.php b/lib/tests/phpunit/parsers/TimeParserTest.php index d6a0a8a..fe1c605 100644 --- a/lib/tests/phpunit/parsers/TimeParserTest.php +++ b/lib/tests/phpunit/parsers/TimeParserTest.php @@ -8,6 +8,8 @@ use Wikibase\Lib\Parsers\MWTimeIsoParser; /** + * @covers Wikibase\Lib\Parsers\TimeParser + * * @group ValueParsers * @group WikibaseLib * @group Wikibase diff --git a/lib/tests/phpunit/parsers/YearMonthTimeParserTest.php b/lib/tests/phpunit/parsers/YearMonthTimeParserTest.php index 11291eb..fabe040 100644 --- a/lib/tests/phpunit/parsers/YearMonthTimeParserTest.php +++ b/lib/tests/phpunit/parsers/YearMonthTimeParserTest.php @@ -8,7 +8,7 @@ use Wikibase\Lib\Parsers\MWTimeIsoParser; /** - * @covers \Wikibase\Lib\Parsers\YearMonthTimeParserTest + * @covers \Wikibase\Lib\Parsers\YearMonthTimeParser * * @group
[MediaWiki-commits] [Gerrit] Support 1 2 and 3 digit years in DateTimeParser - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Support 1 2 and 3 digit years in DateTimeParser .. Support 1 2 and 3 digit years in DateTimeParser Change-Id: I304a0b8a254dc98703a9c9edab8f18c6a729d898 --- M lib/includes/parsers/DateTimeParser.php M lib/tests/phpunit/parsers/DateTimeParserTest.php M lib/tests/phpunit/parsers/TimeParserTest.php 3 files changed, 82 insertions(+), 20 deletions(-) Approvals: WikidataJenkins: Verified Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/parsers/DateTimeParser.php b/lib/includes/parsers/DateTimeParser.php index 0f0643c..85b26bc 100644 --- a/lib/includes/parsers/DateTimeParser.php +++ b/lib/includes/parsers/DateTimeParser.php @@ -45,16 +45,15 @@ $calendarModelParser = new CalendarModelParser(); $options = $this-getOptions(); try{ - $value = $this-monthUnlocaliser-unlocalize( - $value, - $options-getOption( ValueParser::OPT_LANG ), - new ParserOptions() + $value = $this-getValueWithFixedYearLengths( + $this-getValueWithFixedSeparators( + $this-monthUnlocaliser-unlocalize( + trim( $value ), + $options-getOption( ValueParser::OPT_LANG ), + new ParserOptions() + ) + ) ); - - //PHP's DateTime object does not accept spaces as separators between year, month and day, - //e.g. dates like 20 12 2012, but we want to support them. - //See http://de1.php.net/manual/en/datetime.formats.date.php - $value = preg_replace( '/\s+/', '.', trim( $value ) ); //Parse using the DateTime object (this will allow us to format the date in a nicer way) //TODO try to match and remove BCE etc. before putting the value into the DateTime object to get - dates! @@ -71,4 +70,48 @@ } } + /** +* PHP's DateTime object does not accept spaces as separators between year, month and day, +* e.g. dates like 20 12 2012, but we want to support them. +* See http://de1.php.net/manual/en/datetime.formats.date.php +* +* @param string $value +* +* @return mixed +*/ + private function getValueWithFixedSeparators( $value ) { + return preg_replace( '/\s+/', '.', $value ); + } + + /** +* PHP's DateTime object also cant handel smaller than 4 digit years +* e.g. instead of 12 it needs 0012 etc. +* +* @param string $value +* +* @return string +*/ + private function getValueWithFixedYearLengths( $value ) { + if( preg_match( '/^(\d+)([^\d])(\d+)([^\d])(\d+)$/', $value, $dateParts ) ) { + if( $dateParts[1] 31 $dateParts[5] = 31 ) { + // the year looks like it is at the front + if( strlen( $dateParts[1] ) 4 ) { + $value = str_pad( $dateParts[1], 4, '0', STR_PAD_LEFT ) + . $dateParts[2] . $dateParts[3] . $dateParts[4] . $dateParts[5]; + } + } else { + // presume the year is at the back + if( strlen( $dateParts[5] ) 4 ) { + $value = $dateParts[1] . $dateParts[2] . $dateParts[3] . $dateParts[4] + . str_pad( $dateParts[5], 4, '0', STR_PAD_LEFT ); + } + } + } else { + if( preg_match( '/^(.*[^\d])(\d{1,3})$/', $value, $matches ) ) { + $value = $matches[1] . str_pad( $matches[2], 4, '0', STR_PAD_LEFT ); + } + } + return $value; + } + } \ No newline at end of file diff --git a/lib/tests/phpunit/parsers/DateTimeParserTest.php b/lib/tests/phpunit/parsers/DateTimeParserTest.php index 67e6503..de40bec 100644 --- a/lib/tests/phpunit/parsers/DateTimeParserTest.php +++ b/lib/tests/phpunit/parsers/DateTimeParserTest.php @@ -45,8 +45,7 @@ $valid = array( - '10/10/10' = - array( '+2010-10-10T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY ,
[MediaWiki-commits] [Gerrit] Merge tag 'v0.8.1' from upstream - change (operations...jenkins-debian-glue)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/119961 Change subject: Merge tag 'v0.8.1' from upstream .. Merge tag 'v0.8.1' from upstream This bring wmf package to release 0.8.1 Change-Id: Ibce8bc7c9bc24ca7fdaf89911b67aa4635c293e7 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/jenkins-debian-glue refs/changes/61/119961/1 -- To view, visit https://gerrit.wikimedia.org/r/119961 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibce8bc7c9bc24ca7fdaf89911b67aa4635c293e7 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/jenkins-debian-glue Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use DataValues/Time version ~0.4.0 - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/119962 Change subject: Use DataValues/Time version ~0.4.0 .. Use DataValues/Time version ~0.4.0 Change-Id: I096d5cac076e4eab4f20bec4d56b0e901ada8e31 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/62/119962/1 diff --git a/composer.json b/composer.json index d1fc655..0da9b9b 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ data-values/common: ~0.2.0, data-values/geo: ~0.1.0, data-values/number: ~0.3.0, - data-values/time: ~0.3.0, + data-values/time: ~0.4.0, data-values/validators: ~0.1.0, data-values/data-types: ~0.2.0, data-values/serialization: ~0.1.0, -- To view, visit https://gerrit.wikimedia.org/r/119962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I096d5cac076e4eab4f20bec4d56b0e901ada8e31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Using the new way of starting a custom browser - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Using the new way of starting a custom browser .. Using the new way of starting a custom browser mediawiki_selenium Ruby gem is now able to start local and remote browsers with optional browser setup. Paired with Kartik Mistry. Bug: 62512 Change-Id: I61e5b688711b1976e8df8be94972fe35f6eeb9aa --- M tests/browser/Gemfile.lock M tests/browser/features/accept_language.feature M tests/browser/features/step_definitions/accept_language_steps.rb 3 files changed, 10 insertions(+), 10 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/Gemfile.lock b/tests/browser/Gemfile.lock index 5cd5194..2fa47e5 100644 --- a/tests/browser/Gemfile.lock +++ b/tests/browser/Gemfile.lock @@ -4,17 +4,17 @@ builder (3.2.2) childprocess (0.5.1) ffi (~ 1.0, = 1.0.11) -cucumber (1.3.11) +cucumber (1.3.12) builder (= 2.1.2) diff-lcs (= 1.1.3) gherkin (~ 2.12) multi_json (= 1.7.5, 2.0) - multi_test (= 0.0.2) + multi_test (= 0.1.1) data_magic (0.18) faker (= 1.1.2) yml_reader (= 0.2) diff-lcs (1.2.5) -faker (1.2.0) +faker (1.3.0) i18n (~ 0.5) ffi (1.9.3) gherkin (2.12.2) @@ -22,7 +22,7 @@ headless (1.0.1) i18n (0.6.9) json (1.8.1) -mediawiki_selenium (0.2.9) +mediawiki_selenium (0.2.13) cucumber (~ 1.3, = 1.3.10) headless (~ 1.0, = 1.0.1) json (~ 1.8, = 1.8.1) @@ -31,11 +31,11 @@ rest-client (~ 1.6, = 1.6.7) rspec-expectations (~ 2.14, = 2.14.4) syntax (~ 1.2, = 1.2.0) -mime-types (2.1) +mime-types (2.2) multi_json (1.9.0) -multi_test (0.0.3) +multi_test (0.1.1) net-http-persistent (2.9.4) -page-object (0.9.7) +page-object (0.9.8) page_navigation (= 0.9) selenium-webdriver (= 2.40.0) watir-webdriver (= 0.6.8) @@ -45,7 +45,7 @@ mime-types (= 1.16) rspec-expectations (2.14.5) diff-lcs (= 1.1.3, 2.0) -rubyzip (1.1.0) +rubyzip (1.1.2) selenium-webdriver (2.40.0) childprocess (= 0.5.0) multi_json (~ 1.0) diff --git a/tests/browser/features/accept_language.feature b/tests/browser/features/accept_language.feature index f8c982d..8c65bf3 100644 --- a/tests/browser/features/accept_language.feature +++ b/tests/browser/features/accept_language.feature @@ -1,4 +1,4 @@ -@custom-browser @phantomjs-bug @sandbox.translatewiki.net +@custom-browser @sandbox.translatewiki.net Feature: Accept-Language Scenario Outline: Accept-Language diff --git a/tests/browser/features/step_definitions/accept_language_steps.rb b/tests/browser/features/step_definitions/accept_language_steps.rb index 4579f51..012debd 100644 --- a/tests/browser/features/step_definitions/accept_language_steps.rb +++ b/tests/browser/features/step_definitions/accept_language_steps.rb @@ -1,5 +1,5 @@ Given(/^that my browser's accept language is (.+)$/) do |language| - @browser = browser(environment, test_name(@scenario), language) + @browser = browser(test_name(@scenario), {language: language}) $session_id = @browser.driver.instance_variable_get(:@bridge).session_id end -- To view, visit https://gerrit.wikimedia.org/r/119270 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61e5b688711b1976e8df8be94972fe35f6eeb9aa Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Jeremylee jeremygraja...@gmail.com Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix possible error list of action=revisiondelete - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix possible error list of action=revisiondelete .. Fix possible error list of action=revisiondelete Bug: 62853 Change-Id: I0efec9e8a6cf761def7673011bcc22a9f1a9 --- M includes/api/ApiRevisionDelete.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiRevisionDelete.php b/includes/api/ApiRevisionDelete.php index 1400b0d..2c76f37 100644 --- a/includes/api/ApiRevisionDelete.php +++ b/includes/api/ApiRevisionDelete.php @@ -223,8 +223,9 @@ public function getPossibleErrors() { return array_merge( parent::getPossibleErrors(), array( - 'needtarget' = 'A target title is required for this RevDel type', - 'badparams' = 'Bad value for some parameter', + array( 'code' = 'needtarget', + 'info' = 'A target title is required for this RevDel type' ), + array( 'code' = 'badparams', 'info' = 'Bad value for some parameter' ), ) ); } -- To view, visit https://gerrit.wikimedia.org/r/119792 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0efec9e8a6cf761def7673011bcc22a9f1a9 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Yurik yu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ResourceLoaderStartUpModule: Remove no-op delete isCompatible - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: ResourceLoaderStartUpModule: Remove no-op delete isCompatible .. ResourceLoaderStartUpModule: Remove no-op delete isCompatible Due to the way this function being defined as a function or var declaration instead of a function expression assigned to a property it can't be deleted. JavaScript doesn't throw an error when deletion is not permitted though, the operator returns false instead. delete isCompatible; false We already removed 'delete startUp' from mediawiki.js in favour of startUp = undefined; (r107402, r74325). Change-Id: I7aa02e3f4deb3a4f00177b70978bfcb83c80988a --- M includes/resourceloader/ResourceLoaderStartUpModule.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 64fafd7..3482bfa 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -234,8 +234,9 @@ // Startup function $configuration = $this-getConfig( $context ); $registrations = self::getModuleRegistrations( $context ); - $registrations = str_replace( \n, \n\t, trim( $registrations ) ); // fix indentation - $out .= var startUp = function() {\n . + // Fix indentation + $registrations = str_replace( \n, \n\t, trim( $registrations ) ); + $out .= var startUp = function () {\n . \tmw.config = new . Xml::encodeJsCall( 'mw.Map', array( $wgLegacyJavaScriptGlobals ) ) . \n . \t$registrations\n . \t . Xml::encodeJsCall( 'mw.config.set', array( $configuration ) ) . @@ -245,8 +246,7 @@ $scriptTag = Html::linkedScript( self::getStartupModulesUrl( $context ) ); $out .= if ( isCompatible() ) {\n . \t . Xml::encodeJsCall( 'document.write', array( $scriptTag ) ) . - }\n . - delete isCompatible;; + }; } return $out; -- To view, visit https://gerrit.wikimedia.org/r/119696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7aa02e3f4deb3a4f00177b70978bfcb83c80988a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added browser specific tags to Cucumber feature - change (mediawiki...ContentTranslation)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/119963 Change subject: Added browser specific tags to Cucumber feature .. Added browser specific tags to Cucumber feature Bug: 62477 Change-Id: Ifc7d93b3b2fd2b4fb35ca82ee3032ac592ab2810 --- M tests/browser/features/special_content_translation.feature 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/63/119963/1 diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index c3421b9..660dbcc 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -1,4 +1,4 @@ -@language-stage.wmflabs.org @login +@firefox @language-stage.wmflabs.org @login Feature: Content translation special page As a wiki editor -- To view, visit https://gerrit.wikimedia.org/r/119963 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc7d93b3b2fd2b4fb35ca82ee3032ac592ab2810 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ResourceLoaderStartUpModule: Improve comment about modifiedT... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: ResourceLoaderStartUpModule: Improve comment about modifiedTime hack .. ResourceLoaderStartUpModule: Improve comment about modifiedTime hack * Re-ordering code to bring the modifiedTime hack and the loop it serves closer together. * Separating the fact that it needs a value and the mtime of startup.js since that is just one of the three factors we use. This way it's clearer that the startup.js mtime is not just a bogus value, but not more or less important than wgCacheEpoch and modules mtime either. * Remove duplicate '/* Methods */' comment, we already have this marker a few methods higher up. Change-Id: Id3a07f02566c0f04b612b81f8353f70fa4ab3977 --- M includes/resourceloader/ResourceLoaderStartUpModule.php 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 3482bfa..a551c4a 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -276,20 +276,26 @@ $loader = $context-getResourceLoader(); $loader-preloadModuleInfo( $loader-getModuleNames(), $context ); - $this-modifiedTime[$hash] = filemtime( $IP/resources/startup.js ); - // ATTENTION!: Because of the line above, this is not going to cause + $time = max( + wfTimestamp( TS_UNIX, $wgCacheEpoch ), + filemtime( $IP/resources/startup.js ) + ); + + // ATTENTION!: Because of the line below, this is not going to cause // infinite recursion - think carefully before making changes to this // code! - $time = wfTimestamp( TS_UNIX, $wgCacheEpoch ); + // Pre-populate modifiedTime with something because the the loop over + // all modules below includes the the startup module (this module). + $this-modifiedTime[$hash] = 1; + foreach ( $loader-getModuleNames() as $name ) { $module = $loader-getModule( $name ); $time = max( $time, $module-getModifiedTime( $context ) ); } + $this-modifiedTime[$hash] = $time; return $this-modifiedTime[$hash]; } - - /* Methods */ /** * @return string -- To view, visit https://gerrit.wikimedia.org/r/119705 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3a07f02566c0f04b612b81f8353f70fa4ab3977 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] enable category_redirect.py for sh-wiki - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: enable category_redirect.py for sh-wiki .. enable category_redirect.py for sh-wiki Change-Id: I308cbcc7d704b121f106112f9a56ebbde04e6aa8 --- M category_redirect.py M families/wikipedia_family.py 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/category_redirect.py b/category_redirect.py index 0354831..6fae703 100644 --- a/category_redirect.py +++ b/category_redirect.py @@ -72,6 +72,7 @@ 'pt': Categoria:!Redirecionamentos de categorias, 'ru': Категория:Википедия:Категории-дубликаты, 'simple': Category:Category redirects, +'sh': uKategorija:Preusmjerene kategorije Wikipedije, 'vi': uThể loại:Thể loại đổi hướng, 'zh': uCategory:已重定向的分类, }, diff --git a/families/wikipedia_family.py b/families/wikipedia_family.py index 7f75f09..3aa1e7a 100644 --- a/families/wikipedia_family.py +++ b/families/wikipedia_family.py @@ -1117,6 +1117,13 @@ 'simple': (u'Category redirect', u'Categoryredirect', u'Catredirect',), +'sh': (u'Prekat', + u'Preusmeri kategoriju', + u'Preusmjeri kategoriju', + u'Prekategorizuj', + u'Catred', + u'Catredirect', + u'Category redirect'), 'sl': (u'Category redirect',), 'sq': (u'Kategori e zhvendosur', u'Category redirect',), -- To view, visit https://gerrit.wikimedia.org/r/119951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I308cbcc7d704b121f106112f9a56ebbde04e6aa8 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Alex S.H. Lin ale...@mail2000.com.tw Gerrit-Reviewer: Huji huji.h...@gmail.com Gerrit-Reviewer: Kolega2357 kolega2...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Russell Blau russb...@imapmail.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove obsolete PageTitles list object - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: remove obsolete PageTitles list object .. remove obsolete PageTitles list object Change-Id: Ic6344927b42cc171cf03155549fd4b2d64271a60 --- M scripts/reflinks.py 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/reflinks.py b/scripts/reflinks.py index 965794a..986bfd9 100644 --- a/scripts/reflinks.py +++ b/scripts/reflinks.py @@ -789,7 +789,6 @@ def main(): genFactory = pagegenerators.GeneratorFactory() -PageTitles = [] xmlFilename = None always = False ignorepdf = False -- To view, visit https://gerrit.wikimedia.org/r/119752 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic6344927b42cc171cf03155549fd4b2d64271a60 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added browser specific tags to Cucumber feature - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Added browser specific tags to Cucumber feature .. Added browser specific tags to Cucumber feature Paired with Kartik Mistry. Bug: 62477 Change-Id: Ifc7d93b3b2fd2b4fb35ca82ee3032ac592ab2810 --- M tests/browser/features/special_content_translation.feature 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index c3421b9..660dbcc 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -1,4 +1,4 @@ -@language-stage.wmflabs.org @login +@firefox @language-stage.wmflabs.org @login Feature: Content translation special page As a wiki editor -- To view, visit https://gerrit.wikimedia.org/r/119963 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc7d93b3b2fd2b4fb35ca82ee3032ac592ab2810 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Section alignment: Define section types and improve mt replace - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/119965 Change subject: Section alignment: Define section types and improve mt replace .. Section alignment: Define section types and improve mt replace Borrowed the section types from VE Improved the auto translation so that it does not destroy html structure Change-Id: If019593d8389083545731d1183c9980201287b62 --- M modules/translation/ext.cx.translation.js 1 file changed, 41 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/65/119965/1 diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index 6f7059c..690c189 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -83,12 +83,18 @@ }; + /** +* Updat the translation section with the machine translation +* @param {string} sourceId source section identifier +*/ ContentTranslationEditor.prototype.update = function ( sourceId ) { - $( '#t' + sourceId ).empty(); - - $( '#' + sourceId ).find( '.cx-segment' ).each( function () { - $( '#t' + sourceId ).append( mw.cx.data.mt[ $( this ).data( 'segmentid' ) ] ); + // Copy the whole section html to translation section. + $( '#t' + sourceId ).html( $( '#' + sourceId ).html() ); + // For every segment, use MT as replacement + $( '#t' + sourceId ).find( '.cx-segment' ).each( function () { + $( this ).html( mw.cx.data.mt[ $( this ).data( 'segmentid' ) ] ); } ); + // Trigger input event so that the alignemnt is right. $( '#t' + sourceId ).trigger( 'input' ); this.calculateCompletion(); @@ -104,11 +110,40 @@ mw.hook( 'mw.cx.progress' ).fire( completeness ); }; + /** +* Generate a jquery selector for all sections +* @return {string} the section selector string +*/ + ContentTranslationEditor.prototype.getSectionSelector = function () { + var i, sectionSelector = '', + sectionTypes = [ + 'div', 'p', + // tables + 'table', 'tbody', 'thead', 'tfoot', 'caption', 'th', 'tr', 'td', + // lists + 'ul', 'ol', 'li', 'dl', 'dt', 'dd', + // HTML5 heading content + 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hgroup', + // HTML5 sectioning content + 'article', 'aside', 'body', 'nav', 'section', 'footer', 'header', 'figure', + 'figcaption', 'fieldset', 'details', 'blockquote', + // other + 'hr', 'button', 'canvas', 'center', 'col', 'colgroup', 'embed', + 'map', 'object', 'pre', 'progress', 'video' +]; + for ( i = 0; i sectionTypes.length; i++ ) { + sectionSelector += sectionTypes[ i ] + ','; + } + // Remove the trailing comma. + sectionSelector = sectionSelector.replace( /,+$/, '' ); + return sectionSelector; + }; + ContentTranslationEditor.prototype.addPlaceholders = function () { - var cxSections = 'p, h1, h2, h3, div, table, figure, ul'; + var cxSectionSelector = this.getSectionSelector(); this.$content.html( mw.cx.data.segmentedContent ); - this.$content.find( cxSections ).each( function () { + this.$content.find( cxSectionSelector ).each( function () { var $section = $( this ), sourceSectionId = $section.attr( 'id' ), $sourceSection = $( '#' + sourceSectionId ); -- To view, visit https://gerrit.wikimedia.org/r/119965 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If019593d8389083545731d1183c9980201287b62 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation 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
[MediaWiki-commits] [Gerrit] mw release 1.23wmf18 - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119966 Change subject: mw release 1.23wmf18 .. mw release 1.23wmf18 Change-Id: I17a09cd6292416c28c8faef0cfc33af2e149f2b5 --- M pywikibot/family.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/66/119966/1 diff --git a/pywikibot/family.py b/pywikibot/family.py index dd33d21..0bf46cd 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -1065,7 +1065,7 @@ Return Wikimedia projects version number as a string. # Don't use this, use versionnumber() instead. This only exists # to not break family files. -return '1.23wmf17' +return '1.23wmf18' def shared_image_repository(self, code): return ('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/119966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17a09cd6292416c28c8faef0cfc33af2e149f2b5 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added browser specific Cucumber tags - change (mediawiki...Translate)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/119967 Change subject: Added browser specific Cucumber tags .. Added browser specific Cucumber tags Paired with Kartik Mistry. Bug: 62477 Change-Id: I52ec4b73eb8d2e36d30985cf224a9339eed88cb1 --- M tests/browser/features/manage_translator_sandbox.feature M tests/browser/features/special_translate.feature M tests/browser/features/translation_stash.feature 3 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/67/119967/1 diff --git a/tests/browser/features/manage_translator_sandbox.feature b/tests/browser/features/manage_translator_sandbox.feature index 1e077b6..29d33d8 100644 --- a/tests/browser/features/manage_translator_sandbox.feature +++ b/tests/browser/features/manage_translator_sandbox.feature @@ -1,4 +1,4 @@ -@login @sandbox.translatewiki.net +@firefox @login @sandbox.translatewiki.net Feature: Manage translator sandbox As a translation administrator, diff --git a/tests/browser/features/special_translate.feature b/tests/browser/features/special_translate.feature index a2bed71..17c5b73 100644 --- a/tests/browser/features/special_translate.feature +++ b/tests/browser/features/special_translate.feature @@ -1,3 +1,4 @@ +@firefox @meta.wikimedia.org Feature: Special:Translate This page is the primary web translation interface for users. @@ -7,17 +8,17 @@ https://commons.wikimedia.org/wiki/File:Translate-workflow-spec.pdf?page=10 describes how it is meant to look and behave. - @meta.wikimedia.org @sandbox.translatewiki.net + @sandbox.translatewiki.net Scenario: Workflow selector not being visible Given I am translating a message group which doesn't have workflow states Then I should not see a workflow state - @custom-setup-needed @meta.wikimedia.org + @custom-setup-needed Scenario: Workflow selector being visible Given I am translating a message group which has workflow states Then I should see a workflow state - @custom-setup-needed @meta.wikimedia.org + @custom-setup-needed Scenario: Workflow selector being clickable Given I am translating a message group which has workflow states When I click the workflow state diff --git a/tests/browser/features/translation_stash.feature b/tests/browser/features/translation_stash.feature index 8700b43..c86ba06 100644 --- a/tests/browser/features/translation_stash.feature +++ b/tests/browser/features/translation_stash.feature @@ -1,4 +1,4 @@ -@login @sandbox.translatewiki.net @stash +@firefox @login @sandbox.translatewiki.net @stash Feature: Translation stash As a new translator, I can make translations in sandbox mode so that a translation administrator -- To view, visit https://gerrit.wikimedia.org/r/119967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52ec4b73eb8d2e36d30985cf224a9339eed88cb1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Segmentation: Handle all section types - change (mediawiki...cxserver)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/119969 Change subject: Segmentation: Handle all section types .. Segmentation: Handle all section types Borrowed the definition of section types from VE. Made all tests passing Change-Id: If1124892ae8ac3a5477e228c061fb51ddf0b442f --- M segmentation/languages/CXParser.js M tests/segmentation/SegmentationTests.js M tests/segmentation/SegmentationTests.json 3 files changed, 43 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/69/119969/1 diff --git a/segmentation/languages/CXParser.js b/segmentation/languages/CXParser.js index 60ca0a3..a4b445a 100644 --- a/segmentation/languages/CXParser.js +++ b/segmentation/languages/CXParser.js @@ -24,6 +24,21 @@ this.links = {}; }; +CXParser.prototype.sectionTypes = [ + 'div', 'p', + // tables + 'table', 'tbody', 'thead', 'tfoot', 'caption', 'th', 'tr', 'td', + // lists + 'ul', 'ol', 'li', 'dl', 'dt', 'dd', + // HTML5 heading content + 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hgroup', + // HTML5 sectioning content + 'article', 'aside', 'body', 'nav', 'section', 'footer', 'header', 'figure', + 'figcaption', 'fieldset', 'details', 'blockquote', + // other + 'hr', 'button', 'canvas', 'center', 'col', 'colgroup', 'embed', + 'map', 'object', 'pre', 'progress', 'video' + ]; /** * Error handler */ @@ -91,8 +106,8 @@ replacement = prevWord + sentenceSeperator; //console.log([match, prevWord, sentenceSeperator, offset]); - nextLetter = sentence[offset + match.length]; - if ( prevWord prevWord.length 3 prevWord[0].toUpperCase() === prevWord[0] || + nextLetter = sentence[ offset + match.length ]; + if ( prevWord prevWord.length 3 prevWord[ 0 ].toUpperCase() === prevWord[ 0 ] || nextLetter nextLetter.toLowerCase() === nextLetter ) { // abbreviation? return replacement; @@ -118,7 +133,7 @@ if ( !this.inSentence ) { this.print( this.startSentence() ); } - this.links[this.segmentCount] = { + this.links[ this.segmentCount ] = { href: href }; this.print( ' class=cx-link data-linkid=' + ( this.segmentCount++ ) + '' ); @@ -130,8 +145,14 @@ */ CXParser.prototype.onopentag = function ( tag ) { var attrName, - section = /[ph1-6]|figure|ul|div/; + section = /[ph1-6]|figure|figcaption|ul|div/; + if ( this.sectionTypes.indexOf( tag.name ) = 0 ) { + if ( this.inSentence ) { + // Avoid dangling sentence. + this.print( this.endSentence() ); + } + } if ( tag.name === 'a' !this.inSentence ) { // sentences starting with a link this.print( this.startSentence() ); @@ -151,7 +172,7 @@ // not leaking it to the text. So ignore these attributes. continue; } - this.print( ' ' + attrName + '=' + entity( tag.attributes[attrName] ) + '' ); + this.print( ' ' + attrName + '=' + entity( tag.attributes[ attrName ] ) + '' ); } // Sections @@ -175,8 +196,7 @@ * @param {string} tag */ CXParser.prototype.onclosetag = function ( tag ) { - var section = /[ph1-6]|figure|ul|div/; - if ( tag.match( section ) ) { + if ( this.sectionTypes.indexOf( tag ) = 0 ) { if ( this.inSentence ) { // Avoid dangling sentence. this.print( this.endSentence() ); diff --git a/tests/segmentation/SegmentationTests.js b/tests/segmentation/SegmentationTests.js index f695bc9..b20cede 100644 --- a/tests/segmentation/SegmentationTests.js +++ b/tests/segmentation/SegmentationTests.js @@ -1,19 +1,21 @@ 'use strict'; var assert = require( 'assert' ), - CXSegmenter = require( __dirname + '/../../segmentation/CXSegmenter.js' ).CXSegmenter, - tests = require( './SegmentationTests.json' ); +CXSegmenter = require( __dirname + '/../../segmentation/CXSegmenter.js' ).CXSegmenter, +tests = require( './SegmentationTests.json' ); for ( var lang in tests ) { - var languageTests = tests[lang]; - for ( var i in languageTests ) { - var test = languageTests[i], - segmenter; - segmenter = new CXSegmenter( test.source, lang ); - segmenter.segment(); - var result = segmenter.getSegmentedContent(); - result = result.replace( /(\r\n|\n|\t|\r)/gm, '' ); - console.log( test.result + '\n' + result ); -
[MediaWiki-commits] [Gerrit] update language_by_size - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119968 Change subject: update language_by_size .. update language_by_size Change-Id: Iada6e4dffea09829da0f19398ec168bffd928022 --- M pywikibot/families/wikibooks_family.py M pywikibot/families/wikipedia_family.py M pywikibot/families/wikiquote_family.py M pywikibot/families/wiktionary_family.py 4 files changed, 22 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/68/119968/1 diff --git a/pywikibot/families/wikibooks_family.py b/pywikibot/families/wikibooks_family.py index fd0a567..07599d8 100644 --- a/pywikibot/families/wikibooks_family.py +++ b/pywikibot/families/wikibooks_family.py @@ -12,11 +12,11 @@ self.languages_by_size = [ 'en', 'de', 'fr', 'hu', 'ja', 'it', 'es', 'pt', 'nl', 'pl', 'he', -'vi', 'id', 'sq', 'ca', 'fi', 'ru', 'cs', 'fa', 'zh', 'sv', 'da', +'vi', 'id', 'sq', 'ca', 'fi', 'ru', 'fa', 'cs', 'zh', 'sv', 'da', 'hr', 'tr', 'no', 'th', 'sr', 'gl', 'ko', 'ar', 'ta', 'mk', 'tl', 'ro', 'is', 'ka', 'tt', 'lt', 'az', 'eo', 'uk', 'bg', 'sk', 'el', -'sl', 'hy', 'ms', 'si', 'li', 'la', 'ml', 'ang', 'ur', 'ia', 'cv', -'et', 'mr', 'bn', 'hi', 'oc', 'km', 'kk', 'eu', 'fy', 'ie', 'ne', +'sl', 'hy', 'ms', 'si', 'li', 'la', 'ml', 'ang', 'ur', 'ia', 'et', +'cv', 'mr', 'bn', 'hi', 'oc', 'km', 'kk', 'eu', 'fy', 'ie', 'ne', 'sa', 'te', 'af', 'tg', 'ky', 'bs', 'pa', 'mg', 'be', 'cy', 'zh-min-nan', 'ku', 'uz', ] diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index 215c4d9..ac8ec40 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -13,31 +13,31 @@ self.languages_by_size = [ 'en', 'nl', 'de', 'sv', 'fr', 'it', 'ru', 'es', 'pl', 'war', 'ja', 'ceb', 'vi', 'pt', 'zh', 'uk', 'ca', 'no', 'fa', 'fi', 'id', 'cs', -'ko', 'ar', 'hu', 'ms', 'sr', 'ro', 'tr', 'min', 'kk', 'eo', 'sk', -'da', 'eu', 'lt', 'bg', 'he', 'hr', 'sl', 'uz', 'et', 'vo', 'hy', -'sh', 'nn', 'gl', 'simple', 'hi', 'la', 'az', 'el', 'th', 'oc', -'ka', 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'tt', 'te', 'cy', 'ht', +'ko', 'ar', 'hu', 'sr', 'ms', 'ro', 'tr', 'min', 'kk', 'eo', 'sk', +'da', 'eu', 'lt', 'bg', 'he', 'hr', 'sl', 'sh', 'uz', 'et', 'vo', +'hy', 'nn', 'gl', 'simple', 'hi', 'la', 'az', 'el', 'th', 'oc', +'ka', 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'te', 'tt', 'cy', 'ht', 'lv', 'be-x-old', 'sq', 'bs', 'br', 'jv', 'mg', 'lb', 'mr', 'is', -'ml', 'ba', 'my', 'pnb', 'yo', 'af', 'ur', 'an', 'fy', 'lmo', 'tg', -'ga', 'bn', 'zh-yue', 'cv', 'ky', 'sw', 'io', 'ne', 'gu', 'bpy', +'ml', 'ba', 'pnb', 'my', 'ur', 'yo', 'af', 'an', 'fy', 'lmo', 'ga', +'tg', 'bn', 'zh-yue', 'cv', 'ky', 'sw', 'io', 'ne', 'gu', 'bpy', 'scn', 'ce', 'sco', 'nds', 'ku', 'ast', 'qu', 'su', 'als', 'am', 'kn', 'ia', 'nap', 'bug', 'ckb', 'bat-smg', 'wa', 'map-bms', 'mn', 'gd', 'arz', 'hif', 'mzn', 'zh-min-nan', 'yi', 'si', 'vec', 'sah', -'sa', 'nah', 'bar', 'pa', 'os', 'roa-tara', 'fo', 'pam', 'hsb', +'sa', 'nah', 'pa', 'bar', 'os', 'roa-tara', 'fo', 'pam', 'hsb', 'se', 'li', 'mi', 'ilo', 'co', 'or', 'gan', 'frr', 'bo', 'glk', 'rue', 'bcl', 'nds-nl', 'fiu-vro', 'mrj', 'ps', 'tk', 'vls', 'xmf', 'gv', 'pag', 'diq', 'zea', 'km', 'kv', 'mhr', 'csb', 'vep', 'hak', -'dv', 'so', 'nrm', 'ay', 'rm', 'koi', 'udm', 'ug', 'stq', 'sc', -'lad', 'zh-classical', 'wuu', 'lij', 'fur', 'mt', 'eml', 'pi', 'as', -'bh', 'nov', 'ksh', 'gn', 'pcd', 'kw', 'ang', 'gag', 'ace', 'szl', +'dv', 'so', 'nrm', 'ay', 'rm', 'koi', 'udm', 'sc', 'ug', 'stq', +'lad', 'wuu', 'zh-classical', 'lij', 'fur', 'mt', 'eml', 'pi', 'as', +'nov', 'bh', 'ksh', 'gn', 'pcd', 'kw', 'ang', 'gag', 'ace', 'szl', 'nv', 'ext', 'frp', 'ie', 'mwl', 'ln', 'sn', 'dsb', 'pfl', 'lez', -'krc', 'crh', 'haw', 'pdc', 'xal', 'rw', 'kab', 'to', 'myv', 'arc', +'krc', 'crh', 'haw', 'pdc', 'xal', 'kab', 'rw', 'to', 'myv', 'arc', 'kl', 'bjn', 'pap', 'kbd', 'lo', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', 'cbk-zam', 'av', 'srn', 'bxr', 'ty', 'kg', 'ab', 'na', 'tet', 'ig', -'ltg', 'nso', 'za', 'kaa', 'zu', 'ha', 'chy', 'rmy', 'chr', 'cu', +'ltg', 'nso', 'za', 'kaa', 'zu', 'ha', 'chy', 'rmy', 'cu', 'chr', 'tn', 'cdo', 'roa-rup', 'pih', 'bi', 'got', 'sm', 'tyv', 'bm', 'iu', 'ss', 'sd', 'pnt', 'tw', 'ki', 'rn', 'ee', 'ts', 'om', 'ak', 'fj', -
[MediaWiki-commits] [Gerrit] mw release 1.23wmf18 - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: mw release 1.23wmf18 .. mw release 1.23wmf18 Change-Id: I17a09cd6292416c28c8faef0cfc33af2e149f2b5 --- M pywikibot/family.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/family.py b/pywikibot/family.py index dd33d21..0bf46cd 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -1065,7 +1065,7 @@ Return Wikimedia projects version number as a string. # Don't use this, use versionnumber() instead. This only exists # to not break family files. -return '1.23wmf17' +return '1.23wmf18' def shared_image_repository(self, code): return ('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/119966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17a09cd6292416c28c8faef0cfc33af2e149f2b5 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update language_by_size - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: update language_by_size .. update language_by_size Change-Id: Iada6e4dffea09829da0f19398ec168bffd928022 --- M pywikibot/families/wikibooks_family.py M pywikibot/families/wikipedia_family.py M pywikibot/families/wikiquote_family.py M pywikibot/families/wiktionary_family.py 4 files changed, 22 insertions(+), 22 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/families/wikibooks_family.py b/pywikibot/families/wikibooks_family.py index fd0a567..07599d8 100644 --- a/pywikibot/families/wikibooks_family.py +++ b/pywikibot/families/wikibooks_family.py @@ -12,11 +12,11 @@ self.languages_by_size = [ 'en', 'de', 'fr', 'hu', 'ja', 'it', 'es', 'pt', 'nl', 'pl', 'he', -'vi', 'id', 'sq', 'ca', 'fi', 'ru', 'cs', 'fa', 'zh', 'sv', 'da', +'vi', 'id', 'sq', 'ca', 'fi', 'ru', 'fa', 'cs', 'zh', 'sv', 'da', 'hr', 'tr', 'no', 'th', 'sr', 'gl', 'ko', 'ar', 'ta', 'mk', 'tl', 'ro', 'is', 'ka', 'tt', 'lt', 'az', 'eo', 'uk', 'bg', 'sk', 'el', -'sl', 'hy', 'ms', 'si', 'li', 'la', 'ml', 'ang', 'ur', 'ia', 'cv', -'et', 'mr', 'bn', 'hi', 'oc', 'km', 'kk', 'eu', 'fy', 'ie', 'ne', +'sl', 'hy', 'ms', 'si', 'li', 'la', 'ml', 'ang', 'ur', 'ia', 'et', +'cv', 'mr', 'bn', 'hi', 'oc', 'km', 'kk', 'eu', 'fy', 'ie', 'ne', 'sa', 'te', 'af', 'tg', 'ky', 'bs', 'pa', 'mg', 'be', 'cy', 'zh-min-nan', 'ku', 'uz', ] diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index 215c4d9..ac8ec40 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -13,31 +13,31 @@ self.languages_by_size = [ 'en', 'nl', 'de', 'sv', 'fr', 'it', 'ru', 'es', 'pl', 'war', 'ja', 'ceb', 'vi', 'pt', 'zh', 'uk', 'ca', 'no', 'fa', 'fi', 'id', 'cs', -'ko', 'ar', 'hu', 'ms', 'sr', 'ro', 'tr', 'min', 'kk', 'eo', 'sk', -'da', 'eu', 'lt', 'bg', 'he', 'hr', 'sl', 'uz', 'et', 'vo', 'hy', -'sh', 'nn', 'gl', 'simple', 'hi', 'la', 'az', 'el', 'th', 'oc', -'ka', 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'tt', 'te', 'cy', 'ht', +'ko', 'ar', 'hu', 'sr', 'ms', 'ro', 'tr', 'min', 'kk', 'eo', 'sk', +'da', 'eu', 'lt', 'bg', 'he', 'hr', 'sl', 'sh', 'uz', 'et', 'vo', +'hy', 'nn', 'gl', 'simple', 'hi', 'la', 'az', 'el', 'th', 'oc', +'ka', 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'te', 'tt', 'cy', 'ht', 'lv', 'be-x-old', 'sq', 'bs', 'br', 'jv', 'mg', 'lb', 'mr', 'is', -'ml', 'ba', 'my', 'pnb', 'yo', 'af', 'ur', 'an', 'fy', 'lmo', 'tg', -'ga', 'bn', 'zh-yue', 'cv', 'ky', 'sw', 'io', 'ne', 'gu', 'bpy', +'ml', 'ba', 'pnb', 'my', 'ur', 'yo', 'af', 'an', 'fy', 'lmo', 'ga', +'tg', 'bn', 'zh-yue', 'cv', 'ky', 'sw', 'io', 'ne', 'gu', 'bpy', 'scn', 'ce', 'sco', 'nds', 'ku', 'ast', 'qu', 'su', 'als', 'am', 'kn', 'ia', 'nap', 'bug', 'ckb', 'bat-smg', 'wa', 'map-bms', 'mn', 'gd', 'arz', 'hif', 'mzn', 'zh-min-nan', 'yi', 'si', 'vec', 'sah', -'sa', 'nah', 'bar', 'pa', 'os', 'roa-tara', 'fo', 'pam', 'hsb', +'sa', 'nah', 'pa', 'bar', 'os', 'roa-tara', 'fo', 'pam', 'hsb', 'se', 'li', 'mi', 'ilo', 'co', 'or', 'gan', 'frr', 'bo', 'glk', 'rue', 'bcl', 'nds-nl', 'fiu-vro', 'mrj', 'ps', 'tk', 'vls', 'xmf', 'gv', 'pag', 'diq', 'zea', 'km', 'kv', 'mhr', 'csb', 'vep', 'hak', -'dv', 'so', 'nrm', 'ay', 'rm', 'koi', 'udm', 'ug', 'stq', 'sc', -'lad', 'zh-classical', 'wuu', 'lij', 'fur', 'mt', 'eml', 'pi', 'as', -'bh', 'nov', 'ksh', 'gn', 'pcd', 'kw', 'ang', 'gag', 'ace', 'szl', +'dv', 'so', 'nrm', 'ay', 'rm', 'koi', 'udm', 'sc', 'ug', 'stq', +'lad', 'wuu', 'zh-classical', 'lij', 'fur', 'mt', 'eml', 'pi', 'as', +'nov', 'bh', 'ksh', 'gn', 'pcd', 'kw', 'ang', 'gag', 'ace', 'szl', 'nv', 'ext', 'frp', 'ie', 'mwl', 'ln', 'sn', 'dsb', 'pfl', 'lez', -'krc', 'crh', 'haw', 'pdc', 'xal', 'rw', 'kab', 'to', 'myv', 'arc', +'krc', 'crh', 'haw', 'pdc', 'xal', 'kab', 'rw', 'to', 'myv', 'arc', 'kl', 'bjn', 'pap', 'kbd', 'lo', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', 'cbk-zam', 'av', 'srn', 'bxr', 'ty', 'kg', 'ab', 'na', 'tet', 'ig', -'ltg', 'nso', 'za', 'kaa', 'zu', 'ha', 'chy', 'rmy', 'chr', 'cu', +'ltg', 'nso', 'za', 'kaa', 'zu', 'ha', 'chy', 'rmy', 'cu', 'chr', 'tn', 'cdo', 'roa-rup', 'pih', 'bi', 'got', 'sm', 'tyv', 'bm', 'iu', 'ss', 'sd', 'pnt', 'tw', 'ki', 'rn', 'ee', 'ts', 'om', 'ak', 'fj', -'ti', 'ks', 'sg', 'ff', 've', 'cr', 'lg',
[MediaWiki-commits] [Gerrit] mw release 1.23wmf18 - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119970 Change subject: mw release 1.23wmf18 .. mw release 1.23wmf18 Change-Id: Ie99c7ae51966b4ac62d22eaf8fa8e790bc2aae52 --- M family.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/70/119970/1 diff --git a/family.py b/family.py index b4d84d7..4ee9364 100644 --- a/family.py +++ b/family.py @@ -4946,7 +4946,7 @@ Return Wikimedia projects version number as a string. # Don't use this, use versionnumber() instead. This only exists # to not break family files. -return '1.23wmf17' +return '1.23wmf18' def shared_image_repository(self, code): return ('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/119970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie99c7ae51966b4ac62d22eaf8fa8e790bc2aae52 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update language_by_size - change (pywikibot/compat)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119971 Change subject: update language_by_size .. update language_by_size Change-Id: I00c1664fde1c0f27898e0c0a0806f9fc30255a20 --- M families/wikibooks_family.py M families/wikipedia_family.py M families/wikiquote_family.py M families/wiktionary_family.py 4 files changed, 22 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/71/119971/1 diff --git a/families/wikibooks_family.py b/families/wikibooks_family.py index a091afa..2d3ac9a 100644 --- a/families/wikibooks_family.py +++ b/families/wikibooks_family.py @@ -12,11 +12,11 @@ self.languages_by_size = [ 'en', 'de', 'fr', 'hu', 'ja', 'it', 'es', 'pt', 'nl', 'pl', 'he', -'vi', 'id', 'sq', 'ca', 'fi', 'ru', 'cs', 'fa', 'zh', 'sv', 'da', +'vi', 'id', 'sq', 'ca', 'fi', 'ru', 'fa', 'cs', 'zh', 'sv', 'da', 'hr', 'tr', 'no', 'th', 'sr', 'gl', 'ko', 'ar', 'ta', 'mk', 'tl', 'ro', 'is', 'ka', 'tt', 'lt', 'az', 'eo', 'uk', 'bg', 'sk', 'el', -'sl', 'hy', 'ms', 'si', 'li', 'la', 'ml', 'ang', 'ur', 'ia', 'cv', -'et', 'mr', 'bn', 'hi', 'oc', 'km', 'kk', 'eu', 'fy', 'ie', 'ne', +'sl', 'hy', 'ms', 'si', 'li', 'la', 'ml', 'ang', 'ur', 'ia', 'et', +'cv', 'mr', 'bn', 'hi', 'oc', 'km', 'kk', 'eu', 'fy', 'ie', 'ne', 'sa', 'te', 'af', 'tg', 'ky', 'bs', 'pa', 'mg', 'be', 'cy', 'zh-min-nan', 'ku', 'uz', ] diff --git a/families/wikipedia_family.py b/families/wikipedia_family.py index 3aa1e7a..dc4e96c 100644 --- a/families/wikipedia_family.py +++ b/families/wikipedia_family.py @@ -13,31 +13,31 @@ self.languages_by_size = [ 'en', 'nl', 'de', 'sv', 'fr', 'it', 'ru', 'es', 'pl', 'war', 'ja', 'ceb', 'vi', 'pt', 'zh', 'uk', 'ca', 'no', 'fa', 'fi', 'id', 'cs', -'ko', 'ar', 'hu', 'ms', 'sr', 'ro', 'tr', 'min', 'kk', 'eo', 'sk', -'da', 'eu', 'lt', 'bg', 'he', 'hr', 'sl', 'uz', 'et', 'vo', 'hy', -'sh', 'nn', 'gl', 'simple', 'hi', 'la', 'az', 'el', 'th', 'oc', -'ka', 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'tt', 'te', 'cy', 'ht', +'ko', 'ar', 'hu', 'sr', 'ms', 'ro', 'tr', 'min', 'kk', 'eo', 'sk', +'da', 'eu', 'lt', 'bg', 'he', 'hr', 'sl', 'sh', 'uz', 'et', 'vo', +'hy', 'nn', 'gl', 'simple', 'hi', 'la', 'az', 'el', 'th', 'oc', +'ka', 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'te', 'tt', 'cy', 'ht', 'lv', 'be-x-old', 'sq', 'bs', 'br', 'jv', 'mg', 'lb', 'mr', 'is', -'ml', 'ba', 'my', 'pnb', 'yo', 'af', 'ur', 'an', 'fy', 'lmo', 'tg', -'ga', 'bn', 'zh-yue', 'cv', 'ky', 'sw', 'io', 'ne', 'gu', 'bpy', +'ml', 'ba', 'pnb', 'my', 'ur', 'yo', 'af', 'an', 'fy', 'lmo', 'ga', +'tg', 'bn', 'zh-yue', 'cv', 'ky', 'sw', 'io', 'ne', 'gu', 'bpy', 'scn', 'ce', 'sco', 'nds', 'ku', 'ast', 'qu', 'su', 'als', 'am', 'kn', 'ia', 'nap', 'bug', 'ckb', 'bat-smg', 'wa', 'map-bms', 'mn', 'gd', 'arz', 'hif', 'mzn', 'zh-min-nan', 'yi', 'si', 'vec', 'sah', -'sa', 'nah', 'bar', 'pa', 'os', 'roa-tara', 'fo', 'pam', 'hsb', +'sa', 'nah', 'pa', 'bar', 'os', 'roa-tara', 'fo', 'pam', 'hsb', 'se', 'li', 'mi', 'ilo', 'co', 'or', 'gan', 'frr', 'bo', 'glk', 'rue', 'bcl', 'nds-nl', 'fiu-vro', 'mrj', 'ps', 'tk', 'vls', 'xmf', 'gv', 'pag', 'diq', 'zea', 'km', 'kv', 'mhr', 'csb', 'vep', 'hak', -'dv', 'so', 'nrm', 'ay', 'rm', 'koi', 'udm', 'ug', 'stq', 'sc', -'lad', 'zh-classical', 'wuu', 'lij', 'fur', 'mt', 'eml', 'pi', 'as', -'bh', 'nov', 'ksh', 'gn', 'pcd', 'kw', 'ang', 'gag', 'ace', 'szl', +'dv', 'so', 'nrm', 'ay', 'rm', 'koi', 'udm', 'sc', 'ug', 'stq', +'lad', 'wuu', 'zh-classical', 'lij', 'fur', 'mt', 'eml', 'pi', 'as', +'nov', 'bh', 'ksh', 'gn', 'pcd', 'kw', 'ang', 'gag', 'ace', 'szl', 'nv', 'ext', 'frp', 'ie', 'mwl', 'ln', 'sn', 'dsb', 'pfl', 'lez', -'krc', 'crh', 'haw', 'pdc', 'xal', 'rw', 'kab', 'to', 'myv', 'arc', +'krc', 'crh', 'haw', 'pdc', 'xal', 'kab', 'rw', 'to', 'myv', 'arc', 'kl', 'bjn', 'pap', 'kbd', 'lo', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', 'cbk-zam', 'av', 'srn', 'bxr', 'ty', 'kg', 'ab', 'na', 'tet', 'ig', -'ltg', 'nso', 'za', 'kaa', 'zu', 'ha', 'chy', 'rmy', 'chr', 'cu', +'ltg', 'nso', 'za', 'kaa', 'zu', 'ha', 'chy', 'rmy', 'cu', 'chr', 'tn', 'cdo', 'roa-rup', 'pih', 'bi', 'got', 'sm', 'tyv', 'bm', 'iu', 'ss', 'sd', 'pnt', 'tw', 'ki', 'rn', 'ee', 'ts', 'om', 'ak', 'fj', -'ti', 'ks', 'sg', 'ff', 've', 'cr', 'lg', 'st', 'dz', 'xh', 'tum', +'ti', 'xh', 'ks', 'sg', 'ff', 've', 'cr',
[MediaWiki-commits] [Gerrit] mw release 1.23wmf18 - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: mw release 1.23wmf18 .. mw release 1.23wmf18 Change-Id: Ie99c7ae51966b4ac62d22eaf8fa8e790bc2aae52 --- M family.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/family.py b/family.py index b4d84d7..4ee9364 100644 --- a/family.py +++ b/family.py @@ -4946,7 +4946,7 @@ Return Wikimedia projects version number as a string. # Don't use this, use versionnumber() instead. This only exists # to not break family files. -return '1.23wmf17' +return '1.23wmf18' def shared_image_repository(self, code): return ('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/119970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie99c7ae51966b4ac62d22eaf8fa8e790bc2aae52 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update language_by_size - change (pywikibot/compat)
jenkins-bot has submitted this change and it was merged. Change subject: update language_by_size .. update language_by_size Change-Id: I00c1664fde1c0f27898e0c0a0806f9fc30255a20 --- M families/wikibooks_family.py M families/wikipedia_family.py M families/wikiquote_family.py M families/wiktionary_family.py 4 files changed, 22 insertions(+), 22 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/families/wikibooks_family.py b/families/wikibooks_family.py index a091afa..2d3ac9a 100644 --- a/families/wikibooks_family.py +++ b/families/wikibooks_family.py @@ -12,11 +12,11 @@ self.languages_by_size = [ 'en', 'de', 'fr', 'hu', 'ja', 'it', 'es', 'pt', 'nl', 'pl', 'he', -'vi', 'id', 'sq', 'ca', 'fi', 'ru', 'cs', 'fa', 'zh', 'sv', 'da', +'vi', 'id', 'sq', 'ca', 'fi', 'ru', 'fa', 'cs', 'zh', 'sv', 'da', 'hr', 'tr', 'no', 'th', 'sr', 'gl', 'ko', 'ar', 'ta', 'mk', 'tl', 'ro', 'is', 'ka', 'tt', 'lt', 'az', 'eo', 'uk', 'bg', 'sk', 'el', -'sl', 'hy', 'ms', 'si', 'li', 'la', 'ml', 'ang', 'ur', 'ia', 'cv', -'et', 'mr', 'bn', 'hi', 'oc', 'km', 'kk', 'eu', 'fy', 'ie', 'ne', +'sl', 'hy', 'ms', 'si', 'li', 'la', 'ml', 'ang', 'ur', 'ia', 'et', +'cv', 'mr', 'bn', 'hi', 'oc', 'km', 'kk', 'eu', 'fy', 'ie', 'ne', 'sa', 'te', 'af', 'tg', 'ky', 'bs', 'pa', 'mg', 'be', 'cy', 'zh-min-nan', 'ku', 'uz', ] diff --git a/families/wikipedia_family.py b/families/wikipedia_family.py index 3aa1e7a..dc4e96c 100644 --- a/families/wikipedia_family.py +++ b/families/wikipedia_family.py @@ -13,31 +13,31 @@ self.languages_by_size = [ 'en', 'nl', 'de', 'sv', 'fr', 'it', 'ru', 'es', 'pl', 'war', 'ja', 'ceb', 'vi', 'pt', 'zh', 'uk', 'ca', 'no', 'fa', 'fi', 'id', 'cs', -'ko', 'ar', 'hu', 'ms', 'sr', 'ro', 'tr', 'min', 'kk', 'eo', 'sk', -'da', 'eu', 'lt', 'bg', 'he', 'hr', 'sl', 'uz', 'et', 'vo', 'hy', -'sh', 'nn', 'gl', 'simple', 'hi', 'la', 'az', 'el', 'th', 'oc', -'ka', 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'tt', 'te', 'cy', 'ht', +'ko', 'ar', 'hu', 'sr', 'ms', 'ro', 'tr', 'min', 'kk', 'eo', 'sk', +'da', 'eu', 'lt', 'bg', 'he', 'hr', 'sl', 'sh', 'uz', 'et', 'vo', +'hy', 'nn', 'gl', 'simple', 'hi', 'la', 'az', 'el', 'th', 'oc', +'ka', 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'te', 'tt', 'cy', 'ht', 'lv', 'be-x-old', 'sq', 'bs', 'br', 'jv', 'mg', 'lb', 'mr', 'is', -'ml', 'ba', 'my', 'pnb', 'yo', 'af', 'ur', 'an', 'fy', 'lmo', 'tg', -'ga', 'bn', 'zh-yue', 'cv', 'ky', 'sw', 'io', 'ne', 'gu', 'bpy', +'ml', 'ba', 'pnb', 'my', 'ur', 'yo', 'af', 'an', 'fy', 'lmo', 'ga', +'tg', 'bn', 'zh-yue', 'cv', 'ky', 'sw', 'io', 'ne', 'gu', 'bpy', 'scn', 'ce', 'sco', 'nds', 'ku', 'ast', 'qu', 'su', 'als', 'am', 'kn', 'ia', 'nap', 'bug', 'ckb', 'bat-smg', 'wa', 'map-bms', 'mn', 'gd', 'arz', 'hif', 'mzn', 'zh-min-nan', 'yi', 'si', 'vec', 'sah', -'sa', 'nah', 'bar', 'pa', 'os', 'roa-tara', 'fo', 'pam', 'hsb', +'sa', 'nah', 'pa', 'bar', 'os', 'roa-tara', 'fo', 'pam', 'hsb', 'se', 'li', 'mi', 'ilo', 'co', 'or', 'gan', 'frr', 'bo', 'glk', 'rue', 'bcl', 'nds-nl', 'fiu-vro', 'mrj', 'ps', 'tk', 'vls', 'xmf', 'gv', 'pag', 'diq', 'zea', 'km', 'kv', 'mhr', 'csb', 'vep', 'hak', -'dv', 'so', 'nrm', 'ay', 'rm', 'koi', 'udm', 'ug', 'stq', 'sc', -'lad', 'zh-classical', 'wuu', 'lij', 'fur', 'mt', 'eml', 'pi', 'as', -'bh', 'nov', 'ksh', 'gn', 'pcd', 'kw', 'ang', 'gag', 'ace', 'szl', +'dv', 'so', 'nrm', 'ay', 'rm', 'koi', 'udm', 'sc', 'ug', 'stq', +'lad', 'wuu', 'zh-classical', 'lij', 'fur', 'mt', 'eml', 'pi', 'as', +'nov', 'bh', 'ksh', 'gn', 'pcd', 'kw', 'ang', 'gag', 'ace', 'szl', 'nv', 'ext', 'frp', 'ie', 'mwl', 'ln', 'sn', 'dsb', 'pfl', 'lez', -'krc', 'crh', 'haw', 'pdc', 'xal', 'rw', 'kab', 'to', 'myv', 'arc', +'krc', 'crh', 'haw', 'pdc', 'xal', 'kab', 'rw', 'to', 'myv', 'arc', 'kl', 'bjn', 'pap', 'kbd', 'lo', 'tpi', 'lbe', 'wo', 'jbo', 'mdf', 'cbk-zam', 'av', 'srn', 'bxr', 'ty', 'kg', 'ab', 'na', 'tet', 'ig', -'ltg', 'nso', 'za', 'kaa', 'zu', 'ha', 'chy', 'rmy', 'chr', 'cu', +'ltg', 'nso', 'za', 'kaa', 'zu', 'ha', 'chy', 'rmy', 'cu', 'chr', 'tn', 'cdo', 'roa-rup', 'pih', 'bi', 'got', 'sm', 'tyv', 'bm', 'iu', 'ss', 'sd', 'pnt', 'tw', 'ki', 'rn', 'ee', 'ts', 'om', 'ak', 'fj', -'ti', 'ks', 'sg', 'ff', 've', 'cr', 'lg', 'st', 'dz', 'xh', 'tum', +'ti', 'xh', 'ks', 'sg', 'ff', 've', 'cr', 'lg', 'st', 'dz', 'tum',
[MediaWiki-commits] [Gerrit] disambiguation page name format for pfl.wiki - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: disambiguation page name format for pfl.wiki .. disambiguation page name format for pfl.wiki Change-Id: I8835c480e698fdc39242e12a1f7a1ec4ba86a3b6 --- M scripts/solve_disambiguation.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py index 1187113..c2bd138 100644 --- a/scripts/solve_disambiguation.py +++ b/scripts/solve_disambiguation.py @@ -114,6 +114,7 @@ 'no': u'%s_(peker)', 'pl': u'%s_(ujednoznacznienie)', 'pt': u'%s_(desambiguação)', +'pfl': u'%s_BKL', 'he': u'%s_(פירושונים)', 'ru': u'%s_(значения)', 'sr': u'%s_(вишезначна одредница)', -- To view, visit https://gerrit.wikimedia.org/r/119324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8835c480e698fdc39242e12a1f7a1ec4ba86a3b6 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding Wikivoyage to the default interwiki map - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Adding Wikivoyage to the default interwiki map .. Adding Wikivoyage to the default interwiki map Note that this has already been added to the WMF interwiki map, so it will have no effect on WMF wikis, only 3rd party wikis. I'll update the link protocols in a follow-up commit. Change-Id: I78fbd3ec32c02e2b080c3ee64c6bb36218930a84 --- M maintenance/interwiki.list M maintenance/interwiki.sql 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: TTO: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/interwiki.list b/maintenance/interwiki.list index 179fa5c..bf31a6f 100644 --- a/maintenance/interwiki.list +++ b/maintenance/interwiki.list @@ -91,6 +91,7 @@ wikispecies|http://species.wikimedia.org/wiki/$1|1 wikitravel|http://wikitravel.org/en/$1|0 wikiversity|http://en.wikiversity.org/wiki/$1|1 +wikivoyage|http://en.wikivoyage.org/wiki/$1|1 wikt|http://en.wiktionary.org/wiki/$1|1 wiktionary|http://en.wiktionary.org/wiki/$1|1 wlug|http://www.wlug.org.nz/$1|0 diff --git a/maintenance/interwiki.sql b/maintenance/interwiki.sql index 370460a..ab5b91c 100644 --- a/maintenance/interwiki.sql +++ b/maintenance/interwiki.sql @@ -93,6 +93,7 @@ ('wikispecies','http://species.wikimedia.org/wiki/$1',1), ('wikitravel','http://wikitravel.org/en/$1',0), ('wikiversity','http://en.wikiversity.org/wiki/$1',1), +('wikivoyage','http://en.wikivoyage.org/wiki/$1',1), ('wikt','http://en.wiktionary.org/wiki/$1',1), ('wiktionary','http://en.wiktionary.org/wiki/$1',1), ('wlug','http://www.wlug.org.nz/$1',0), -- To view, visit https://gerrit.wikimedia.org/r/119905 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78fbd3ec32c02e2b080c3ee64c6bb36218930a84 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: TTO at.li...@live.com.au Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updating link protocols for WMF wikis in the interwiki map - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Updating link protocols for WMF wikis in the interwiki map .. Updating link protocols for WMF wikis in the interwiki map Change-Id: I18d281104c1c670c3b2dce6b2970930aba26bef0 --- M maintenance/interwiki.list M maintenance/interwiki.sql 2 files changed, 32 insertions(+), 32 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/interwiki.list b/maintenance/interwiki.list index bf31a6f..eb2f474 100644 --- a/maintenance/interwiki.list +++ b/maintenance/interwiki.list @@ -6,7 +6,7 @@ arxiv|http://www.arxiv.org/abs/$1|0 c2find|http://c2.com/cgi/wiki?FindPagevalue=$1|0 cache|http://www.google.com/search?q=cache:$1|0 -commons|http://commons.wikimedia.org/wiki/$1|0 +commons|https://commons.wikimedia.org/wiki/$1|0 corpknowpedia|http://corpknowpedia.org/wiki/index.php/$1|0 dictionary|http://www.dict.org/bin/Dict?Database=*Form=Dict1Strategy=*Query=$1|0 disinfopedia|http://www.disinfopedia.org/wiki.phtml?title=$1|0 @@ -24,7 +24,7 @@ google|http://www.google.com/search?q=$1|0 googlegroups|http://groups.google.com/groups?q=$1|0 hammondwiki|http://www.dairiki.org/HammondWiki/$1|0 -hewikisource|http://he.wikisource.org/wiki/$1|1 +hewikisource|https://he.wikisource.org/wiki/$1|1 hrwiki|http://www.hrwiki.org/index.php/$1|0 imdb|http://us.imdb.com/Title?$1|0 jargonfile|http://sunir.org/apps/meta.pl?wiki=JargonFileredirect=$1|0 @@ -37,14 +37,14 @@ lugkr|http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?$1|0 mathsongswiki|http://SeedWiki.com/page.cfm?wikiid=237doc=$1|0 meatball|http://www.usemod.com/cgi-bin/mb.pl?$1|0 -mediawikiwiki|http://www.mediawiki.org/wiki/$1|0 +mediawikiwiki|https://www.mediawiki.org/wiki/$1|0 mediazilla|https://bugzilla.wikimedia.org/$1|1 memoryalpha|http://www.memory-alpha.org/en/index.php/$1|0 metawiki|http://sunir.org/apps/meta.pl?$1|0 -metawikimedia|http://meta.wikimedia.org/wiki/$1|0 +metawikimedia|https://meta.wikimedia.org/wiki/$1|0 moinmoin|http://purl.net/wiki/moin/$1|0 mozillawiki|http://wiki.mozilla.org/index.php/$1|0 -mw|http://www.mediawiki.org/wiki/$1|0 +mw|https://www.mediawiki.org/wiki/$1|0 oeis|http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=$1|0 openfacts|http://openfacts.berlios.de/index.phtml?title=$1|0 openwiki|http://openwiki.com/?$1|0 @@ -77,23 +77,23 @@ why|http://clublet.com/c/c/why?$1|0 wiki|http://c2.com/cgi/wiki?$1|0 wikia|http://www.wikia.com/wiki/$1|0 -wikibooks|http://en.wikibooks.org/wiki/$1|1 +wikibooks|https://en.wikibooks.org/wiki/$1|1 wikicities|http://www.wikia.com/wiki/$1|0 wikif1|http://www.wikif1.org/$1|0 wikihow|http://www.wikihow.com/$1|0 wikinfo|http://www.wikinfo.org/index.php/$1|0 # The following wik[it]* interwikis but wikitravel belong to the Wikimedia Family: -wikimedia|http://wikimediafoundation.org/wiki/$1|0 -wikinews|http://en.wikinews.org/wiki/$1|1 -wikipedia|http://en.wikipedia.org/wiki/$1|1 -wikiquote|http://en.wikiquote.org/wiki/$1|1 -wikisource|http://wikisource.org/wiki/$1|1 -wikispecies|http://species.wikimedia.org/wiki/$1|1 +wikimedia|https://wikimediafoundation.org/wiki/$1|0 +wikinews|https://en.wikinews.org/wiki/$1|1 +wikipedia|https://en.wikipedia.org/wiki/$1|1 +wikiquote|https://en.wikiquote.org/wiki/$1|1 +wikisource|https://wikisource.org/wiki/$1|1 +wikispecies|https://species.wikimedia.org/wiki/$1|1 wikitravel|http://wikitravel.org/en/$1|0 -wikiversity|http://en.wikiversity.org/wiki/$1|1 -wikivoyage|http://en.wikivoyage.org/wiki/$1|1 -wikt|http://en.wiktionary.org/wiki/$1|1 -wiktionary|http://en.wiktionary.org/wiki/$1|1 +wikiversity|https://en.wikiversity.org/wiki/$1|1 +wikivoyage|https://en.wikivoyage.org/wiki/$1|1 +wikt|https://en.wiktionary.org/wiki/$1|1 +wiktionary|https://en.wiktionary.org/wiki/$1|1 wlug|http://www.wlug.org.nz/$1|0 zwiki|http://zwiki.org/$1|0 zzz wiki|http://wiki.zzz.ee/index.php/$1|0 diff --git a/maintenance/interwiki.sql b/maintenance/interwiki.sql index ab5b91c..0c05206 100644 --- a/maintenance/interwiki.sql +++ b/maintenance/interwiki.sql @@ -8,7 +8,7 @@ ('arxiv','http://www.arxiv.org/abs/$1',0), ('c2find','http://c2.com/cgi/wiki?FindPagevalue=$1',0), ('cache','http://www.google.com/search?q=cache:$1',0), -('commons','http://commons.wikimedia.org/wiki/$1',0), +('commons','https://commons.wikimedia.org/wiki/$1',0), ('corpknowpedia','http://corpknowpedia.org/wiki/index.php/$1',0), ('dictionary','http://www.dict.org/bin/Dict?Database=*Form=Dict1Strategy=*Query=$1',0), ('disinfopedia','http://www.disinfopedia.org/wiki.phtml?title=$1',0), @@ -26,7 +26,7 @@ ('google','http://www.google.com/search?q=$1',0), ('googlegroups','http://groups.google.com/groups?q=$1',0), ('hammondwiki','http://www.dairiki.org/HammondWiki/$1',0), -('hewikisource','http://he.wikisource.org/wiki/$1',1), +('hewikisource','https://he.wikisource.org/wiki/$1',1),
[MediaWiki-commits] [Gerrit] Remove obsolete text assignment; other code improvements - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove obsolete text assignment; other code improvements .. Remove obsolete text assignment; other code improvements - text assigned by Page.get() is never used - cosmetic_changes are disabled by config.cosmetic_changes_deny_script list object - remove obsolete global declaration for bot object Change-Id: Ifdd9f5e74f58d8258ad4bb62986ed9a18b6aeeff --- M scripts/touch.py 1 file changed, 4 insertions(+), 9 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/touch.py b/scripts/touch.py index 6182432..59c21cb 100755 --- a/scripts/touch.py +++ b/scripts/touch.py @@ -17,11 +17,11 @@ will only touch a single page. # -# (C) Pywikibot team, 2013 -# -__version__ = '$Id$' +# (C) Pywikibot team, 2009-2014 # # Distributed under the terms of the MIT license. +# +__version__ = '$Id$' # import pywikibot @@ -41,7 +41,7 @@ # get the page, and save it using the unmodified text. # whether or not getting a redirect throws an exception # depends on the variable self.touch_redirects. -text = page.get(get_redirect=self.touch_redirects) +page.get(get_redirect=self.touch_redirects) page.save(Pywikibot touch script) except pywikibot.NoPage: pywikibot.error(uPage %s does not exist. @@ -58,11 +58,6 @@ def main(*args): -global bot -# Disable cosmetic changes because we don't want to modify any page -# content, so that we don't flood the histories with minor changes. -config.cosmetic_changes = False -#page generator gen = None genFactory = pagegenerators.GeneratorFactory() redirs = False -- To view, visit https://gerrit.wikimedia.org/r/119755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifdd9f5e74f58d8258ad4bb62986ed9a18b6aeeff Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update copy and tweak CTA primary button styles - change (mediawiki...GettingStarted)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/119972 Change subject: Update copy and tweak CTA primary button styles .. Update copy and tweak CTA primary button styles * Import the English strings from https://trello.com/c/huG9wdua/365-update-gettingstarted-with-new-cta-and-tour-copy * Use the mw-ui-progressive CSS class rather than mw-ui-primary, which is deprecated Change-Id: If915cb1b25be00b3a6526fac9c3e03ab629f93f5 --- M GettingStarted.i18n.php M resources/ext.gettingstarted.return.js M resources/ext.gettingstarted.return.less 3 files changed, 27 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/72/119972/1 diff --git a/GettingStarted.i18n.php b/GettingStarted.i18n.php index 0e9c789..37203b5 100644 --- a/GettingStarted.i18n.php +++ b/GettingStarted.i18n.php @@ -24,48 +24,47 @@ /// Shared among all tasks 'gettingstarted-task-toolbar-editing-help-text' = 'Show me how', 'gettingstarted-task-toolbar-editing-help-title' = 'Show a guide on how to edit', - 'gettingstarted-task-toolbar-try-another-text' = 'Try another page ►', + 'gettingstarted-task-toolbar-try-another-text' = 'Try another article ►', 'gettingstarted-task-toolbar-close-title' = 'Close this toolbar', - 'gettingstarted-task-toolbar-no-suggested-page' = 'Sorry. We could not find more pages to be improved at the moment. Try again in a moment or search for your own topics of interest.', + 'gettingstarted-task-toolbar-no-suggested-article' = 'Sorry. We could not find more articles to be improved at the moment. Try again in a moment or search for your own topics of interest.', /// Specific to each task - 'gettingstarted-task-copyedit-toolbar-description' = 'This page may have spelling or grammar errors you can fix.', - 'gettingstarted-task-copyedit-toolbar-try-another-title' = 'Go to a random page you can improve by copyediting', + 'gettingstarted-task-copyedit-toolbar-description' = 'This article may have spelling or grammar errors you can fix.', + 'gettingstarted-task-copyedit-toolbar-try-another-title' = 'Go to a random article you can improve by copyediting', - 'gettingstarted-task-clarify-toolbar-description' = 'This page may be confusing or vague. Look for ways you can make it clearer.', - 'gettingstarted-task-clarify-toolbar-try-another-title' = 'Go to a random page you can clarify', + 'gettingstarted-task-clarify-toolbar-description' = 'This article may be confusing or vague. Look for ways you can make it clearer.', + 'gettingstarted-task-clarify-toolbar-try-another-title' = 'Go to a random article you can clarify', - 'gettingstarted-task-addlinks-toolbar-description' = 'This page may need more links. Look for terms that have a {{SITENAME}} page.', - 'gettingstarted-task-addlinks-toolbar-try-another-title' = 'Go to a random page you can add links to', + 'gettingstarted-task-addlinks-toolbar-description' = 'This article may need more links. Look for terms that have a {{SITENAME}} article.', + 'gettingstarted-task-addlinks-toolbar-try-another-title' = 'Go to a random article you can add links to', // Tours - 'guidedtour-tour-gettingstartedtasktoolbarintro-title' = 'How to get started', - 'guidedtour-tour-gettingstartedtasktoolbarintro-description' = 'Just start scanning through the page looking for improvements. If you feel overwhelmed, do not worry. You do not have to be an expert on this topic! If you need help or want to try another page, use the links in the top bar.', + 'guidedtour-tour-gettingstartedtasktoolbarintro-title' = 'Let\'s get started', + 'guidedtour-tour-gettingstartedtasktoolbarintro-description' = 'This article is identified by other Wikipedia users as needing improvement. You don\'t have to be an expert in the subject to help.', 'guidedtour-tour-gettingstartedtasktoolbar-ambox-title' = 'Ideas on what to do', - 'guidedtour-tour-gettingstartedtasktoolbar-ambox-description' = 'These banners identify problems with this page. You do not need to address them all, just stick with what you are comfortable doing.', - 'guidedtour-tour-gettingstartedtasktoolbar-edit-article-title' = 'Click {{int:vector-view-edit}}', - 'guidedtour-tour-gettingstartedtasktoolbar-edit-article-description' = 'You can edit the entire page by clicking here.', - 'guidedtour-tour-gettingstartedtasktoolbar-edit-section-title' = 'Edit a section', + 'guidedtour-tour-gettingstartedtasktoolbar-ambox-description' = 'These banners identify problems with this article. You don\'t need to fix them all, just stick with what you\'re comfortable doing.', + 'guidedtour-tour-gettingstartedtasktoolbar-edit-article-title' = 'Edit the whole
[MediaWiki-commits] [Gerrit] Support 5+ digit years in DateTimeParser - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Support 5+ digit years in DateTimeParser .. Support 5+ digit years in DateTimeParser Bug: 62648 Change-Id: I03b799542a8d6f334116d6a56d34ff9bbec88f40 --- M lib/includes/parsers/DateTimeParser.php M lib/tests/phpunit/parsers/DateTimeParserTest.php 2 files changed, 43 insertions(+), 5 deletions(-) Approvals: WikidataJenkins: Verified Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/parsers/DateTimeParser.php b/lib/includes/parsers/DateTimeParser.php index 85b26bc..8c408fa 100644 --- a/lib/includes/parsers/DateTimeParser.php +++ b/lib/includes/parsers/DateTimeParser.php @@ -34,9 +34,10 @@ } /** -* Parses the provided string and returns the result. +* Parses the provided string * -* @param string $value +* @param string $value in a format as specified by the PHP DateTime object +* there are exceptions as we can handel 5+ digit dates * * @throws ParseException * @return TimeValue @@ -44,6 +45,10 @@ protected function stringParse( $value ) { $calendarModelParser = new CalendarModelParser(); $options = $this-getOptions(); + + //Place to put large years when they are found + $largeYear = null; + try{ $value = $this-getValueWithFixedYearLengths( $this-getValueWithFixedSeparators( @@ -55,10 +60,21 @@ ) ); + //PHP's DateTime object also cant handel larger than 4 digit years + //e.g. 1 June 202020 + if( preg_match( '/^(.*[^\d]|)(\d{5,})(.*|)$/', $value, $matches ) ) { + $value = $matches[1] . substr( $matches[2], -4 ) . $matches[3]; + $largeYear = $matches[2]; + } + //Parse using the DateTime object (this will allow us to format the date in a nicer way) //TODO try to match and remove BCE etc. before putting the value into the DateTime object to get - dates! $dateTime = new DateTime( $value ); - $timeString = '+' . $dateTime-format( 'Y-m-d\TH:i:s\Z' ); + if( $largeYear === null ) { + $timeString = '+' . $dateTime-format( 'Y-m-d\TH:i:s\Z' ); + } else { + $timeString = '+' . $largeYear . $dateTime-format( '-m-d\TH:i:s\Z' ); + } //Pass the reformatted string into a base parser that parses this +/-Y-m-d\TH:i:s\Z format with a precision $valueParser = new \ValueParsers\TimeParser( $calendarModelParser, $options ); @@ -114,4 +130,4 @@ return $value; } -} \ No newline at end of file +} diff --git a/lib/tests/phpunit/parsers/DateTimeParserTest.php b/lib/tests/phpunit/parsers/DateTimeParserTest.php index de40bec..c9e5912 100644 --- a/lib/tests/phpunit/parsers/DateTimeParserTest.php +++ b/lib/tests/phpunit/parsers/DateTimeParserTest.php @@ -84,6 +84,10 @@ array( '+0055-01-09T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), '555-01-09' = array( '+0555-01-09T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), + '33300-1-1' = + array( '+00033300-01-01T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), + '3330002-1-1' = + array( '+03330002-01-01T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), //Less than 4 digit years '10/10/10' = @@ -104,6 +108,25 @@ array( '+0111-07-04T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), '4th July 1' = array( '+0001-07-04T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), + + //More than 4 digit years + '4th July 1' = + array( '+0001-07-04T00:00:00Z', 0 , 0 , 0 , TimeValue::PRECISION_DAY , TimeFormatter::CALENDAR_GREGORIAN ), + '10/10/22000' = + array( '+00022000-10-10T00:00:00Z', 0 , 0 , 0 ,
[MediaWiki-commits] [Gerrit] HHVM as beta feature - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/119974 Change subject: HHVM as beta feature .. HHVM as beta feature Change-Id: Ifa9623b5207a60384f9f6dbcd2b524cc73f9b241 --- M TranslatewikiSettings.php 1 file changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/74/119974/1 diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php index 024b9f2..6772e6b 100644 --- a/TranslatewikiSettings.php +++ b/TranslatewikiSettings.php @@ -445,8 +445,41 @@ $wgFooterIcons['poweredby']['netcup'] = div class='mw_poweredby'a href=\http://www.netcup.de/\; title=\Powered by netcup - netcup.de – Webhosting, vServer, Servermanagement\ target=\_blank\Powered by netcup - netcup.de – Webhosting, vServer, Servermanagement/a/div; +require $IP/extensions/BetaFeatures/BetaFeatures.php; + # Dynamic code starts here +$wgHooks['GetBetaFeaturePreferences'][] = function ( $user, $prefs ) { + $prefs['hhvm-beta'] = array( + 'label-message' = 'hhvm-beta-label', + 'desc-message' = 'hhvm-beta-desc', + 'screenshot' = 'https://fbcdn-photos-f-a.akamaihd.net/hphotos-ak-prn2/1393601_10151895286787200_231799865_a.jpg', + 'info-link' = 'http://www.hhvm.com/blog/', + 'discussion-link' = '/wiki/Support', + ); +}; +$wgHooks['BeforePageDisplay'][] = function ( OutputPage $out ) { + $req = $out-getRequest(); + $user = $out-getUser(); + + $hasCookie = $req-getCookie( 'hhvm', '' ); + $wantsCookie = BetaFeatures::isFeatureEnabled( $user, 'hhvm-beta' ); + + if ( !$hasCookie $wantsCookie ) { + $req-response()-setcookie( 'hhvm', '1', 0, array( 'prefix' = '' ) ); + } + + if ( $hasCookie !$wantsCookie ) { + $req-response()-setcookie( 'hhvm', '0', -1, array( 'prefix' = '' ) ); + } +}; +$wgHooks['LocalisationCacheRecache'][] = function ( $cache, $code, $cachedData ) { + if ( $code === 'en' ) { + $cachedData['messages']['hhvm-beta-label'] = 'HHVM'; + $cachedData['messages']['hhvm-beta-desc'] = 'HHVM is A new, supposedly faster, PHP runtime.'; + } +}; + if ( $wgCanonicalServer !== https://translatewiki.net; ) { $wgHooks['SiteNoticeAfter'] = array( 'nbwWarn' ); } -- To view, visit https://gerrit.wikimedia.org/r/119974 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa9623b5207a60384f9f6dbcd2b524cc73f9b241 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tune labsdb postgresql - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Tune labsdb postgresql .. Tune labsdb postgresql Using all that memory for performance Change-Id: Id7ef477610f04180ea9b7deac4619901989f6ebd --- A files/osm/tuning.conf M manifests/role/osm.pp 2 files changed, 20 insertions(+), 1 deletion(-) Approvals: Aude: Looks good to me, but someone else must approve Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/files/osm/tuning.conf b/files/osm/tuning.conf new file mode 100644 index 000..788ba81 --- /dev/null +++ b/files/osm/tuning.conf @@ -0,0 +1,7 @@ +maintenance_work_mem = 1GB +checkpoint_completion_target = 0.9 +effective_cache_size = 22GB +work_mem = 192MB +wal_buffers = 8MB +shared_buffers = 7680MB +max_connections = 80 diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp index c34ab62..11912a8 100644 --- a/manifests/role/osm.pp +++ b/manifests/role/osm.pp @@ -2,13 +2,24 @@ class role::osm::common { include standard + +file { '/etc/postgresql/9.1/main': +ensure = 'present', +owner = 'root', +group = 'root', +mode= '0444', +source = 'puppet:///files/osm/tuning.conf', +} } + class role::osm::master { include role::osm::common -include postgresql::master include postgresql::postgis include osm::packages include passwords::osm +class { 'postgresql::master': +includes = 'tuning.conf' +} postgresql::spatialdb { 'gis': } osm::populatedb { 'gis': @@ -53,5 +64,6 @@ class {'postgresql::slave': master_server= $osm_master, replication_pass = $passwords::osm::replication_pass, +includes = 'tuning.conf', } } -- To view, visit https://gerrit.wikimedia.org/r/119870 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7ef477610f04180ea9b7deac4619901989f6ebd Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove unused import - change (pywikibot/core)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/119975 Change subject: remove unused import .. remove unused import Change-Id: I394887391189de3dd11e36753be5fec96e742e08 --- M scripts/redirect.py 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/75/119975/1 diff --git a/scripts/redirect.py b/scripts/redirect.py index 2bfae04..f2eec79 100755 --- a/scripts/redirect.py +++ b/scripts/redirect.py @@ -73,7 +73,6 @@ import datetime import pywikibot from pywikibot import i18n -from pywikibot import config from pywikibot import xmlreader -- To view, visit https://gerrit.wikimedia.org/r/119975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I394887391189de3dd11e36753be5fec96e742e08 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Ladsgroup ladsgr...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove obsolete pywikibot.stopme() at the end of the script. - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119976 Change subject: remove obsolete pywikibot.stopme() at the end of the script. .. remove obsolete pywikibot.stopme() at the end of the script. In core branch pywikibot.stopme() is called by atexit library. The function is executed upon normal program termination. This patch prohibits executing it twice. Change-Id: I9171ba44407ec1848c29e5ea69482d83b1e457ff --- M scripts/add_text.py M scripts/archivebot.py M scripts/basic.py M scripts/blockpageschecker.py M scripts/casechecker.py M scripts/catall.py M scripts/category.py M scripts/category_redirect.py M scripts/clean_sandbox.py M scripts/commonscat.py 10 files changed, 26 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/76/119976/1 diff --git a/scripts/add_text.py b/scripts/add_text.py index 5fce0ae..773c789 100644 --- a/scripts/add_text.py +++ b/scripts/add_text.py @@ -64,7 +64,7 @@ # # (C) Filnik, 2007-2010 -# (C) Pywikibot team, 2007-2013 +# (C) Pywikibot team, 2007-2014 # # Distributed under the terms of the MIT license. # @@ -365,7 +365,4 @@ create=talkPage) if __name__ == __main__: -try: -main() -finally: -pywikibot.stopme() +main() diff --git a/scripts/archivebot.py b/scripts/archivebot.py index 6bf326c..c970c5f 100644 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -65,7 +65,7 @@ # # (C) Misza13, 2006-2010 -# (C) xqt, 2009-2012 +# (C) xqt, 2009-2014 # (C) Pywikibot team, 2007-2013 # # Distributed under the terms of the MIT license. @@ -550,7 +550,4 @@ traceback.print_exc() if __name__ == '__main__': -try: -main() -finally: -pywikibot.stopme() +main() diff --git a/scripts/basic.py b/scripts/basic.py index 9f191f2..daee1a3 100755 --- a/scripts/basic.py +++ b/scripts/basic.py @@ -16,7 +16,7 @@ and the bot will only work on that single page. # -# (C) Pywikibot team, 2006-2013 +# (C) Pywikibot team, 2006-2014 # # Distributed under the terms of the MIT license. # @@ -176,7 +176,4 @@ pywikibot.showHelp() if __name__ == __main__: -try: -main() -finally: -pywikibot.stopme() +main() diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py index 1a55a99..dd9bb9c 100755 --- a/scripts/blockpageschecker.py +++ b/scripts/blockpageschecker.py @@ -57,7 +57,7 @@ # (C) Monobi a.k.a. Wikihermit, 2007 # (C) Filnik, 2007-2011 # (C) NicDumZ, 2008-2009 -# (C) Pywikibot team, 2007-2013 +# (C) Pywikibot team, 2007-2014 # # Distributed under the terms of the MIT license. # @@ -491,7 +491,4 @@ if __name__ == __main__: -try: -main() -finally: -pywikibot.stopme() +main() diff --git a/scripts/casechecker.py b/scripts/casechecker.py index 495575c..5e53ea6 100644 --- a/scripts/casechecker.py +++ b/scripts/casechecker.py @@ -822,8 +822,5 @@ if __name__ == __main__: -try: -bot = CaseChecker() -bot.Run() -finally: -pywikibot.stopme() +bot = CaseChecker() +bot.Run() diff --git a/scripts/catall.py b/scripts/catall.py index 20d5ded..421cd76 100755 --- a/scripts/catall.py +++ b/scripts/catall.py @@ -110,7 +110,4 @@ pywikibot.output(u'%s is a redirect' % p.title()) if __name__ == __main__: -try: -main() -finally: -pywikibot.stopme() +main() diff --git a/scripts/category.py b/scripts/category.py index f83d9e3..2d6db01 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -89,7 +89,7 @@ # (C) leogregianin, 2004-2008 # (C) Cyde, 2006-2010 # (C) Anreas J Schwab, 2007 -# (C) xqt, 2009-2013 +# (C) xqt, 2009-2014 # (C) Pywikibot team, 2008-2013 # # Distributed under the terms of the MIT license. @@ -1067,4 +1067,3 @@ pywikibot.error(Fatal error:, exc_info=True) finally: catDB.dump() -pywikibot.stopme() diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py index 7e71e1c..48bcc93 100755 --- a/scripts/category_redirect.py +++ b/scripts/category_redirect.py @@ -15,7 +15,7 @@ # -# (C) Pywikibot team, 2008-2013 +# (C) Pywikibot team, 2008-2014 # # Distributed under the terms of the MIT license. # @@ -414,18 +414,14 @@ def main(*args): -global bot -try: -a = pywikibot.handleArgs(*args) -if len(a) == 1: -raise RuntimeError('Unrecognized argument %s' % a[0]) -elif a: -raise RuntimeError('Unrecognized arguments: ' + -.join(('%s' % arg) for arg in a)) -bot = CategoryRedirectBot() -bot.run() -finally: -pywikibot.stopme() +a = pywikibot.handleArgs(*args) +if len(a) == 1: +raise RuntimeError('Unrecognized argument %s' % a[0]) +elif a: +raise
[MediaWiki-commits] [Gerrit] hhvm needs a new repository - change (translatewiki)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/119978 Change subject: hhvm needs a new repository .. hhvm needs a new repository Change-Id: Iacfaeea112f33b6cea3fce59bd8620d87998129d --- M puppet/modules/hhvm/manifests/init.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/78/119978/1 diff --git a/puppet/modules/hhvm/manifests/init.pp b/puppet/modules/hhvm/manifests/init.pp index 182daab..bb61b3b 100644 --- a/puppet/modules/hhvm/manifests/init.pp +++ b/puppet/modules/hhvm/manifests/init.pp @@ -9,6 +9,8 @@ include_src = false, } + apt::ppa { 'ppa:mapnik/boost': } + package { 'hhvm-fastcgi': ensure = present, require = Apt::Source['hhvm'], -- To view, visit https://gerrit.wikimedia.org/r/119978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacfaeea112f33b6cea3fce59bd8620d87998129d Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] move main script to main() and remove obsolete pywikibot.sto... - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/119977 Change subject: move main script to main() and remove obsolete pywikibot.stopme(). .. move main script to main() and remove obsolete pywikibot.stopme(). In core branch pywikibot.stopme() is called by atexit library. The function is executed upon normal program termination. This patch prohibits executing it twice. Change-Id: I57289b1ffee97d05709f5c1f961bc39ec98f7d5e --- M scripts/commons_link.py 1 file changed, 44 insertions(+), 42 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/77/119977/1 diff --git a/scripts/commons_link.py b/scripts/commons_link.py index 5b7f883..797d3ec 100644 --- a/scripts/commons_link.py +++ b/scripts/commons_link.py @@ -27,7 +27,7 @@ # # (C) Leonardo Gregianin, 2006 -# (C) Pywikibot team, 2007-2013 +# (C) Pywikibot team, 2007-2014 # # Distributed under the terms of the MIT license. # @@ -159,48 +159,50 @@ except pywikibot.LockedPage: pywikibot.output(u'Page %s is locked?!' % page.title()) -if __name__ == __main__: + +def main(): singlepage = [] gen = None start = None -try: -action = None -for arg in pywikibot.handleArgs(): -if arg == ('pages'): -action = 'pages' -elif arg == ('categories'): -action = 'categories' -elif arg.startswith('-start:'): -start = pywikibot.Page(pywikibot.getSite(), arg[7:]) -gen = pagegenerators.AllpagesPageGenerator( -start.title(withNamespace=False), -namespace=start.namespace(), -includeredirects=False) -elif arg.startswith('-cat:'): -cat = pywikibot.Category(pywikibot.getSite(), - 'Category:%s' % arg[5:]) -gen = pagegenerators.CategorizedPageGenerator(cat) -elif arg.startswith('-ref:'): -ref = pywikibot.Page(pywikibot.getSite(), arg[5:]) -gen = pagegenerators.ReferringPageGenerator(ref) -elif arg.startswith('-link:'): -link = pywikibot.Page(pywikibot.getSite(), arg[6:]) -gen = pagegenerators.LinkedPageGenerator(link) -elif arg.startswith('-page:'): -singlepage = pywikibot.Page(pywikibot.getSite(), arg[6:]) -gen = iter([singlepage]) -#else: -#bug +action = None +for arg in pywikibot.handleArgs(): +if arg == ('pages'): +action = 'pages' +elif arg == ('categories'): +action = 'categories' +elif arg.startswith('-start:'): +start = pywikibot.Page(pywikibot.getSite(), arg[7:]) +gen = pagegenerators.AllpagesPageGenerator( +start.title(withNamespace=False), +namespace=start.namespace(), +includeredirects=False) +elif arg.startswith('-cat:'): +cat = pywikibot.Category(pywikibot.getSite(), + 'Category:%s' % arg[5:]) +gen = pagegenerators.CategorizedPageGenerator(cat) +elif arg.startswith('-ref:'): +ref = pywikibot.Page(pywikibot.getSite(), arg[5:]) +gen = pagegenerators.ReferringPageGenerator(ref) +elif arg.startswith('-link:'): +link = pywikibot.Page(pywikibot.getSite(), arg[6:]) +gen = pagegenerators.LinkedPageGenerator(link) +elif arg.startswith('-page:'): +singlepage = pywikibot.Page(pywikibot.getSite(), arg[6:]) +gen = iter([singlepage]) +#else: +#bug -if action == 'pages': -preloadingGen = pagegenerators.PreloadingGenerator(gen) -bot = CommonsLinkBot(preloadingGen, acceptall=False) -bot.pages() -elif action == 'categories': -preloadingGen = pagegenerators.PreloadingGenerator(gen) -bot = CommonsLinkBot(preloadingGen, acceptall=False) -bot.categories() -else: -pywikibot.showHelp(u'commons_link') -finally: -pywikibot.stopme() +if action == 'pages': +preloadingGen = pagegenerators.PreloadingGenerator(gen) +bot = CommonsLinkBot(preloadingGen, acceptall=False) +bot.pages() +elif action == 'categories': +preloadingGen = pagegenerators.PreloadingGenerator(gen) +bot = CommonsLinkBot(preloadingGen, acceptall=False) +bot.categories() +else: +pywikibot.showHelp(u'commons_link') + + +if __name__ == __main__: +main() -- To view, visit https://gerrit.wikimedia.org/r/119977 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] Create a user for access to OSM db - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Create a user for access to OSM db .. Create a user for access to OSM db Provide access from Labs IP space and to database gis Change-Id: I7037ad48bb7667d188c3f36d88771fdbf5ea8edd --- M manifests/role/osm.pp 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp index 11912a8..d08e6f3 100644 --- a/manifests/role/osm.pp +++ b/manifests/role/osm.pp @@ -51,6 +51,17 @@ database = 'replication', } } + +# OSM user +postgresql::user { osm@labs: +ensure = 'present', +user = 'osm', +password = $passwords::osm::osm_password, +cidr = 10.68.16.0/21, +type = 'host', +method = 'md5', +database = 'gis', +} } class role::osm::slave { -- To view, visit https://gerrit.wikimedia.org/r/119869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7037ad48bb7667d188c3f36d88771fdbf5ea8edd Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove unused import - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: remove unused import .. remove unused import Change-Id: I394887391189de3dd11e36753be5fec96e742e08 --- M scripts/redirect.py 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/redirect.py b/scripts/redirect.py index 2bfae04..f2eec79 100755 --- a/scripts/redirect.py +++ b/scripts/redirect.py @@ -73,7 +73,6 @@ import datetime import pywikibot from pywikibot import i18n -from pywikibot import config from pywikibot import xmlreader -- To view, visit https://gerrit.wikimedia.org/r/119975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I394887391189de3dd11e36753be5fec96e742e08 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added browser specific Cucumber tags - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Added browser specific Cucumber tags .. Added browser specific Cucumber tags Paired with Kartik Mistry. Bug: 62477 Change-Id: I52ec4b73eb8d2e36d30985cf224a9339eed88cb1 --- M tests/browser/features/manage_translator_sandbox.feature M tests/browser/features/special_translate.feature M tests/browser/features/translation_stash.feature 3 files changed, 6 insertions(+), 5 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/manage_translator_sandbox.feature b/tests/browser/features/manage_translator_sandbox.feature index 1e077b6..29d33d8 100644 --- a/tests/browser/features/manage_translator_sandbox.feature +++ b/tests/browser/features/manage_translator_sandbox.feature @@ -1,4 +1,4 @@ -@login @sandbox.translatewiki.net +@firefox @login @sandbox.translatewiki.net Feature: Manage translator sandbox As a translation administrator, diff --git a/tests/browser/features/special_translate.feature b/tests/browser/features/special_translate.feature index a2bed71..17c5b73 100644 --- a/tests/browser/features/special_translate.feature +++ b/tests/browser/features/special_translate.feature @@ -1,3 +1,4 @@ +@firefox @meta.wikimedia.org Feature: Special:Translate This page is the primary web translation interface for users. @@ -7,17 +8,17 @@ https://commons.wikimedia.org/wiki/File:Translate-workflow-spec.pdf?page=10 describes how it is meant to look and behave. - @meta.wikimedia.org @sandbox.translatewiki.net + @sandbox.translatewiki.net Scenario: Workflow selector not being visible Given I am translating a message group which doesn't have workflow states Then I should not see a workflow state - @custom-setup-needed @meta.wikimedia.org + @custom-setup-needed Scenario: Workflow selector being visible Given I am translating a message group which has workflow states Then I should see a workflow state - @custom-setup-needed @meta.wikimedia.org + @custom-setup-needed Scenario: Workflow selector being clickable Given I am translating a message group which has workflow states When I click the workflow state diff --git a/tests/browser/features/translation_stash.feature b/tests/browser/features/translation_stash.feature index 8700b43..c86ba06 100644 --- a/tests/browser/features/translation_stash.feature +++ b/tests/browser/features/translation_stash.feature @@ -1,4 +1,4 @@ -@login @sandbox.translatewiki.net @stash +@firefox @login @sandbox.translatewiki.net @stash Feature: Translation stash As a new translator, I can make translations in sandbox mode so that a translation administrator -- To view, visit https://gerrit.wikimedia.org/r/119967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52ec4b73eb8d2e36d30985cf224a9339eed88cb1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge tag 'v0.8.1' from upstream - change (operations...jenkins-debian-glue)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Merge tag 'v0.8.1' from upstream .. Merge tag 'v0.8.1' from upstream This bring wmf package to release 0.8.1 Change-Id: Ibce8bc7c9bc24ca7fdaf89911b67aa4635c293e7 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/119961 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibce8bc7c9bc24ca7fdaf89911b67aa4635c293e7 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/jenkins-debian-glue Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] applicationserver::hhvm: add boost backports ppa for beta - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/119979 Change subject: applicationserver::hhvm: add boost backports ppa for beta .. applicationserver::hhvm: add boost backports ppa for beta Per https://github.com/facebook/hhvm/wiki/Prebuilt-Packages-on-Ubuntu-12.04, running HHVM on Precise now requires backports of boost. Change-Id: Iea6cdceb90abdddc3a694b9eb45e220e600e1db7 --- A files/misc/boost-backports.key M modules/applicationserver/manifests/hhvm.pp 2 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/79/119979/1 diff --git a/files/misc/boost-backports.key b/files/misc/boost-backports.key new file mode 100644 index 000..90c9b2d --- /dev/null +++ b/files/misc/boost-backports.key @@ -0,0 +1,13 @@ +-BEGIN PGP PUBLIC KEY BLOCK- +Version: SKS 1.1.4 +Comment: Hostname: keyserver.ubuntu.com + +mI0ETiwADQEEANEbV9FF7WhSqo5k7IOHmAWsQyAROp3rRPyG15Bgwt1o1h6PjAxwMoNG30XB +q3gM/syEwDFcvMeZoRvSOaFaE0xK2gCkFJFP0lP7TphimklMpQolmMxQNCrIuQXfUnxLImgN +yYs9zSn+0l+o3WTXy1jZyAUdBUUk2DoRN1AKitJBABEBAAG0I0xhdW5jaHBhZCBQUEEgZm9y +IE1hcG5payBEZXZlbG9wZXJziLgEEwECACIFAk4sAA0CGwMGCwkIBwMCBhUIAgkKCwQWAgMB +Ah4BAheAAAoJEE97k1ldULa6mjQEAJulasTjtOAt0O6CWHwvNlpfjty5mDIWVkrbiTVEJ9es +XgatzFzmS6RnepcR3ij93XY7scTce298/o0yjQEtBrRCD4C48+PG5dff1E7qhDyK4bkSJzkk +h2oBxIjnPunnY6di6YwO28Br/FBIFslNmD7JM32/9lzVYpwTDn9T6cEp +=kSkP +-END PGP PUBLIC KEY BLOCK- \ No newline at end of file diff --git a/modules/applicationserver/manifests/hhvm.pp b/modules/applicationserver/manifests/hhvm.pp index d75b53c..a192b40 100644 --- a/modules/applicationserver/manifests/hhvm.pp +++ b/modules/applicationserver/manifests/hhvm.pp @@ -13,6 +13,14 @@ fail('applicationserver::hhvm may only be deployed to Labs.') } +apt::repository { 'boost_backports': +uri= 'http://ppa.launchpad.net/mapnik/boost/ubuntu', +dist = 'precise', +components = 'main', +keyfile= 'puppet:///files/misc/boost-backports.key', +before = Package['hhvm-fastcgi'], +} + package { 'hhvm-fastcgi': ensure = present, } -- To view, visit https://gerrit.wikimedia.org/r/119979 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea6cdceb90abdddc3a694b9eb45e220e600e1db7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pyflakes and bugfixes - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: pyflakes and bugfixes .. pyflakes and bugfixes remove obsolete sys import fix unknown response variable use weblink as imported instead of pywikibot.weblib Change-Id: I78f5ba1829a634b0518223bf4ff7cf1d5a266556 --- M scripts/weblinkchecker.py 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py index 1269378..8843286 100644 --- a/scripts/weblinkchecker.py +++ b/scripts/weblinkchecker.py @@ -99,7 +99,6 @@ # __version__ = '$Id$' -import sys import re import codecs import pickle @@ -273,8 +272,7 @@ conn = self.getConnection() conn.request('HEAD', '/', None, self.header) self.response = conn.getresponse() - -self.readEncodingFromResponse(response) +self.readEncodingFromResponse(self.response) except: pass if not self.serverEncoding: @@ -592,9 +590,9 @@ # We'll list it in a file so that it can be removed manually. if timeSinceFirstFound 60 * 60 * 24 * day: # search for archived page -archiveURL = pywikibot.weblib.getInternetArchiveURL(url) +archiveURL = weblib.getInternetArchiveURL(url) if archiveURL is None: -archiveURL = pywikibot.weblib.getWebCitationURL(url) +archiveURL = weblib.getWebCitationURL(url) self.log(url, error, page, archiveURL) else: self.historyDict[url] = [(page.title(), now, error)] -- To view, visit https://gerrit.wikimedia.org/r/119295 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78f5ba1829a634b0518223bf4ff7cf1d5a266556 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hhvm needs a new repository - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: hhvm needs a new repository .. hhvm needs a new repository Change-Id: Iacfaeea112f33b6cea3fce59bd8620d87998129d --- M puppet/modules/hhvm/manifests/init.pp 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/hhvm/manifests/init.pp b/puppet/modules/hhvm/manifests/init.pp index 182daab..bb61b3b 100644 --- a/puppet/modules/hhvm/manifests/init.pp +++ b/puppet/modules/hhvm/manifests/init.pp @@ -9,6 +9,8 @@ include_src = false, } + apt::ppa { 'ppa:mapnik/boost': } + package { 'hhvm-fastcgi': ensure = present, require = Apt::Source['hhvm'], -- To view, visit https://gerrit.wikimedia.org/r/119978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iacfaeea112f33b6cea3fce59bd8620d87998129d Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use DataValues/Time version ~0.5.0 - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/119980 Change subject: Use DataValues/Time version ~0.5.0 .. Use DataValues/Time version ~0.5.0 REQUIRES: https://github.com/DataValues/Time/pull/10 https://github.com/DataValues/Time/pull/11 Also requires the tag to be made! Bug: 62730 Change-Id: Ie75b3f91e5b9f5d8bf6834410425eaa7e75f2e0a --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/80/119980/1 diff --git a/composer.json b/composer.json index 0da9b9b..d4d215f 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ data-values/common: ~0.2.0, data-values/geo: ~0.1.0, data-values/number: ~0.3.0, - data-values/time: ~0.4.0, + data-values/time: ~0.5.0, data-values/validators: ~0.1.0, data-values/data-types: ~0.2.0, data-values/serialization: ~0.1.0, -- To view, visit https://gerrit.wikimedia.org/r/119980 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie75b3f91e5b9f5d8bf6834410425eaa7e75f2e0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add user preference for non-beta disabling - change (mediawiki...MultimediaViewer)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/119981 Change subject: Add user preference for non-beta disabling .. Add user preference for non-beta disabling Change-Id: I3f581975cfdf33bc15b8a4b23549c6401b4bfb87 (cherry picked from commit b0b1446f5b27021674a7ad6e97c03b9577093713) --- M MultimediaViewer.i18n.php M MultimediaViewerHooks.php 2 files changed, 25 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/81/119981/1 diff --git a/MultimediaViewer.i18n.php b/MultimediaViewer.i18n.php index 47744f4..eb88de6 100644 --- a/MultimediaViewer.i18n.php +++ b/MultimediaViewer.i18n.php @@ -30,6 +30,7 @@ 'multimediaviewer-desc-nil' = 'No description available.', 'multimediaviewer-pref' = 'Media Viewer', 'multimediaviewer-pref-desc' = 'Improve your multimedia viewing experience with this new tool. It displays images in larger size on pages that have thumbnails. Images are shown in a nicer fullscreen interface overlay, and can also be viewed in full-size.', + 'multimediaviewer-optin-pref' = 'Enable new media viewing experience', 'multimediaviewer-file-page' = 'Go to corresponding file page', 'multimediaviewer-repository' = 'Learn more on $1', 'multimediaviewer-repository-local' = 'Learn more', @@ -121,6 +122,7 @@ 'multimediaviewer-desc-nil' = 'Text to be used when no description is available.', 'multimediaviewer-pref' = 'Preference title', 'multimediaviewer-pref-desc' = 'Description of preference', + 'multimediaviewer-optin-pref' = 'Label for non-beta preference.', 'multimediaviewer-file-page' = 'Text for a link to the file page for an image.', 'multimediaviewer-repository' = 'Link to the repository where the image is hosted. Parameters: * $1 - the display name of that site diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php index 18e9657..34a234b 100644 --- a/MultimediaViewerHooks.php +++ b/MultimediaViewerHooks.php @@ -38,12 +38,18 @@ if ( $wgMediaViewerIsInBeta class_exists( 'BetaFeatures' ) ) { return BetaFeatures::isFeatureEnabled( $user, 'multimedia-viewer' ); - } else if ( $wgEnableMediaViewerForLoggedInUsersOnly ) { - return $user-isLoggedIn(); - } else { - // Default to enabling for everyone. - return true; } + + if ( $user-getOption( 'media-vewer-enable' ) ) { + if ( $wgEnableMediaViewerForLoggedInUsersOnly ) { + return $user-isLoggedIn(); + } else { + // Default to enabling for everyone. + return true; + } + } + + return false; } /** @@ -112,6 +118,18 @@ return true; } + // Adds a default-enabled preference to gate the feature on non-beta sites + public static function getPreferences( $user, $prefs ) { + $prefs['media-viewer-enable'] = array( + 'type' = 'toggle', + 'label-message' = 'multimediaviewer-optin-pref', + 'section' = 'rendering/files', + 'default' = true, + ); + + return true; + } + /** * Export variables used in both PHP and JS to keep DRY * @param array $vars -- To view, visit https://gerrit.wikimedia.org/r/119981 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f581975cfdf33bc15b8a4b23549c6401b4bfb87 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: MarkTraceur mtrac...@member.fsf.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tool Labs: remove 'tree' from exec_environ - change (operations/puppet)
coren has uploaded a new change for review. https://gerrit.wikimedia.org/r/119982 Change subject: Tool Labs: remove 'tree' from exec_environ .. Tool Labs: remove 'tree' from exec_environ That package was added to standard. Change-Id: I40bf780e6edd00278883e0da3b8add0c5f719b46 --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/82/119982/1 diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index 76b2dfd..0a4a683 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -246,7 +246,6 @@ 'ufraw-batch', # Bug 57008 'tabix', # Bug 61501 'texinfo', # Bug #56994 -'tree',# Bug #48862. 'zbar-tools', # Bug 56996 'zsh', # Bug 56995 ]: -- To view, visit https://gerrit.wikimedia.org/r/119982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40bf780e6edd00278883e0da3b8add0c5f719b46 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren mpellet...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tool Labs: remove 'tree' from exec_environ - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: Tool Labs: remove 'tree' from exec_environ .. Tool Labs: remove 'tree' from exec_environ That package was added to standard. Change-Id: I40bf780e6edd00278883e0da3b8add0c5f719b46 --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index 76b2dfd..0a4a683 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -246,7 +246,6 @@ 'ufraw-batch', # Bug 57008 'tabix', # Bug 61501 'texinfo', # Bug #56994 -'tree',# Bug #48862. 'zbar-tools', # Bug 56996 'zsh', # Bug 56995 ]: -- To view, visit https://gerrit.wikimedia.org/r/119982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40bf780e6edd00278883e0da3b8add0c5f719b46 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren mpellet...@wikimedia.org Gerrit-Reviewer: coren mpellet...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: puppetize jenkins-debian-glue - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/119983 Change subject: contint: puppetize jenkins-debian-glue .. contint: puppetize jenkins-debian-glue The Jenkins Debian Glue are a bunch of shell scripts that wraps around the Debian packaging toolchain making it trivial to generate packages in Jenkins. It needs cowbuilder and the debian build utilities provided by misc::package-builder. We only build packages on labs instance, so move package-builder from the generic contint packages to the list of packages that are only installed on labs. Change-Id: I834bd8988a34705e0558e56603f2e1248025718d TODO: clean up misc::package-builder from the production slaves. --- M modules/contint/manifests/packages.pp M modules/contint/manifests/packages/labs.pp 2 files changed, 18 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/83/119983/1 diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index f4d7f09..18ebeff 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -25,10 +25,7 @@ } # Get perl dependencies so we can lint the wikibugs perl script - include misc::irc::wikibugs::packages - -# Let us create packages from Jenkins jobs -include misc::package-builder +include misc::irc::wikibugs::packages # Lint authdns templates config include authdns::lint diff --git a/modules/contint/manifests/packages/labs.pp b/modules/contint/manifests/packages/labs.pp index 3902d5c..14ad037 100644 --- a/modules/contint/manifests/packages/labs.pp +++ b/modules/contint/manifests/packages/labs.pp @@ -8,6 +8,23 @@ include contint::packages +# Let us create packages from Jenkins jobs +include misc::package-builder + +# Shell script wrappers to ease package building +# Package generated via the mirror operations/debs/jenkins-debian-glue.git +packages { [ +'jenkins-debian-glue', +'jenkins-debian-glue-buildenv', +'jenkins-debian-glue-buildenv-git', +'jenkins-debian-glue-buildenv-lintian', +'jenkins-debian-glue-buildenv-piuparts', +'jenkins-debian-glue-buildenv-taptools', +]: +ensure = latest, +require = Class['misc::package-builder'], +} + package { [ 'npm', 'python-pip', -- To view, visit https://gerrit.wikimedia.org/r/119983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I834bd8988a34705e0558e56603f2e1248025718d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add zero.wikimedia.org - change (operations/dns)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/119984 Change subject: Add zero.wikimedia.org .. Add zero.wikimedia.org RT #6831 Change-Id: I87ee1322104fec861f65d2996a3013ebad1f8f33 --- M templates/wikimedia.org 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/84/119984/1 diff --git a/templates/wikimedia.org b/templates/wikimedia.org index b88338f..361b470 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -587,6 +587,7 @@ wikimania2014 1H IN CNAMEwikimedia-lb wikimaniateam 1H IN CNAMEwikimedia-lb www1H IN CNAMEwikimedia-lb +zero 1H IN CNAMEwikimedia-lb ; Other websites (NO wikis!) analytics 1H IN CNAMEstat1001 -- To view, visit https://gerrit.wikimedia.org/r/119984 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87ee1322104fec861f65d2996a3013ebad1f8f33 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add zerowiki - change (operations/apache-config)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/119985 Change subject: Add zerowiki .. Add zerowiki RT #6831 Change-Id: If57562ff309688ab08a2b4e9a81bdf95163176af --- M wikimedia.conf 1 file changed, 32 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/apache-config refs/changes/85/119985/1 diff --git a/wikimedia.conf b/wikimedia.conf index e851bd6..cd10e9e 100644 --- a/wikimedia.conf +++ b/wikimedia.conf @@ -220,6 +220,38 @@ /Directory /VirtualHost +# zerowiki RT #6831 +VirtualHost * +DocumentRoot /usr/local/apache/common/docroot/wikimedia.org +ServerName zero.wikimedia.org + +AllowEncodedSlashes On + +RewriteEngine On +RewriteCond %{HTTP:X-Forwarded-Proto} !https +RewriteRule ^/(.*)$ https://zero.wikimedia.org/$1 [R=301,L] + +# Primary wiki redirector: +Alias /wiki /usr/local/apache/common/docroot/wikimedia.org/w/index.php +RewriteRule ^/$ /w/index.php + +RewriteRule ^/math/(.*) http://upload.wikimedia.org/math/$1 [R=301] + +# Configurable favicon +RewriteRule ^/favicon\.ico$ /w/favicon.php [L] + +Directory /usr/local/apache/common/docroot/wikimedia.org/w +IfModule mod_php5.c +php_admin_flag engine on +/IfModule +/Directory +Directory /usr/local/apache/common/docroot/wikimedia.org/w/extensions +IfModule mod_php5.c +php_admin_flag engine off +/IfModule +/Directory +/VirtualHost + VirtualHost * ServerName wikimedia.org Redirect permanent / http://www.wikimedia.org/ -- To view, visit https://gerrit.wikimedia.org/r/119985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If57562ff309688ab08a2b4e9a81bdf95163176af Gerrit-PatchSet: 1 Gerrit-Project: operations/apache-config Gerrit-Branch: master Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add utility functions for scheduling - change (analytics/wikimetrics)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/119986 Change subject: Add utility functions for scheduling .. Add utility functions for scheduling Adds two utility functions that are useful for scheduled task implementation. * diff_datewise finds differences between lists of dates, and supports parsing those lists from lists of strings. * timestamps_to_now gives you an efficient datastructure that enumerates dates from some start to now, at some interval. Card: analytics 1378 Change-Id: I16245eacf86ba9d01de6e9f752fe1026ad504628 --- M tests/test_utils/test_one_off_functions.py M wikimetrics/utils.py 2 files changed, 106 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/86/119986/1 diff --git a/tests/test_utils/test_one_off_functions.py b/tests/test_utils/test_one_off_functions.py index 407d15c..bf1f488 100644 --- a/tests/test_utils/test_one_off_functions.py +++ b/tests/test_utils/test_one_off_functions.py @@ -1,5 +1,5 @@ # -*- coding:utf-8 -*- -import datetime +from datetime import datetime, timedelta, date import decimal from nose.tools import assert_true, assert_equal from unittest import TestCase @@ -11,6 +11,8 @@ link_to_user_page, parse_pretty_date, format_pretty_date, +diff_datewise, +timestamps_to_now, ) from wikimetrics.metrics import NamespaceEdits @@ -18,12 +20,12 @@ class UtilsTest(TestCase): def test_better_encoder_date(self): -result = stringify(date_not_date_time=datetime.date(2013, 06, 01)) +result = stringify(date_not_date_time=date(2013, 06, 01)) assert_true(result.find('date_not_date_time') = 0) assert_true(result.find('2013-06-01') = 0) def test_better_encoder_datetime(self): -result = stringify(date_time=datetime.datetime(2013, 06, 01, 02, 03, 04)) +result = stringify(date_time=datetime(2013, 06, 01, 02, 03, 04)) assert_true(result.find('date_time') = 0) assert_true(result.find('2013-06-01 02:03:04') = 0) @@ -88,5 +90,54 @@ assert_true(True) def test_parse_pretty_date(self): -date = datetime.datetime(2012, 2, 3, 4, 5) +date = datetime(2012, 2, 3, 4, 5) assert_equal(date, parse_pretty_date(format_pretty_date(date))) + + +class TestUtil(TestCase): +def test_diff_datewise(self): +l = [] +l_just_dates = [] +r = [] +r_just_dates = [] +lp = 'blah%Y...%m...%d...%Hblahblah' +rp = 'neenee%Y%m%d%Hneenee' + +expect0 = set([datetime(2012, 6, 14, 13), datetime(2012, 11, 9, 3)]) +expect1 = set([datetime(2012, 6, 14, 14), datetime(2013, 11, 10, 22)]) + +for y in range(2012, 2014): +for m in range(1, 13): +# we're just diffing so we don't care about getting all days +for d in range(1, 28): +for h in range(0, 24): +x = datetime(y, m, d, h) +if not x in expect1: +l.append(datetime.strftime(x, lp)) +l_just_dates.append(x) +if not x in expect0: +r.append(datetime.strftime(x, rp)) +r_just_dates.append(x) + +result = diff_datewise(l, r, left_parse=lp, right_parse=rp) +self.assertEqual(result[0], expect0) +self.assertEqual(result[1], expect1) + +result = diff_datewise(l_just_dates, r, right_parse=rp) +self.assertEqual(result[0], expect0) +self.assertEqual(result[1], expect1) + +result = diff_datewise(l_just_dates, r_just_dates) +self.assertEqual(result[0], expect0) +self.assertEqual(result[1], expect1) + +def test_timestamps_to_now(self): +now = datetime.now() +start = now - timedelta(hours=2) +expect = [ +start, +start + timedelta(hours=1), +start + timedelta(hours=2), +] +timestamps = timestamps_to_now(start, timedelta(hours=1)) +self.assertEqual(expect, list(timestamps)) diff --git a/wikimetrics/utils.py b/wikimetrics/utils.py index 9cadd5d..b8b5135 100644 --- a/wikimetrics/utils.py +++ b/wikimetrics/utils.py @@ -164,6 +164,57 @@ os.makedirs(full_path) +def diff_datewise(left, right, left_parse=None, right_parse=None): + +Parameters +left: a list of datetime strings or objects +right : a list of datetime strings or objects +left_parse : if left contains datetimes, None; else a strptime format +right_parse : if right contains datetimes, None; else a strptime format + +Returns +A tuple of two sets: +[0] : the datetime objects in left but not right +[1]
[MediaWiki-commits] [Gerrit] Make entityselector always trigger aftersetentity event - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/119988 Change subject: Make entityselector always trigger aftersetentity event .. Make entityselector always trigger aftersetentity event Without this, sometimes the entityselector happily selects something, but the expert is not informed and just saves a different value while showing you the right one in the input box. This change also makes the EntityIdInput not listen on entityselectorselect, which is a quite useless event because it happens before the entity actually is set. Bug: 62868 Change-Id: If62e8ea3fca1feb148532d1907e815e63cee771d --- M lib/resources/experts/EntityIdInput.js M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 2 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/88/119988/1 diff --git a/lib/resources/experts/EntityIdInput.js b/lib/resources/experts/EntityIdInput.js index 187f52e..8995dbc 100644 --- a/lib/resources/experts/EntityIdInput.js +++ b/lib/resources/experts/EntityIdInput.js @@ -63,7 +63,7 @@ } ) .on( - 'eachchange entityselectorselect entityselectoraftersetentity', + 'eachchange entityselectoraftersetentity', function( e ) { // Entity selector's value is actual value after change. self._actualValue = false; diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js index c843948..1248d9e 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js @@ -683,6 +683,7 @@ url: entity.url }; } + this._trigger( 'aftersetentity', 0, [ entity ? entity.id : null ] ); }, /** @@ -708,8 +709,6 @@ self._setEntity( entity ); self.element.val( label ); - - self._trigger( 'aftersetentity', 0, [ entity ? entity.id : null ] ); }; if ( entity === undefined ) { -- To view, visit https://gerrit.wikimedia.org/r/119988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If62e8ea3fca1feb148532d1907e815e63cee771d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add ugly test for bug 62868. - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/119989 Change subject: Add ugly test for bug 62868. .. Add ugly test for bug 62868. Change-Id: I840f38bdee4ab0f86bde8af986f782dcb66c9dc9 --- M tests/browser/features/statement.feature M tests/browser/features/step_definitions/entity_selector_steps.rb M tests/browser/features/step_definitions/statement_steps.rb M tests/browser/features/support/modules/entity_selector_module.rb M tests/browser/features/support/modules/statement_module.rb 5 files changed, 46 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/89/119989/1 diff --git a/tests/browser/features/statement.feature b/tests/browser/features/statement.feature index 02d66c3..cc48396 100644 --- a/tests/browser/features/statement.feature +++ b/tests/browser/features/statement.feature @@ -104,3 +104,17 @@ And Statement save button should be disabled And Entity selector input element should be there And Statement value input element should not be there + + @ui_only @repo_login + Scenario: Select a property, use entity selector +Given There are properties with the following handles and datatypes: + | itemprop | wikibase-item | +When I click the statement add button + And I select the property itemprop + And I press the q key in the second entity selector input field + And I press the ARROWDOWN key in the second entity selector input field + And I press the ARROWDOWN key in the second entity selector input field + And I press the ENTER key in the second entity selector input field + And I memorize the value of the second entity selector input field + And I press the ENTER key in the second entity selector input field +Then Statement item value of claim 1 in group 1 should be what I memorized diff --git a/tests/browser/features/step_definitions/entity_selector_steps.rb b/tests/browser/features/step_definitions/entity_selector_steps.rb index d187524..3c2a42d 100644 --- a/tests/browser/features/step_definitions/entity_selector_steps.rb +++ b/tests/browser/features/step_definitions/entity_selector_steps.rb @@ -6,8 +6,27 @@ # # tests for entity selector -When /^I press the ESC key in the entity selector input field$/ do - on(ItemPage).entity_selector_input_element.send_keys :escape +When(/^I press the (.+) key in the (.*)entity selector input field$/) do |key, second| + mapping = { + 'ENTER' = :return, + 'ARROWDOWN' = :arrow_down, + 'ESC' = :escape + } + if mapping[key] then key = mapping[key] end + if second == 'second ' then + on(ItemPage).entity_selector_input2_element.send_keys key + else + on(ItemPage).entity_selector_input_element.send_keys key + end + sleep 1 +end + +When(/^I memorize the value of the (.*)entity selector input field$/) do |second| + if second == 'second ' then + @memorized = on(ItemPage).entity_selector_input2_element.attribute_value(value) + else + @memorized = on(ItemPage).entity_selector_input_element.attribute_value(value) + end end Then /^Entity selector input element should be there$/ do diff --git a/tests/browser/features/step_definitions/statement_steps.rb b/tests/browser/features/step_definitions/statement_steps.rb index aaf397a..47b4c15 100644 --- a/tests/browser/features/step_definitions/statement_steps.rb +++ b/tests/browser/features/step_definitions/statement_steps.rb @@ -117,3 +117,8 @@ Then /^Statement string value of claim (.+) in group (.+) should be (.+)$/ do |claim_index, group_index, value| on(ItemPage).statement_string_value_element(group_index, claim_index).attribute_value(value).should == value end + +Then(/^Statement item value of claim (\d+) in group (\d+) should be what I memorized$/) do |claim_index, group_index| + print @memorized + on(ItemPage).statement_item_value_link(group_index, claim_index).text.should == @memorized +end diff --git a/tests/browser/features/support/modules/entity_selector_module.rb b/tests/browser/features/support/modules/entity_selector_module.rb index 770308d..e348012 100644 --- a/tests/browser/features/support/modules/entity_selector_module.rb +++ b/tests/browser/features/support/modules/entity_selector_module.rb @@ -13,8 +13,8 @@ a(:first_entity_selector_link, xpath: //ul[contains(@class, 'ui-entityselector-list')]/li/a) span(:first_entity_selector_label, xpath: //ul[contains(@class, 'ui-entityselector-list')]/li/a/span/span[contains(@class, 'ui-entityselector-label')]) span(:first_entity_selector_description, xpath: //ul[contains(@class,
[MediaWiki-commits] [Gerrit] contint: puppetize jenkins-debian-glue - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: contint: puppetize jenkins-debian-glue .. contint: puppetize jenkins-debian-glue The Jenkins Debian Glue are a bunch of shell scripts that wraps around the Debian packaging toolchain making it trivial to generate packages in Jenkins. It needs cowbuilder and the debian build utilities provided by misc::package-builder. We only build packages on labs instance, so move package-builder from the generic contint packages to the list of packages that are only installed on labs. TODO: clean up misc::package-builder from the production slaves. Change-Id: I834bd8988a34705e0558e56603f2e1248025718d --- M modules/contint/manifests/packages.pp M modules/contint/manifests/packages/labs.pp 2 files changed, 18 insertions(+), 4 deletions(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/contint/manifests/packages.pp b/modules/contint/manifests/packages.pp index f4d7f09..18ebeff 100644 --- a/modules/contint/manifests/packages.pp +++ b/modules/contint/manifests/packages.pp @@ -25,10 +25,7 @@ } # Get perl dependencies so we can lint the wikibugs perl script - include misc::irc::wikibugs::packages - -# Let us create packages from Jenkins jobs -include misc::package-builder +include misc::irc::wikibugs::packages # Lint authdns templates config include authdns::lint diff --git a/modules/contint/manifests/packages/labs.pp b/modules/contint/manifests/packages/labs.pp index 3902d5c..14ad037 100644 --- a/modules/contint/manifests/packages/labs.pp +++ b/modules/contint/manifests/packages/labs.pp @@ -8,6 +8,23 @@ include contint::packages +# Let us create packages from Jenkins jobs +include misc::package-builder + +# Shell script wrappers to ease package building +# Package generated via the mirror operations/debs/jenkins-debian-glue.git +packages { [ +'jenkins-debian-glue', +'jenkins-debian-glue-buildenv', +'jenkins-debian-glue-buildenv-git', +'jenkins-debian-glue-buildenv-lintian', +'jenkins-debian-glue-buildenv-piuparts', +'jenkins-debian-glue-buildenv-taptools', +]: +ensure = latest, +require = Class['misc::package-builder'], +} + package { [ 'npm', 'python-pip', -- To view, visit https://gerrit.wikimedia.org/r/119983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I834bd8988a34705e0558e56603f2e1248025718d Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: coren mpellet...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits