[MediaWiki-commits] [Gerrit] ListFiles: Call Skin::setRelevantUser() when applicable - change (mediawiki/core)

2016-03-13 Thread Rillke (Code Review)
Rillke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277188

Change subject: ListFiles: Call Skin::setRelevantUser() when applicable
..

ListFiles: Call Skin::setRelevantUser() when applicable

Also validate user name before calling `User::newFromName()`

Change-Id: I7481ab0fc1720e5e840f0d552934324f676c0241
---
M includes/specials/SpecialListfiles.php
1 file changed, 44 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/277188/1

diff --git a/includes/specials/SpecialListfiles.php 
b/includes/specials/SpecialListfiles.php
index 16471fe..e820021 100644
--- a/includes/specials/SpecialListfiles.php
+++ b/includes/specials/SpecialListfiles.php
@@ -48,6 +48,11 @@
$showAll
);
 
+   $user = $pager->getRelevantUser();
+   if ( !$this->including() ) {
+   $this->getSkin()->setRelevantUser( $user );
+   }
+
$out = $this->getOutput();
if ( $this->including() ) {
$out->addParserOutputContent( $pager->getBodyOutput() );
@@ -91,6 +96,11 @@
 
protected $mUserName = null;
 
+   /**
+* @property User  The relevant user
+*/
+   protected $mUser = null;
+
protected $mSearch = '';
 
protected $mIncluding = false;
@@ -108,20 +118,18 @@
 
if ( $userName !== null && $userName !== '' ) {
$nt = Title::newFromText( $userName, NS_USER );
-   $user = User::newFromName( $userName, false );
-   if ( !is_null( $nt ) ) {
+   if ( is_null( $nt ) ) {
+   $this->outputUserDoesNotExist( $userName );
+   } else {
$this->mUserName = $nt->getText();
+   $user = User::newFromName( $this->mUserName, 
false );
+   if ( $user ) {
+   $this->mUser = $user;
+   }
+   if ( !$user || ( $user->isAnon() && 
!User::isIP( $user->getName() ) ) ) {
+   $this->outputUserDoesNotExist( 
$userName );
+   }
}
-   if ( !$user || ( $user->isAnon() && !User::isIP( 
$user->getName() ) ) ) {
-   $this->getOutput()->wrapWikiMsg(
-   "\n$1\n",
-   [
-   'listfiles-userdoesnotexist',
-   wfEscapeWikiText( $userName ),
-   ]
-   );
-   }
-
}
 
if ( $search !== '' && !$this->getConfig()->get( 'MiserMode' ) 
) {
@@ -150,6 +158,30 @@
}
 
/**
+* Get the user relevant to the ImageList
+*
+* @return User|null
+*/
+   function getRelevantUser() {
+   return $this->mUser;
+   }
+
+   /**
+* Add a message to the output stating that the user doesn't exist
+*
+* @param string $userName Unescaped user name
+*/
+   protected function outputUserDoesNotExist( $userName ) {
+   $this->getOutput()->wrapWikiMsg(
+   "\n$1\n",
+   [
+   'listfiles-userdoesnotexist',
+   wfEscapeWikiText( $userName ),
+   ]
+   );
+   }
+
+   /**
 * Build the where clause of the query.
 *
 * Replaces the older mQueryConds member variable.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7481ab0fc1720e5e840f0d552934324f676c0241
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Rillke 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make old parserTests.php work again. - change (mediawiki/core)

2016-03-13 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277187

Change subject: Make old parserTests.php work again.
..

Make old parserTests.php work again.

I still use it locally as it seems a lot faster than phpunit.
Was throwing exceptions about calling methods that only unit tests
are supposed to use.

Change-Id: I5dcecee5cef06bb95fb61a448dd9f7a1a21c4ad8
---
M tests/parserTests.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/277187/1

diff --git a/tests/parserTests.php b/tests/parserTests.php
index 7e6f68c..3f05598 100644
--- a/tests/parserTests.php
+++ b/tests/parserTests.php
@@ -28,6 +28,8 @@
'record', 'run-disabled', 'run-parsoid' ];
 $optionsWithArgs = [ 'regex', 'filter', 'seed', 'setversion', 'file' ];
 
+define( 'MW_PHPUNIT_TEST', true );
+
 require_once __DIR__ . '/../maintenance/commandLine.inc';
 require_once __DIR__ . '/TestsAutoLoader.php';
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5dcecee5cef06bb95fb61a448dd9f7a1a21c4ad8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Revert "HHVM: Enable translation cache garbage-collection on... - change (operations/puppet)

2016-03-13 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277186

Change subject: Revert "HHVM: Enable translation cache garbage-collection on 
canary app servers"
..

Revert "HHVM: Enable translation cache garbage-collection on canary app servers"

This reverts commit bab71c4b1fbd6.
Crashes!

Change-Id: If79662aaa95fe93bfd7613274439b14f90120564
---
M hieradata/role/common/mediawiki/appserver/canary_api.yaml
M hieradata/role/common/mediawiki/canary_appserver.yaml
2 files changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/277186/1

diff --git a/hieradata/role/common/mediawiki/appserver/canary_api.yaml 
b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
index d11089d..f9682b5 100644
--- a/hieradata/role/common/mediawiki/appserver/canary_api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
@@ -7,7 +7,6 @@
   - perf-roots
 hhvm::extra::fcgi:
   hhvm:
-enable_reusable_tc: true
 mysql:
   connect_timeout: 3000
 stats:
diff --git a/hieradata/role/common/mediawiki/canary_appserver.yaml 
b/hieradata/role/common/mediawiki/canary_appserver.yaml
index 3e8cfbb..e33094b 100644
--- a/hieradata/role/common/mediawiki/canary_appserver.yaml
+++ b/hieradata/role/common/mediawiki/canary_appserver.yaml
@@ -7,7 +7,6 @@
   - perf-roots
 hhvm::extra::fcgi:
   hhvm:
-enable_reusable_tc: true
 mysql:
   connect_timeout: 3000
 stats:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If79662aaa95fe93bfd7613274439b14f90120564
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Revert "HHVM: Enable translation cache garbage-collection on... - change (operations/puppet)

2016-03-13 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Revert "HHVM: Enable translation cache garbage-collection on 
canary app servers"
..


Revert "HHVM: Enable translation cache garbage-collection on canary app servers"

This reverts commit bab71c4b1fbd6.
Crashes!

Change-Id: If79662aaa95fe93bfd7613274439b14f90120564
---
M hieradata/role/common/mediawiki/appserver/canary_api.yaml
M hieradata/role/common/mediawiki/canary_appserver.yaml
2 files changed, 0 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/hieradata/role/common/mediawiki/appserver/canary_api.yaml 
b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
index d11089d..f9682b5 100644
--- a/hieradata/role/common/mediawiki/appserver/canary_api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
@@ -7,7 +7,6 @@
   - perf-roots
 hhvm::extra::fcgi:
   hhvm:
-enable_reusable_tc: true
 mysql:
   connect_timeout: 3000
 stats:
diff --git a/hieradata/role/common/mediawiki/canary_appserver.yaml 
b/hieradata/role/common/mediawiki/canary_appserver.yaml
index 3e8cfbb..e33094b 100644
--- a/hieradata/role/common/mediawiki/canary_appserver.yaml
+++ b/hieradata/role/common/mediawiki/canary_appserver.yaml
@@ -7,7 +7,6 @@
   - perf-roots
 hhvm::extra::fcgi:
   hhvm:
-enable_reusable_tc: true
 mysql:
   connect_timeout: 3000
 stats:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If79662aaa95fe93bfd7613274439b14f90120564
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] HHVM: Enable translation cache garbage-collection on canary ... - change (operations/puppet)

2016-03-13 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: HHVM: Enable translation cache garbage-collection on canary app 
servers
..


HHVM: Enable translation cache garbage-collection on canary app servers

Set 'hhvm.enable_reusable_tc = true' on canary app servers. When this setting
is enabled, HHVM re-claims memory in the translation cache by evicting dead
translations.

Bug: T277061
Change-Id: I4fa27794bb839ef25dfdac0b89062017ef31e35b
---
M hieradata/role/common/mediawiki/appserver/canary_api.yaml
M hieradata/role/common/mediawiki/canary_appserver.yaml
2 files changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/hieradata/role/common/mediawiki/appserver/canary_api.yaml 
b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
index f9682b5..d11089d 100644
--- a/hieradata/role/common/mediawiki/appserver/canary_api.yaml
+++ b/hieradata/role/common/mediawiki/appserver/canary_api.yaml
@@ -7,6 +7,7 @@
   - perf-roots
 hhvm::extra::fcgi:
   hhvm:
+enable_reusable_tc: true
 mysql:
   connect_timeout: 3000
 stats:
diff --git a/hieradata/role/common/mediawiki/canary_appserver.yaml 
b/hieradata/role/common/mediawiki/canary_appserver.yaml
index e33094b..3e8cfbb 100644
--- a/hieradata/role/common/mediawiki/canary_appserver.yaml
+++ b/hieradata/role/common/mediawiki/canary_appserver.yaml
@@ -7,6 +7,7 @@
   - perf-roots
 hhvm::extra::fcgi:
   hhvm:
+enable_reusable_tc: true
 mysql:
   connect_timeout: 3000
 stats:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4fa27794bb839ef25dfdac0b89062017ef31e35b
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Cast label to string before check if it is empty - change (oojs/ui)

2016-03-13 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277185

Change subject: Cast label to string before check if it is empty
..

Cast label to string before check if it is empty

An object casts to boolean true, no matter if the string content is
empty or not. That means, that a check for a non-empty label on an
OOUI\HtmlSnippet element will always be true, even if the content
of the label is empty. This reults in the addition of the labelElement
class (oo-ui-labelElement) even if the label is empty, which is
a different behaviour as in the JavaScript implementation.

This change changes the php implementation of the LabelElement mixin
to match the JS one by casting the label element to a string, so the
"is empty" check is always made on a string and returns the correct
and expected result.

Bug: T129822
Change-Id: I876a1eda3c793a1b100a372dae0b01e764569dfe
---
M php/mixins/LabelElement.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/85/277185/1

diff --git a/php/mixins/LabelElement.php b/php/mixins/LabelElement.php
index 4affb5f..2bd4394 100644
--- a/php/mixins/LabelElement.php
+++ b/php/mixins/LabelElement.php
@@ -54,7 +54,7 @@
}
}
 
-   $this->element->toggleClasses( [ 'oo-ui-labelElement' ], 
!!$this->label );
+   $this->element->toggleClasses( [ 'oo-ui-labelElement' ], 
!!(string)$this->label );
 
return $this;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I876a1eda3c793a1b100a372dae0b01e764569dfe
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Ensure table cells are ce=true before computing offsets - change (VisualEditor/VisualEditor)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Ensure table cells are ce=true before computing offsets
..


Ensure table cells are ce=true before computing offsets

Firefox won't return an offset inside ce=false, and thus
breaks double-click to edit.

Bug: T128282
Change-Id: I0a4056a8daa9f41a35f98161118e4b352af27ba4
(cherry picked from commit a4707b1271dfb8d514ae9af97c5759450414bc18)
# Last 5 commit messages
# --
# 546c9dc Creating new wmf/1.27.0-wmf.16 branch [Mukunda Modell]
# 5d4881e Merge "build: Bump various devDependencies to latest" [jenkins-bot]
# d4e5f46 Merge "LinkAnnotationWidget: Implement createInputWidget's documented 
config parameter" [jenkins-bot]
# 494af65 Merge "ve.ui.CommentInspector: Simplify autoresizing" [jenkins-bot]
# 7c48393 ve.ui.CommentInspector: Simplify autoresizing [Bartosz Dziewoński]
---
M src/ce/nodes/ve.ce.TableNode.js
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/src/ce/nodes/ve.ce.TableNode.js b/src/ce/nodes/ve.ce.TableNode.js
index 437103e..e1d1a21 100644
--- a/src/ce/nodes/ve.ce.TableNode.js
+++ b/src/ce/nodes/ve.ce.TableNode.js
@@ -104,10 +104,12 @@
return;
}
if ( this.surface.getModel().getSelection() instanceof 
ve.dm.TableSelection ) {
+   // Don't change selection in setEditing to avoid scrolling to 
bottom of cell
+   this.setEditing( true, true );
+   // getOffsetFromEventCoords doesn't work in ce=false in 
Firefox, so ensure
+   // this is called after setEditing( true ).
offset = this.surface.getOffsetFromEventCoords( e.originalEvent 
);
if ( offset !== -1 ) {
-   // Don't change selection in setEditing to avoid 
scrolling to bottom of cell
-   this.setEditing( true, true );
// Set selection to where the double click happened
this.surface.getModel().setLinearSelection( new 
ve.Range( offset ) );
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a4056a8daa9f41a35f98161118e4b352af27ba4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.27.0-wmf.16
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3a1f6a3..0cdf439 - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 3a1f6a3..0cdf439
..


Syncronize VisualEditor: 3a1f6a3..0cdf439

Change-Id: I74637d659a2c274821c7cc7328e3835ed1396c59
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 3a1f6a3..0cdf439 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 3a1f6a34c8acb99600d45147afd2ff5a32d496f9
+Subproject commit 0cdf4393edd15662b732145bfd54c038a57d9185

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I74637d659a2c274821c7cc7328e3835ed1396c59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update VE core submodule to wmf/1.27.0-wmf.16 HEAD (5019e21) - change (mediawiki...VisualEditor)

2016-03-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277183

Change subject: Update VE core submodule to wmf/1.27.0-wmf.16 HEAD (5019e21)
..

Update VE core submodule to wmf/1.27.0-wmf.16 HEAD (5019e21)

New changes:
5019e21 Ensure table cells are ce=true before computing offsets

Change-Id: I9ca7be558f9a8cff86275ed91993f435c9c04185
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/83/277183/1

diff --git a/lib/ve b/lib/ve
index 546c9dc..5019e21 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 546c9dc6cb20afe0fc24e9e5a2d0a083fc1fe154
+Subproject commit 5019e2182be9104af7725660a621c9a4e477cb1d

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ca7be558f9a8cff86275ed91993f435c9c04185
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.27.0-wmf.16
Gerrit-Owner: Jforrester 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3a1f6a3..0cdf439 - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277184

Change subject: Syncronize VisualEditor: 3a1f6a3..0cdf439
..

Syncronize VisualEditor: 3a1f6a3..0cdf439

Change-Id: I74637d659a2c274821c7cc7328e3835ed1396c59
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/84/277184/1

diff --git a/VisualEditor b/VisualEditor
index 3a1f6a3..0cdf439 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 3a1f6a34c8acb99600d45147afd2ff5a32d496f9
+Subproject commit 0cdf4393edd15662b732145bfd54c038a57d9185

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I74637d659a2c274821c7cc7328e3835ed1396c59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Prefer error *code* when logging unknown errors - change (mediawiki...VisualEditor)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prefer error *code* when logging unknown errors
..


Prefer error *code* when logging unknown errors

See also I4a5bac24

Change-Id: I62fda9dadd24704f5930b30a2f8ad4d4a9e729cb
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
1 file changed, 4 insertions(+), 7 deletions(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index a2ad144..40a3889 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -665,17 +665,14 @@
  * @fires saveErrorUnknown
  */
 ve.init.mw.ArticleTarget.prototype.saveErrorUnknown = function ( editApi, data 
) {
-   var errorMsg = ( editApi && editApi.info ) ||
-   ( data && data.error && data.error.info ) ||
-   ( editApi && editApi.code ) ||
-   ( data && data.error && data.error.code ) ||
-   'Unknown error';
+   var errorMsg = ( editApi && editApi.info ) || ( data && data.error && 
data.error.info ),
+   errorCode = ( editApi && editApi.code ) || ( data && data.error 
&& data.error.code );
 
this.showSaveError(
-   $( document.createTextNode( errorMsg ) ),
+   $( document.createTextNode( errorMsg || errorCode || 'Unknown 
error' ) ),
false // prevents reapply
);
-   this.emit( 'saveErrorUnknown', errorMsg );
+   this.emit( 'saveErrorUnknown', errorCode || errorMsg || 'Unknown error' 
);
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62fda9dadd24704f5930b30a2f8ad4d4a9e729cb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 0042478..3a1f6a3 - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 0042478..3a1f6a3
..


Syncronize VisualEditor: 0042478..3a1f6a3

Change-Id: I858dbc1b32f7042923f298c15e4d0f72ae336f63
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 0042478..3a1f6a3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 004247822dba81469afddcbb9971cf3519c1c37b
+Subproject commit 3a1f6a34c8acb99600d45147afd2ff5a32d496f9

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I858dbc1b32f7042923f298c15e4d0f72ae336f63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 0042478..3a1f6a3 - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277182

Change subject: Syncronize VisualEditor: 0042478..3a1f6a3
..

Syncronize VisualEditor: 0042478..3a1f6a3

Change-Id: I858dbc1b32f7042923f298c15e4d0f72ae336f63
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/82/277182/1

diff --git a/VisualEditor b/VisualEditor
index 0042478..3a1f6a3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 004247822dba81469afddcbb9971cf3519c1c37b
+Subproject commit 3a1f6a34c8acb99600d45147afd2ff5a32d496f9

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I858dbc1b32f7042923f298c15e4d0f72ae336f63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Log readonly code for readonly errors - change (mediawiki...VisualEditor)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Log readonly code for readonly errors
..


Log readonly code for readonly errors

I thought I did this yesterday

Change-Id: Icd2cf8fdf4263cab335a2ddfa53ab0585153dfb4
---
M modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js
index 7cd65fe..182a18f 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js
@@ -31,7 +31,7 @@
saveErrorPageDeleted: [ 'trackSaveError', 'pagedeleted' ],
saveErrorTitleBlacklist: [ 'trackSaveError', 'titleblacklist' ],
saveErrorCaptcha: [ 'trackSaveError', 'captcha' ],
-   saveErrorReadOnly: [ 'trackSaveError', 'unknown' ],
+   saveErrorReadOnly: [ 'trackSaveError', 'unknown', 'readonly' ],
saveErrorUnknown: [ 'trackSaveError', 'unknown' ],
editConflict: [ 'trackSaveError', 'editconflict' ],
surfaceReady: 'onSurfaceReady',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd2cf8fdf4263cab335a2ddfa53ab0585153dfb4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Ensure table cells are ce=true before computing offsets - change (VisualEditor/VisualEditor)

2016-03-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277181

Change subject: Ensure table cells are ce=true before computing offsets
..

Ensure table cells are ce=true before computing offsets

Firefox won't return an offset inside ce=false, and thus
breaks double-click to edit.

Bug: T128282
Change-Id: I0a4056a8daa9f41a35f98161118e4b352af27ba4
(cherry picked from commit a4707b1271dfb8d514ae9af97c5759450414bc18)
# Last 5 commit messages
# --
# 546c9dc Creating new wmf/1.27.0-wmf.16 branch [Mukunda Modell]
# 5d4881e Merge "build: Bump various devDependencies to latest" [jenkins-bot]
# d4e5f46 Merge "LinkAnnotationWidget: Implement createInputWidget's documented 
config parameter" [jenkins-bot]
# 494af65 Merge "ve.ui.CommentInspector: Simplify autoresizing" [jenkins-bot]
# 7c48393 ve.ui.CommentInspector: Simplify autoresizing [Bartosz Dziewoński]
---
M src/ce/nodes/ve.ce.TableNode.js
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/81/277181/1

diff --git a/src/ce/nodes/ve.ce.TableNode.js b/src/ce/nodes/ve.ce.TableNode.js
index 437103e..e1d1a21 100644
--- a/src/ce/nodes/ve.ce.TableNode.js
+++ b/src/ce/nodes/ve.ce.TableNode.js
@@ -104,10 +104,12 @@
return;
}
if ( this.surface.getModel().getSelection() instanceof 
ve.dm.TableSelection ) {
+   // Don't change selection in setEditing to avoid scrolling to 
bottom of cell
+   this.setEditing( true, true );
+   // getOffsetFromEventCoords doesn't work in ce=false in 
Firefox, so ensure
+   // this is called after setEditing( true ).
offset = this.surface.getOffsetFromEventCoords( e.originalEvent 
);
if ( offset !== -1 ) {
-   // Don't change selection in setEditing to avoid 
scrolling to bottom of cell
-   this.setEditing( true, true );
// Set selection to where the double click happened
this.surface.getModel().setLinearSelection( new 
ve.Range( offset ) );
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a4056a8daa9f41a35f98161118e4b352af27ba4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: wmf/1.27.0-wmf.16
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Esanders 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (c1e1bd7) - change (mediawiki...VisualEditor)

2016-03-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277180

Change subject: Update VE core submodule to master (c1e1bd7)
..

Update VE core submodule to master (c1e1bd7)

New changes:
a4707b1 Ensure table cells are ce=true before computing offsets
c1e1bd7 Localisation updates from https://translatewiki.net.

Change-Id: I8b3d9dacc213c9be9548f7e112dd3e786451152a
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/80/277180/1

diff --git a/lib/ve b/lib/ve
index 5f451d2..c1e1bd7 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 5f451d2718fb104863972192e0bd4a86b92b126f
+Subproject commit c1e1bd7bca9f9b94a71eb82edd074c41c6268d28

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b3d9dacc213c9be9548f7e112dd3e786451152a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Apply setting variable instead of direct warning value - change (mediawiki...SemanticForms)

2016-03-13 Thread Billm (Code Review)
Billm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277179

Change subject: Apply setting variable instead of direct warning value
..

Apply setting variable instead of direct warning value

This commit applies the fix me comment in the conditional by turning the direct
constant value into a setting and also turn another elseif conditional into an
else for better clarity

Bug:T89682
Bug:T128827
Change-Id: Ia8c00ae6f84290987d71ef513f09a9d91a71b474
---
M includes/SF_AutoeditAPI.php
M specials/SF_FormEdit.php
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms 
refs/changes/79/277179/1

diff --git a/includes/SF_AutoeditAPI.php b/includes/SF_AutoeditAPI.php
index 71cac7c..fc3dd90 100644
--- a/includes/SF_AutoeditAPI.php
+++ b/includes/SF_AutoeditAPI.php
@@ -38,7 +38,7 @@
 * Error level used for debug messages.
 */
const DEBUG = 3;
-
+   public $const_warn = 'WARNING';
private $mOptions = array( );
private $mAction;
private $mStatus;
diff --git a/specials/SF_FormEdit.php b/specials/SF_FormEdit.php
index c1e2467..ec1757f 100644
--- a/specials/SF_FormEdit.php
+++ b/specials/SF_FormEdit.php
@@ -105,8 +105,8 @@
if ( array_key_exists( 'errors', $resultData ) ) {
 
foreach ($resultData['errors'] as $error) {
-   // FIXME: This should probably not be 
hard-coded to WARNING but put into a setting
-   if ( $error[ 'level' ] <= 
SFAutoeditAPI::WARNING ) {
+   
+   if ( $error[ 'level' ] <= 
constant($const_warn) ) {
$text .= Html::rawElement( 'p', 
array( 'class' => 'error' ), $error[ 'message' ] ) . "\n";
}
}
@@ -147,7 +147,7 @@
// "Creating ..." and "Create ...", respectively.
// Does this make any difference? Who knows.
$pageTitle = wfMessage( 'creating', $targetName 
)->text();
-   } elseif ( $result[ 'form' ] == '' ) {  //FIXME: This looks 
weird; a simple else should be enough, right?
+   } else {
// display error message if the form is not specified 
in the URL
$pageTitle = wfMessage( 'formedit' )->text();
$text .= Html::element( 'p', array( 'class' => 'error' 
), wfMessage( 'sf_formedit_badurl' )->text() ) . "\n";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8c00ae6f84290987d71ef513f09a9d91a71b474
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Billm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Extract duplicated code into its own method - change (mediawiki...CheckUser)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Extract duplicated code into its own method
..


Extract duplicated code into its own method

Also fix issue of hardcoded parentheses.

Change-Id: I4b7723635dbc311d494f1c41c651127468fc34fe
---
M specials/SpecialCheckUser.php
1 file changed, 37 insertions(+), 30 deletions(-)

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



diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php
index dbebb26..978bdbc 100644
--- a/specials/SpecialCheckUser.php
+++ b/specials/SpecialCheckUser.php
@@ -527,13 +527,7 @@
$this->msg( 'blocklink' 
)->escaped()
)
)->escaped();
-   if ( $ips_first[$ip] == $ips_last[$ip] ) {
-   $s .= ' (' . 
$this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $ips_first[$ip] ), true 
) . ') ';
-   } else {
-   $lang = $this->getLanguage();
-   $s .= ' (' . $lang->timeanddate( 
wfTimestamp( TS_MW, $ips_first[$ip] ), true ) .
-   ' -- ' . $lang->timeanddate( 
wfTimestamp( TS_MW, $ips_last[$ip] ), true ) . ') ';
-   }
+   $s .= ' ' . $this->getTimeRangeString( 
$ips_first[$ip], $ips_last[$ip] ) . ' ';
$s .= ' [' . $edits . ']';
 
// If we get some results, it helps to know if 
the IP in general
@@ -696,13 +690,7 @@
'checktype' => 'subipusers'
)
);
-   if ( $row->first == $row->last ) {
-   $s .= ' (' . 
$this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $row->first ), true ) . 
') ';
-   } else {
-   $lang = $this->getLanguage();
-   $s .= ' (' . $lang->timeanddate( 
wfTimestamp( TS_MW, $row->first ), true ) .
-   ' -- ' . $lang->timeanddate( 
wfTimestamp( TS_MW, $row->last ), true ) . ') ';
-   }
+   $s .= ' ' . $this->getTimeRangeString( 
$row->first, $row->last ) . ' ';
$s .= ' [' . $row->count . 
"]\n";
++$counter;
}
@@ -996,13 +984,7 @@
'checktype' => 'subipusers'
)
);
-   if ( $row->first == $row->last ) {
-   $s .= ' (' . 
$this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $row->first ), true ) . 
') ';
-   } else {
-   $lang = $this->getLanguage();
-   $s .= ' (' . $lang->timeanddate( 
wfTimestamp( TS_MW, $row->first ), true ) .
-   ' -- ' . $lang->timeanddate( 
wfTimestamp( TS_MW, $row->last ), true ) . ') ';
-   }
+   $s .= ' ' . $this->getTimeRangeString( 
$row->first, $row->last ) . ' ';
// @todo FIXME: Hard coded brackets.
$s .= ' [' . $row->count . 
"]\n";
++$counter;
@@ -1084,15 +1066,7 @@
)
)->escaped();
// Show edit time range
-   if ( $users_first[$name] == $users_last[$name] 
) {
-   // @todo FIXME: Hard coded parentheses.
-   $s .= ' (' . 
$this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $users_first[$name] ), 
true ) . ') ';
-   } else {
-   // @todo FIXME: Hard coded parentheses.
-   $lang = $this->getLanguage();
-   $s .= ' (' . $lang->timeanddate( 
wfTimestamp( TS_MW, $users_first[$name] ), true ) .
-   ' -- ' . $lang->timeanddate( 
wfTimestamp( TS_MW, $users_last[$name] ), true ) . ') ';
-   }
+   $s .= ' ' . $this->getTimeRangeString( 
$users_first[$name], $users_last[$name] ) . ' ';
// Total edit count
// 

[MediaWiki-commits] [Gerrit] SpecialCheckUser: Minor code cleanup - change (mediawiki...CheckUser)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: SpecialCheckUser: Minor code cleanup
..


SpecialCheckUser: Minor code cleanup

Various code issues which I noticed have been fixed and other
minor improvements to match current coding conventions.

Change-Id: Ib95ee20e6aa138660ec7c783263f5df962b94fb8
---
M specials/SpecialCheckUser.php
1 file changed, 88 insertions(+), 61 deletions(-)

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



diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php
index fd83366..dbebb26 100644
--- a/specials/SpecialCheckUser.php
+++ b/specials/SpecialCheckUser.php
@@ -1,6 +1,10 @@
  $disableEmail,
);
 
+   $ip = $name = $xff = '';
$m = array();
-   // An IPv4? An IPv6? CIDR included?
if ( IP::isIPAddress( $user ) ) {
+   // A single IP address or an IP range
$ip = IP::sanitizeIP( $user );
-   $name = '';
-   $xff = '';
-   // An IPv4/IPv6 XFF string? CIDR included?
} elseif ( preg_match( '/^(.+)\/xff$/', $user, $m ) && 
IP::isIPAddress( $m[1] ) ) {
-   $ip = '';
-   $name = '';
+   // A single IP address or range with XFF string included
$xff = IP::sanitizeIP( $m[1] );
-   // A user?
} else {
-   $ip = '';
+   // A user?
$name = $user;
-   $xff = '';
}
 
$this->showForm( $user, $reason, $checktype, $ip, $xff, $name, 
$period );
@@ -96,8 +95,9 @@
 * they are called often, we call them once and save them in 
$this->message
 */
protected function preCacheMessages() {
-   if ( !isset( $this->message ) ) {
-   foreach ( array( 'diff', 'hist', 'minoreditletter', 
'newpageletter', 'blocklink', 'log' ) as $msg ) {
+   if ( $this->message === null ) {
+   $msgKeys = array( 'diff', 'hist', 'minoreditletter', 
'newpageletter', 'blocklink', 'log' );
+   foreach ( $msgKeys as $msg ) {
$this->message[$msg] = $this->msg( $msg 
)->escaped();
}
}
@@ -191,7 +191,10 @@
 */
protected function getPeriodMenu( $selected = null ) {
$s = '' . $this->msg( 'checkuser-period' 
)->escaped() . '';
-   $s .= Xml::openElement( 'select', array( 'name' => 'period', 
'id' => 'period', 'style' => 'margin-top:.2em;' ) );
+   $s .= Xml::openElement(
+   'select',
+   array( 'name' => 'period', 'id' => 'period', 'style' => 
'margin-top:.2em;' )
+   );
$s .= Xml::option( $this->msg( 'checkuser-week-1' )->text(), 7, 
$selected === 7 );
$s .= Xml::option( $this->msg( 'checkuser-week-2' )->text(), 
14, $selected === 14 );
$s .= Xml::option( $this->msg( 'checkuser-month' )->text(), 31, 
$selected === 31 );
@@ -251,7 +254,7 @@
 * @param array $blockParams
 * @return string
 */
-   protected static function userBlockLogFlags( $anonOnly, $blockParams ) {
+   protected static function userBlockLogFlags( $anonOnly, array 
$blockParams ) {
global $wgBlockAllowsUTEdit;
$flags = array();
 
@@ -281,7 +284,8 @@
 * @param string $talkTag replaces user talk pages
 * @return string[] List of html-safe usernames which were actually 
were blocked
 */
-   public static function doMassUserBlockInternal( $users, $blockParams, 
$tag = '', $talkTag = '' ) {
+   public static function doMassUserBlockInternal( $users, array 
$blockParams,
+   $tag = '', $talkTag = '' ) {
global $wgBlockAllowsUTEdit, $wgUser;
 
$blockSize = 0;
@@ -294,26 +298,29 @@
$blockSize = 0;
wfWaitForSlaves( 5 );
}
+
$u = User::newFromName( $name, false );
-   // If user doesn't exist, it ought to be an IP then
-   if ( is_null( $u ) || ( !$u->getId() && 
!IP::isIPAddress( $u->getName() ) ) ) {
+   // Do some checks to make sure we can block this user 
first
+   if ( $u === null ) {
+   // Invalid user
+   continue;
+   }
+   $isIP = IP::isIPAddress( $u->getName() );
+   if ( !$u->getId() && !$isIP ) {
+   // Not a registered user or an 

[MediaWiki-commits] [Gerrit] SpecialCheckUser: Use Linker instead of tags directly - change (mediawiki...CheckUser)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: SpecialCheckUser: Use Linker instead of  tags directly
..


SpecialCheckUser: Use Linker instead of  tags directly

Also
* Removed unused $logs variable
* Make target param of Special:Block link work
* Use 'parentheses' message instead of hardcoded "()"

Change-Id: Ib98fc84b928bf643651509b9cf4fc15bd54c8341
---
M specials/SpecialCheckUser.php
1 file changed, 48 insertions(+), 30 deletions(-)

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



diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php
index f7dbaa8..fd83366 100644
--- a/specials/SpecialCheckUser.php
+++ b/specials/SpecialCheckUser.php
@@ -476,7 +476,6 @@
if ( !$dbr->numRows( $ret ) ) {
$s = $this->noMatchesMessage( $user ) . "\n";
} else {
-   $blockip = SpecialPage::getTitleFor( 'Block' );
$ips_edits = array();
$counter = 0;
foreach ( $ret as $row ) {
@@ -495,18 +494,21 @@
set_time_limit( 60 );
wfRestoreWarnings();
 
-   $logs = SpecialPage::getTitleFor( 'Log' );
$s = '';
foreach ( $ips_edits as $ip => $edits ) {
$s .= '';
-   $s .= '' .
-   htmlspecialchars( $ip ) . '';
-   $s .= ' (' .
-   $this->msg( 'blocklink' )->escaped() . 
')';
+   'reason' => $reason,
+   )
+   );
+   $s .= ' ' . $this->msg( 'parentheses' 
)->rawParams(
+   Linker::linkKnown(
+   
SpecialPage::getTitleFor( 'Block', $ip ),
+   $this->msg( 'blocklink' 
)->escaped()
+   )
+   )->escaped();
if ( $ips_first[$ip] == $ips_last[$ip] ) {
$s .= ' (' . 
$this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $ips_first[$ip] ), true 
) . ') ';
} else {
@@ -664,13 +666,14 @@
} else {
$ip = long2ip( Wikimedia\base_convert( 
$row->cuc_ip_hex, 16, 10, 8 ) );
}
-   $s .= '' . $ip . '';
+   )
+   );
if ( $row->first == $row->last ) {
$s .= ' (' . 
$this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $row->first ), true ) . 
') ';
} else {
@@ -964,13 +967,14 @@
} else {
$ip = long2ip( Wikimedia\base_convert( 
$row->cuc_ip_hex, 16, 10, 8 ) );
}
-   $s .= '' . $ip . '';
+   )
+   );
if ( $row->first == $row->last ) {
$s .= ' (' . 
$this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $row->first ), true ) . 
') ';
} else {
@@ -1049,10 +1053,15 @@
// Add user tool links
$s .= Linker::userLink( - 1 , $name ) . 
Linker::userToolLinks( - 1 , $name );
// Add CheckUser link
-   $s .= ' (' . $this->msg( 
'checkuser-check' )->escaped() . ')';
+   $s .= ' ' . $this->msg( 'parentheses' 
)->rawParams(
+   $this->getSelfLink(
+   $this->msg( 'checkuser-check' 
)->text(),
+   array(
+   'user' => $name,
+   'reason' => $reason
+   )
+   )
+   )->escaped();
// Show edit time range
if ( $users_first[$name] == $users_last[$name] 
) {
// @todo FIXME: Hard coded parentheses.
@@ -1085,9 +1094,7 @@
$set = $users_infosets[$name][$i];
  

[MediaWiki-commits] [Gerrit] Allow custom data type URIs in RDF - change (mediawiki...Wikibase)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow custom data type URIs in RDF
..


Allow custom data type URIs in RDF

Bug: T126355
Change-Id: I7599e7fa5391f95e4b4eb57ce06a3677c38c77a5
---
M docs/datatypes.wiki
M lib/includes/DataTypeDefinitions.php
M lib/tests/phpunit/DataTypeDefinitionsTest.php
M repo/includes/Rdf/RdfBuilder.php
M repo/includes/Rdf/RdfVocabulary.php
M repo/includes/WikibaseRepo.php
M repo/tests/phpunit/includes/Rdf/RdfVocabularyTest.php
7 files changed, 99 insertions(+), 10 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  Smalyshev: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/docs/datatypes.wiki b/docs/datatypes.wiki
index 05064e8..f08c8a1 100644
--- a/docs/datatypes.wiki
+++ b/docs/datatypes.wiki
@@ -38,6 +38,7 @@
 
 Each key is associated with a map that provides the following fields:
 * value-type (repo and client): the value type to use for this data type (not 
used for value type keys).
+* rdf-uri (repo only): the URI to use in RDF to identify the data type. It is 
good practice to use a URI that will resolve to an RDF document that contains 
an OWL description of the data type, defining it to be of rdf:type 
wikibase:PropertyType, and providing a rdfs:label and a rdfs:comment describing 
the type. If no URI is defined explicitly, a URI will be composed using the 
base URI of the Wikibase ontology, and adding a CamelCase version of the 
datatype ID (so that "foo-bar" would become "FooBar").
 * validator-factory-callback (repo only): a callable that acts as a factory 
for the list of validators that should be used to check any user supplied 
values of the given data type. The callable will be called without any 
arguments, and must return a list of ValueValidator objects.
 * parser-factory-callback (repo only): a callable that acts as a factory for a 
ValueParser for this data type.
 * formatter-factory-callback (repo and client): a callable that acts as a 
factory for ValueFormatters for use with this data type.
diff --git a/lib/includes/DataTypeDefinitions.php 
b/lib/includes/DataTypeDefinitions.php
index efa04e5..e52a19e 100644
--- a/lib/includes/DataTypeDefinitions.php
+++ b/lib/includes/DataTypeDefinitions.php
@@ -223,6 +223,19 @@
}
 
/**
+* @return string[] An associative array mapping some property data 
types to types URIs for
+* use in RDF. This does not have to cover all known property 
data types. For those
+* that od not explicitly define a URI, RdfVocabulary will 
generate one.
+* Note that property data type URIs are not intended to be 
used as RDF literal types.
+*/
+   public function getRdfTypeUris() {
+   return $this->getFilteredByPrefix(
+   $this->getMapForDefinitionField( 'rdf-uri' ),
+   'PT:'
+   );
+   }
+
+   /**
 * @see BuilderBasedDataTypeValidatorFactory
 *
 * @param string $mode PREFIXED_MODE to request a callback map with 
"VT:" and "PT:" prefixes
diff --git a/lib/tests/phpunit/DataTypeDefinitionsTest.php 
b/lib/tests/phpunit/DataTypeDefinitionsTest.php
index 592ed6f..1435ff8 100644
--- a/lib/tests/phpunit/DataTypeDefinitionsTest.php
+++ b/lib/tests/phpunit/DataTypeDefinitionsTest.php
@@ -26,6 +26,7 @@
),
'PT:foo' => array(
'value-type' => 'FOO',
+   'rdf-uri' => 'http://acme.test/vocab/Foo',
'validator-factory-callback' => 
'DataTypeDefinitionsTest::getFooValidators',
'parser-factory-callback' => 
'DataTypeDefinitionsTest::getFooParser',
'snak-formatter-factory-callback' => 
'DataTypeDefinitionsTest::getFooSnakFormatter',
@@ -51,6 +52,11 @@
$this->assertEquals( array( 'foo' => 'FOO', 'bar' => 'BAR' ), 
$defs->getValueTypes() );
}
 
+   public function testGetRdfTypeUris() {
+   $defs = $this->getDataTypeDefinitions();
+   $this->assertEquals( array( 'foo' => 
'http://acme.test/vocab/Foo' ), $defs->getRdfTypeUris() );
+   }
+
public function testGetValidatorFactoryCallbacks() {
$defs = $this->getDataTypeDefinitions();
 
diff --git a/repo/includes/Rdf/RdfBuilder.php b/repo/includes/Rdf/RdfBuilder.php
index 6b267d4..a8fffb0 100644
--- a/repo/includes/Rdf/RdfBuilder.php
+++ b/repo/includes/Rdf/RdfBuilder.php
@@ -376,7 +376,8 @@
 
if ( $entity instanceof Property ) {
$this->writer->say( RdfVocabulary::NS_ONTOLOGY, 
'propertyType' )
-   ->is( RdfVocabulary::NS_ONTOLOGY, 
$this->vocabulary->getDataTypeName( $entity ) );
+   ->is( 

[MediaWiki-commits] [Gerrit] Update Ace and use scoped require / define - change (mediawiki...CodeEditor)

2016-03-13 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277178

Change subject: Update Ace and use scoped require / define
..

Update Ace and use scoped require / define

This brings Ace to upstream commit
4a55188fdb0eee9e2d3854f175e67408a1e47655

Bug: T127643
Change-Id: I7699e842d7b561b8a35cf7a4ea048f4126eaf856
---
M modules/ace/ace.js
M modules/ace/ext-beautify.js
M modules/ace/ext-chromevox.js
M modules/ace/ext-elastic_tabstops_lite.js
M modules/ace/ext-emmet.js
M modules/ace/ext-error_marker.js
M modules/ace/ext-keybinding_menu.js
M modules/ace/ext-language_tools.js
M modules/ace/ext-linking.js
M modules/ace/ext-modelist.js
M modules/ace/ext-old_ie.js
M modules/ace/ext-searchbox.js
M modules/ace/ext-settings_menu.js
M modules/ace/ext-spellcheck.js
M modules/ace/ext-split.js
M modules/ace/ext-static_highlight.js
M modules/ace/ext-statusbar.js
M modules/ace/ext-textarea.js
M modules/ace/ext-themelist.js
M modules/ace/ext-whitespace.js
M modules/ace/keybinding-emacs.js
M modules/ace/keybinding-vim.js
M modules/ace/mode-abap.js
M modules/ace/mode-abc.js
M modules/ace/mode-actionscript.js
M modules/ace/mode-ada.js
M modules/ace/mode-apache_conf.js
M modules/ace/mode-applescript.js
M modules/ace/mode-asciidoc.js
M modules/ace/mode-assembly_x86.js
M modules/ace/mode-autohotkey.js
M modules/ace/mode-batchfile.js
M modules/ace/mode-c9search.js
M modules/ace/mode-c_cpp.js
M modules/ace/mode-cirru.js
M modules/ace/mode-clojure.js
M modules/ace/mode-cobol.js
M modules/ace/mode-coffee.js
M modules/ace/mode-coldfusion.js
M modules/ace/mode-csharp.js
M modules/ace/mode-css.js
M modules/ace/mode-curly.js
M modules/ace/mode-d.js
M modules/ace/mode-dart.js
M modules/ace/mode-diff.js
M modules/ace/mode-django.js
M modules/ace/mode-dockerfile.js
M modules/ace/mode-dot.js
M modules/ace/mode-eiffel.js
M modules/ace/mode-ejs.js
M modules/ace/mode-elixir.js
M modules/ace/mode-elm.js
M modules/ace/mode-erlang.js
M modules/ace/mode-forth.js
A modules/ace/mode-fortran.js
M modules/ace/mode-ftl.js
M modules/ace/mode-gcode.js
M modules/ace/mode-gherkin.js
M modules/ace/mode-gitignore.js
M modules/ace/mode-glsl.js
A modules/ace/mode-gobstones.js
M modules/ace/mode-golang.js
M modules/ace/mode-groovy.js
M modules/ace/mode-haml.js
M modules/ace/mode-handlebars.js
M modules/ace/mode-haskell.js
M modules/ace/mode-haxe.js
M modules/ace/mode-html.js
M modules/ace/mode-html_elixir.js
M modules/ace/mode-html_ruby.js
M modules/ace/mode-ini.js
M modules/ace/mode-io.js
M modules/ace/mode-jack.js
M modules/ace/mode-jade.js
M modules/ace/mode-java.js
M modules/ace/mode-javascript.js
M modules/ace/mode-json.js
M modules/ace/mode-jsoniq.js
M modules/ace/mode-jsp.js
M modules/ace/mode-jsx.js
M modules/ace/mode-julia.js
M modules/ace/mode-latex.js
M modules/ace/mode-lean.js
M modules/ace/mode-less.js
M modules/ace/mode-liquid.js
M modules/ace/mode-lisp.js
D modules/ace/mode-live_script.js
M modules/ace/mode-livescript.js
M modules/ace/mode-logiql.js
M modules/ace/mode-lsl.js
M modules/ace/mode-lua.js
M modules/ace/mode-luapage.js
M modules/ace/mode-lucene.js
M modules/ace/mode-makefile.js
M modules/ace/mode-markdown.js
M modules/ace/mode-mask.js
M modules/ace/mode-matlab.js
M modules/ace/mode-maze.js
M modules/ace/mode-mel.js
D modules/ace/mode-mips_assembler.js
D modules/ace/mode-mipsassembler.js
M modules/ace/mode-mushcode.js
M modules/ace/mode-mysql.js
M modules/ace/mode-nix.js
A modules/ace/mode-nsis.js
M modules/ace/mode-objectivec.js
M modules/ace/mode-ocaml.js
M modules/ace/mode-pascal.js
M modules/ace/mode-perl.js
M modules/ace/mode-pgsql.js
M modules/ace/mode-php.js
M modules/ace/mode-plain_text.js
M modules/ace/mode-powershell.js
M modules/ace/mode-praat.js
M modules/ace/mode-prolog.js
M modules/ace/mode-properties.js
M modules/ace/mode-protobuf.js
M modules/ace/mode-python.js
M modules/ace/mode-r.js
A modules/ace/mode-razor.js
M modules/ace/mode-rdoc.js
M modules/ace/mode-rhtml.js
A modules/ace/mode-rst.js
M modules/ace/mode-ruby.js
M modules/ace/mode-rust.js
M modules/ace/mode-sass.js
M modules/ace/mode-scad.js
M modules/ace/mode-scala.js
M modules/ace/mode-scheme.js
M modules/ace/mode-scss.js
M modules/ace/mode-sh.js
M modules/ace/mode-sjs.js
M modules/ace/mode-smarty.js
M modules/ace/mode-snippets.js
M modules/ace/mode-soy_template.js
M modules/ace/mode-space.js
M modules/ace/mode-sql.js
M modules/ace/mode-sqlserver.js
M modules/ace/mode-stylus.js
M modules/ace/mode-svg.js
M modules/ace/mode-swift.js
D modules/ace/mode-swig.js
M modules/ace/mode-tcl.js
M modules/ace/mode-tex.js
M modules/ace/mode-textile.js
M modules/ace/mode-toml.js
M modules/ace/mode-twig.js
M modules/ace/mode-typescript.js
M modules/ace/mode-vala.js
M modules/ace/mode-vbscript.js
M modules/ace/mode-velocity.js
M modules/ace/mode-verilog.js
M modules/ace/mode-vhdl.js
A modules/ace/mode-wollok.js
M modules/ace/mode-xml.js
M modules/ace/mode-xquery.js
M modules/ace/mode-yaml.js

[MediaWiki-commits] [Gerrit] Refactor duplicate code in LinksUpdateHookHandlerTest - change (mediawiki...PageImages)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Refactor duplicate code in LinksUpdateHookHandlerTest
..


Refactor duplicate code in LinksUpdateHookHandlerTest

Change-Id: I9acaadf18e859758cd7bdcb7d260007402695060
---
M tests/phpunit/LinksUpdateHookHandlerTest.php
1 file changed, 29 insertions(+), 18 deletions(-)

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



diff --git a/tests/phpunit/LinksUpdateHookHandlerTest.php 
b/tests/phpunit/LinksUpdateHookHandlerTest.php
index e25e8bd..0cdec8e 100644
--- a/tests/phpunit/LinksUpdateHookHandlerTest.php
+++ b/tests/phpunit/LinksUpdateHookHandlerTest.php
@@ -2,6 +2,7 @@
 
 namespace PageImages\Tests\Hooks;
 
+use LinksUpdate;
 use PageImages\Hooks\LinksUpdateHookHandler;
 use PageImages;
 use ParserOutput;
@@ -24,7 +25,10 @@
parent::tearDown();
}
 
-   public function testOnLinksUpdate() {
+   /**
+* @return LinksUpdate
+*/
+   private function getLinksUpdate() {
$parserOutput = new ParserOutput();
$parserOutput->setExtensionData( 'pageImages', array(
array( 'filename' => 'A.jpg', 'fullwidth' => 100, 
'fullheight' => 50 ),
@@ -37,12 +41,13 @@
->method( 'getParserOutput' )
->will( $this->returnValue( $parserOutput ) );
 
-   LinksUpdateHookHandler::onLinksUpdate( $linksUpdate );
-   $this->assertTrue( property_exists( $linksUpdate, 'mProperties' 
), 'precondition' );
-   $this->assertSame( 'A.jpg', 
$linksUpdate->mProperties[PageImages::PROP_NAME] );
+   return $linksUpdate;
}
 
-   public function testGetMetadata() {
+   /**
+* @return RepoGroup
+*/
+   private function getRepoGroup() {
$file = $this->getMockBuilder( 'File' )
->disableOriginalConstructor()
->getMock();
@@ -51,27 +56,33 @@
->method( 'isDeleted' )
->will( $this->returnValue( true ) );
 
-   $mockRepoGroup = $this->getMockBuilder( 'RepoGroup' )
+   $repoGroup = $this->getMockBuilder( 'RepoGroup' )
->disableOriginalConstructor()
->getMock();
-   $mockRepoGroup->expects( $this->any() )
+   $repoGroup->expects( $this->any() )
->method( 'findFile' )
->will( $this->returnValue( $file ) );
-   RepoGroup::setSingleton( $mockRepoGroup );
 
-   $parserOutput = new ParserOutput();
-   $parserOutput->setExtensionData( 'pageImages', array(
-   array( 'filename' => 'A.jpg', 'fullwidth' => 100, 
'fullheight' => 50 ),
-   ) );
+   return $repoGroup;
+   }
 
-   $linksUpdate = $this->getMockBuilder( 'LinksUpdate' )
-   ->disableOriginalConstructor()
-   ->getMock();
-   $linksUpdate->expects( $this->any() )
-   ->method( 'getParserOutput' )
-   ->will( $this->returnValue( $parserOutput ) );
+   public function testOnLinksUpdate() {
+   $linksUpdate = $this->getLinksUpdate();
 
LinksUpdateHookHandler::onLinksUpdate( $linksUpdate );
+
+   $this->assertTrue( property_exists( $linksUpdate, 'mProperties' 
), 'precondition' );
+   $this->assertSame( 'A.jpg', 
$linksUpdate->mProperties[PageImages::PROP_NAME] );
+   }
+
+   public function testFetchingExtendedMetadataFromFile() {
+   // Required to make wfFindFile in 
LinksUpdateHookHandler::getScore return something.
+   RepoGroup::setSingleton( $this->getRepoGroup() );
+   $linksUpdate = $this->getLinksUpdate();
+
+   LinksUpdateHookHandler::onLinksUpdate( $linksUpdate );
+
$this->assertTrue( true, 'no errors in getMetadata' );
}
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9acaadf18e859758cd7bdcb7d260007402695060
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageImages
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: MaxSem 
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 sanity check test for LinksUpdateHookHandler::getMetadata - change (mediawiki...PageImages)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add sanity check test for LinksUpdateHookHandler::getMetadata
..


Add sanity check test for LinksUpdateHookHandler::getMetadata

Change-Id: I840902c8397c8442def8239504ce1cfa8eafbb8e
---
M tests/phpunit/LinksUpdateHookHandlerTest.php
1 file changed, 39 insertions(+), 0 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/tests/phpunit/LinksUpdateHookHandlerTest.php 
b/tests/phpunit/LinksUpdateHookHandlerTest.php
index 40bda08..e25e8bd 100644
--- a/tests/phpunit/LinksUpdateHookHandlerTest.php
+++ b/tests/phpunit/LinksUpdateHookHandlerTest.php
@@ -6,6 +6,7 @@
 use PageImages;
 use ParserOutput;
 use PHPUnit_Framework_TestCase;
+use RepoGroup;
 
 /**
  * @covers PageImages\Hooks\LinksUpdateHookHandler
@@ -16,6 +17,12 @@
  * @author Thiemo Mättig
  */
 class LinksUpdateHookHandlerTest extends PHPUnit_Framework_TestCase {
+
+   public function tearDown() {
+   // remove mock added in testGetMetadata()
+   RepoGroup::destroySingleton();
+   parent::tearDown();
+   }
 
public function testOnLinksUpdate() {
$parserOutput = new ParserOutput();
@@ -35,4 +42,36 @@
$this->assertSame( 'A.jpg', 
$linksUpdate->mProperties[PageImages::PROP_NAME] );
}
 
+   public function testGetMetadata() {
+   $file = $this->getMockBuilder( 'File' )
+   ->disableOriginalConstructor()
+   ->getMock();
+   // ugly hack to avoid all the unmockable crap in FormatMetadata
+   $file->expects( $this->any() )
+   ->method( 'isDeleted' )
+   ->will( $this->returnValue( true ) );
+
+   $mockRepoGroup = $this->getMockBuilder( 'RepoGroup' )
+   ->disableOriginalConstructor()
+   ->getMock();
+   $mockRepoGroup->expects( $this->any() )
+   ->method( 'findFile' )
+   ->will( $this->returnValue( $file ) );
+   RepoGroup::setSingleton( $mockRepoGroup );
+
+   $parserOutput = new ParserOutput();
+   $parserOutput->setExtensionData( 'pageImages', array(
+   array( 'filename' => 'A.jpg', 'fullwidth' => 100, 
'fullheight' => 50 ),
+   ) );
+
+   $linksUpdate = $this->getMockBuilder( 'LinksUpdate' )
+   ->disableOriginalConstructor()
+   ->getMock();
+   $linksUpdate->expects( $this->any() )
+   ->method( 'getParserOutput' )
+   ->will( $this->returnValue( $parserOutput ) );
+
+   LinksUpdateHookHandler::onLinksUpdate( $linksUpdate );
+   $this->assertTrue( true, 'no errors in getMetadata' );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I840902c8397c8442def8239504ce1cfa8eafbb8e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageImages
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't add label-elements for elements that doesn't have one - change (mediawiki/core)

2016-03-13 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277177

Change subject: Don't add label-elements for elements that doesn't have one
..

Don't add label-elements for elements that doesn't have one

Fix the OOUI field element implementation to conditionally add
labels to the FieldLayout (only if the label isn't empty). Also
add setShowEmptyLabel( false ) to HTMLButtonField (labels usually
aren't set outside of the button, the button itself should have a label).

Bug: T129821
Change-Id: I0499bb82245273519e77c80e78bc431588875a85
---
M includes/htmlform/HTMLButtonField.php
M includes/htmlform/HTMLFormField.php
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/77/277177/1

diff --git a/includes/htmlform/HTMLButtonField.php 
b/includes/htmlform/HTMLButtonField.php
index 0b07765..16417fc 100644
--- a/includes/htmlform/HTMLButtonField.php
+++ b/includes/htmlform/HTMLButtonField.php
@@ -56,6 +56,8 @@
$this->buttonLabel = $info['buttonlabel-raw'];
}
 
+   $this->setShowEmptyLabel( false );
+
parent::__construct( $info );
}
 
diff --git a/includes/htmlform/HTMLFormField.php 
b/includes/htmlform/HTMLFormField.php
index 6e5d656..a9c7632 100644
--- a/includes/htmlform/HTMLFormField.php
+++ b/includes/htmlform/HTMLFormField.php
@@ -610,12 +610,17 @@
$config = [
'classes' => [ "mw-htmlform-field-$fieldType", 
$this->mClass ],
'align' => $this->getLabelAlignOOUI(),
-   'label' => new OOUI\HtmlSnippet( $this->getLabel() ),
'help' => $helpText !== null ? new OOUI\HtmlSnippet( 
$helpText ) : null,
'errors' => $errors,
'infusable' => $infusable,
];
 
+   // the element could specify, that the label doesn't need to be 
added
+   $label = $this->getLabel();
+   if ( $label ) {
+   $config['label'] = new OOUI\HtmlSnippet( $label );
+   }
+
return $this->getFieldLayoutOOUI( $inputField, $config );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0499bb82245273519e77c80e78bc431588875a85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Namespace define, require calls when building Ace - change (mediawiki...CodeEditor)

2016-03-13 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277176

Change subject: Namespace define, require calls when building Ace
..

Namespace define, require calls when building Ace

Bug: T127643
Change-Id: If425d96fa9e650ded2d3431d4c418f0fd1359af1
---
M Makefile
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeEditor 
refs/changes/76/277176/1

diff --git a/Makefile b/Makefile
index fa80ce1..c5d81be 100644
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,8 @@
 refresh: ace-git
test -d modules/ace || mkdir modules/ace
(cd ace-git && git checkout master && git pull origin master)
-   (cd ace-git && npm install && node ./Makefile.dryice.js)
-   rsync -av ace-git/build/src/ modules/ace/
+   (cd ace-git && npm install && node ./Makefile.dryice.js -nc)
+   rsync -av ace-git/build/src-noconflict/ modules/ace/
cp ace-git/LICENSE modules/ace/LICENSE
 
 ace-git:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If425d96fa9e650ded2d3431d4c418f0fd1359af1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Drop backwards-compatibility ext.visualEditor.mwreference mo... - change (mediawiki...Cite)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Drop backwards-compatibility ext.visualEditor.mwreference module
..


Drop backwards-compatibility ext.visualEditor.mwreference module

Change-Id: I5051b650b9430107d683509aee12411fa1db551b
---
M extension.json
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/extension.json b/extension.json
index cd3c5da..b010e1c 100644
--- a/extension.json
+++ b/extension.json
@@ -154,11 +154,6 @@
"desktop",
"mobile"
]
-   },
-   "ext.visualEditor.mwreference": {
-   "dependencies": [
-   "ext.cite.visualEditor"
-   ]
}
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5051b650b9430107d683509aee12411fa1db551b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Start using Support Preference library, and use SwitchPrefer... - change (apps...wikipedia)

2016-03-13 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277175

Change subject: Start using Support Preference library, and use 
SwitchPreference.
..

Start using Support Preference library, and use SwitchPreference.

This transitions our Settings (and Developer settings) screen to use the
Support Preference (v14) library, so that the appearance of the settings
is consistent across APIs.  No functional changes expected, in that sense.

This also now uses SwitchPreference instead of CheckboxPreference, which
looks a lot more Materialy!

Change-Id: I89ecdd4ced3df959380b3147cf67775a0b434bb4
---
M app/build.gradle
M app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
M app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java
D app/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
M app/src/main/java/org/wikipedia/settings/DeveloperSettingsFragment.java
M 
app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
M app/src/main/java/org/wikipedia/settings/EditTextAutoSummarizePreference.java
M app/src/main/java/org/wikipedia/settings/PreferenceLoaderFragment.java
M app/src/main/java/org/wikipedia/settings/PreferenceMultiLine.java
M app/src/main/java/org/wikipedia/settings/SettingsFragment.java
M app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
M app/src/main/res/values/styles.xml
M app/src/main/res/xml/developer_preferences.xml
M app/src/main/res/xml/preferences.xml
14 files changed, 76 insertions(+), 97 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/75/277175/1

diff --git a/app/build.gradle b/app/build.gradle
index f574c7b..f4ff1b4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -172,6 +172,7 @@
 compile "com.android.support:recyclerview-v7:$supportVersion"
 compile "com.android.support:percent:$supportVersion"
 compile "com.android.support:palette-v7:$supportVersion"
+compile "com.android.support:preference-v14:$supportVersion"
 compile 'com.facebook.fresco:fresco:0.8.1'
 compile 'com.google.code.gson:gson:2.5'
 compile "com.squareup.okhttp:okhttp-urlconnection:$okHttpVersion"
diff --git 
a/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java 
b/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
index 6d48b7b..7a5ff84 100644
--- 
a/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
+++ 
b/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
@@ -1,18 +1,18 @@
 package org.wikipedia.activity;
 
-import android.app.Fragment;
+import android.support.v4.app.Fragment;
 
 /** Boilerplate for a {@link android.support.v4.app.FragmentActivity} 
containing a single stack of
  * platform {@link Fragment}s. */
 public abstract class PlatformSingleFragmentActivity 
extends BaseSingleFragmentActivity {
 @Override
 protected void addFragment(Fragment fragment) {
-getFragmentManager().beginTransaction().add(getContainerId(), 
fragment).commit();
+getSupportFragmentManager().beginTransaction().add(getContainerId(), 
fragment).commit();
 }
 
 @Override
 protected T getFragment() {
 //noinspection unchecked
-return (T) getFragmentManager().findFragmentById(getContainerId());
+return (T) 
getSupportFragmentManager().findFragmentById(getContainerId());
 }
 }
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java 
b/app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java
index 4f2af18..5d5024c 100644
--- a/app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java
+++ b/app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java
@@ -1,16 +1,16 @@
 package org.wikipedia.settings;
 
 import android.app.Activity;
-import android.preference.Preference;
-import android.preference.PreferenceFragment;
 import android.support.annotation.NonNull;
 import android.support.annotation.StringRes;
 import android.support.annotation.XmlRes;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceFragmentCompat;
 
 /*package*/ abstract class BasePreferenceLoader implements PreferenceLoader {
-@NonNull private final PreferenceFragment preferenceHost;
+@NonNull private final PreferenceFragmentCompat preferenceHost;
 
-/*package*/ BasePreferenceLoader(@NonNull PreferenceFragment fragment) {
+/*package*/ BasePreferenceLoader(@NonNull PreferenceFragmentCompat 
fragment) {
 preferenceHost = fragment;
 }
 
diff --git 
a/app/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java 
b/app/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
deleted file mode 100644
index f144192..000
--- 

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 6b3ed57..0042478 - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277174

Change subject: Syncronize VisualEditor: 6b3ed57..0042478
..

Syncronize VisualEditor: 6b3ed57..0042478

Change-Id: I80f36f72dda4ddf3aa63802e7562b576a14646b8
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/74/277174/1

diff --git a/VisualEditor b/VisualEditor
index 6b3ed57..0042478 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 6b3ed57eedda7763539a924b0b0faca2e677cff5
+Subproject commit 004247822dba81469afddcbb9971cf3519c1c37b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80f36f72dda4ddf3aa63802e7562b576a14646b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 6b3ed57..0042478 - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 6b3ed57..0042478
..


Syncronize VisualEditor: 6b3ed57..0042478

Change-Id: I80f36f72dda4ddf3aa63802e7562b576a14646b8
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 6b3ed57..0042478 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 6b3ed57eedda7763539a924b0b0faca2e677cff5
+Subproject commit 004247822dba81469afddcbb9971cf3519c1c37b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80f36f72dda4ddf3aa63802e7562b576a14646b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Clean up scripts/generate_wiki_languages.py - change (apps...wikipedia)

2016-03-13 Thread Maroloccio (Code Review)
Maroloccio has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277173

Change subject: Clean up scripts/generate_wiki_languages.py
..

Clean up scripts/generate_wiki_languages.py

Change-Id: I9d26f658bdedc9a1fdbc103fe5499b24b4ef751a
---
M scripts/generate_wiki_languages.py
1 file changed, 57 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/73/277173/1

diff --git a/scripts/generate_wiki_languages.py 
b/scripts/generate_wiki_languages.py
index 425fd38..3a04409 100755
--- a/scripts/generate_wiki_languages.py
+++ b/scripts/generate_wiki_languages.py
@@ -1,21 +1,27 @@
 #!/usr/bin/env python
 # coding=utf-8
 
-from urllib2 import urlopen
-import unicodecsv as csv
-from itertools import islice
+import urllib
+import urllib2
+import unicodecsv
+import itertools
 import json
+import lxml
 import lxml.builder as lb
-from lxml import etree
+import sys
+
 
 # Returns CSV of all wikipedias, ordered by number of 'good' articles
-URL = 
"https://wikistats.wmflabs.org/api.php?action=dump=wikipedias=csv=good;
-
-data = csv.reader(urlopen(URL))
-
-lang_keys = []
-lang_local_names = []
-lang_eng_names = []
+URL_BASE= ('https://'
+   'wikistats.wmflabs.org' '/'
+   'api.php' '?')
+QUERY_PARAMS = [('action', 'dump'),
+('table', 'wikipedias'),
+('format', 'csv'),
+('s', 'good')]
+COLUMNS = {'language_code': 2,
+   'local_name': 10,
+   'english_name': 1}
 
 
 def add_lang(key, local_name, eng_name):
@@ -23,20 +29,38 @@
 lang_local_names.append(local_name)
 lang_eng_names.append(eng_name)
 
-for row in islice(data, 1, None):
-if row[2] == 'got':
+
+def escape(s):
+return s.replace("'", "\\'")
+
+
+REQUEST_URL = URL_BASE + urllib.urlencode(QUERY_PARAMS)
+url_file = urllib2.urlopen(REQUEST_URL)
+csv_data = unicodecsv.reader(url_file)
+
+lang_keys = []
+lang_local_names = []
+lang_eng_names = []
+
+start_at_row = 1
+end_at_row = None
+for row in itertools.islice(csv_data, start_at_row, end_at_row):
+language_code = row[COLUMNS['language_code']]
+if language_code == 'got':
 # 'got' is Gothic Runes, which lie outside the Basic Multilingual Plane
-# < 
https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane >
 # Android segfaults on these. So let's ignore those.
 # What's good for Android is also good for iOS :P
-pass
-elif row[2] == 'zh':
-add_lang(key='zh-hans', local_name=u'简体', eng_name='Simplified 
Chinese')
-add_lang(key='zh-hant', local_name=u'繁體', eng_name='Traditional 
Chinese')
-else:
-add_lang(key=row[2].replace("'", "\\'"),
- local_name=row[10].replace("'", "\\'"),
- eng_name=row[1].replace("'", "\\'"))
+continue
+if language_code == 'zh':
+add_lang(key='zh-hans', local_name=u'简体',
+ eng_name='Simplified Chinese')
+add_lang(key='zh-hant', local_name=u'繁體',
+ eng_name='Traditional Chinese')
+continue
+local_name = row[COLUMNS['local_name']]
+english_name = row[COLUMNS['english_name']]
+add_lang(key=escape(language_code), local_name=escape(local_name),
+ eng_name=escape(english_name))
 
 add_lang(key='test', local_name='Test', eng_name='Test')
 add_lang(key='', local_name='None', eng_name='None (development)')
@@ -51,15 +75,17 @@
 eng_names = [x.item(k) for k in lang_eng_names]
 
 resources = x.resources(
-getattr(x, 'string-array')(*keys, name="preference_language_keys"),
-getattr(x, 'string-array')(*local_names, 
name="preference_language_local_names"),
-getattr(x, 'string-array')(*eng_names, 
name="preference_language_canonical_names")
+getattr(x, 'string-array')(*keys, name='preference_language_keys'),
+getattr(x, 'string-array')(*local_names,
+   name='preference_language_local_names'),
+getattr(x, 'string-array')(*eng_names,
+   name='preference_language_canonical_names')
 )
 resources.set(TOOLS + 'ignore', 'MissingTranslation')
 
-open("languages_list.xml", "w").write(
-etree.tostring(resources, pretty_print=True, xml_declaration=True, 
encoding='utf-8')
-)
+with open('languages_list.xml', 'w') as f:
+f.write(lxml.etree.tostring(resources, pretty_print=True,
+xml_declaration=True, encoding='utf-8'))
 
 # Generate the JSON, for iOS
 langs_json = []
@@ -67,9 +93,9 @@
 # Start from 1, to skip the headers
 for i in xrange(1, len(lang_keys)):
 langs_json.append({
-"code": lang_keys[i],
-"name": lang_local_names[i],
-"canonical_name": lang_eng_names[i]
+'code': lang_keys[i],
+'name': lang_local_names[i],
+'canonical_name': lang_eng_names[i]
 })
 
 open("languages_list.json", 

[MediaWiki-commits] [Gerrit] Some cleanup - change (mediawiki...Lingo)

2016-03-13 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Some cleanup
..


Some cleanup

Change-Id: I238412f013806419c370e08271ed73e7b8ebec38
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Foxtrott: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/extension.json b/extension.json
index 3b5923b..688f010 100644
--- a/extension.json
+++ b/extension.json
@@ -61,7 +61,6 @@
},
"AutoloadClasses": {
"Lingo\\Lingo": "/src/Lingo.php",
-   "Lingo\\Hooks": "/src/Hooks.php",
"Lingo\\LingoParser": "/src/LingoParser.php",
"Lingo\\Tree": "/src/Tree.php",
"Lingo\\Element": "/src/Element.php",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I238412f013806419c370e08271ed73e7b8ebec38
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Some cleanup - change (mediawiki...Lingo)

2016-03-13 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277115

Change subject: Some cleanup
..

Some cleanup

Change-Id: I238412f013806419c370e08271ed73e7b8ebec38
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lingo 
refs/changes/15/277115/1

diff --git a/extension.json b/extension.json
index 3b5923b..688f010 100644
--- a/extension.json
+++ b/extension.json
@@ -61,7 +61,6 @@
},
"AutoloadClasses": {
"Lingo\\Lingo": "/src/Lingo.php",
-   "Lingo\\Hooks": "/src/Hooks.php",
"Lingo\\LingoParser": "/src/LingoParser.php",
"Lingo\\Tree": "/src/Tree.php",
"Lingo\\Element": "/src/Element.php",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I238412f013806419c370e08271ed73e7b8ebec38
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Some cleanup - change (mediawiki...Lingo)

2016-03-13 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Some cleanup
..


Some cleanup

Change-Id: Id412bd2c72429c9b2703f018f10796fa9fce2bc0
---
M src/BasicBackend.php
D src/Hooks.php
M src/Lingo.php
3 files changed, 2 insertions(+), 53 deletions(-)

Approvals:
  Foxtrott: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/src/BasicBackend.php b/src/BasicBackend.php
index 9ea5343..114a6da 100644
--- a/src/BasicBackend.php
+++ b/src/BasicBackend.php
@@ -30,7 +30,6 @@
 use ApprovedRevs;
 use ContentHandler;
 use Hooks;
-use Page;
 use Parser;
 use ParserOptions;
 use Revision;
@@ -45,12 +44,11 @@
  */
 class BasicBackend extends Backend {
 
-   protected $mArticleLines = array();
+   protected $mArticleLines = null;
 
/**
 * Lingo\BasicBackend constructor.
 * @param MessageLog|null $messages
-* @param LingoParser $lingoParser
 */
public function __construct( MessageLog &$messages = null ) {
 
@@ -188,7 +186,7 @@
private function setArticleLines() {
global $wgRequest;
 
-   if ( $this->mArticleLines ) {
+   if ( $this->mArticleLines !== null ) {
return;
}
 
diff --git a/src/Hooks.php b/src/Hooks.php
deleted file mode 100644
index e00f846..000
--- a/src/Hooks.php
+++ /dev/null
@@ -1,43 +0,0 @@
-http://www.gnu.org/licenses/>.
- *
- * @author Stephan Gambke
- * @file
- * @ingroup Lingo
- */
-
-namespace Lingo;
-use MagicWord;
-use Parser;
-use PPFrame;
-
-/**
- * The Lingo\Hooks class.
- *
- * It contains the hook handlers of the extension
- *
- * @ingroup Lingo
- */
-class Hooks {
-}
-
diff --git a/src/Lingo.php b/src/Lingo.php
index acd4a06..e74db7c 100644
--- a/src/Lingo.php
+++ b/src/Lingo.php
@@ -77,12 +77,6 @@
}
 
}
-
-// $hookRegistry = new HookRegistry(
-// ApplicationFactory::getInstance()->getStore()
-// );
-//
-// $hookRegistry->register();
};
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id412bd2c72429c9b2703f018f10796fa9fce2bc0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Some cleanup - change (mediawiki...Lingo)

2016-03-13 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277113

Change subject: Some cleanup
..

Some cleanup

Change-Id: Id412bd2c72429c9b2703f018f10796fa9fce2bc0
---
M src/BasicBackend.php
D src/Hooks.php
M src/Lingo.php
3 files changed, 2 insertions(+), 53 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lingo 
refs/changes/13/277113/1

diff --git a/src/BasicBackend.php b/src/BasicBackend.php
index 9ea5343..114a6da 100644
--- a/src/BasicBackend.php
+++ b/src/BasicBackend.php
@@ -30,7 +30,6 @@
 use ApprovedRevs;
 use ContentHandler;
 use Hooks;
-use Page;
 use Parser;
 use ParserOptions;
 use Revision;
@@ -45,12 +44,11 @@
  */
 class BasicBackend extends Backend {
 
-   protected $mArticleLines = array();
+   protected $mArticleLines = null;
 
/**
 * Lingo\BasicBackend constructor.
 * @param MessageLog|null $messages
-* @param LingoParser $lingoParser
 */
public function __construct( MessageLog &$messages = null ) {
 
@@ -188,7 +186,7 @@
private function setArticleLines() {
global $wgRequest;
 
-   if ( $this->mArticleLines ) {
+   if ( $this->mArticleLines !== null ) {
return;
}
 
diff --git a/src/Hooks.php b/src/Hooks.php
deleted file mode 100644
index e00f846..000
--- a/src/Hooks.php
+++ /dev/null
@@ -1,43 +0,0 @@
-http://www.gnu.org/licenses/>.
- *
- * @author Stephan Gambke
- * @file
- * @ingroup Lingo
- */
-
-namespace Lingo;
-use MagicWord;
-use Parser;
-use PPFrame;
-
-/**
- * The Lingo\Hooks class.
- *
- * It contains the hook handlers of the extension
- *
- * @ingroup Lingo
- */
-class Hooks {
-}
-
diff --git a/src/Lingo.php b/src/Lingo.php
index acd4a06..e74db7c 100644
--- a/src/Lingo.php
+++ b/src/Lingo.php
@@ -77,12 +77,6 @@
}
 
}
-
-// $hookRegistry = new HookRegistry(
-// ApplicationFactory::getInstance()->getStore()
-// );
-//
-// $hookRegistry->register();
};
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id412bd2c72429c9b2703f018f10796fa9fce2bc0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Increase purged entry point s-maxage from 12 to 48 hours - change (operations/puppet)

2016-03-13 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277112

Change subject: Increase purged entry point s-maxage from 12 to 48 hours
..

Increase purged entry point s-maxage from 12 to 48 hours

We have not encountered any issues with a TTL of 12 hours, and have deployed
code which disables caching for all requests with non-canonical titles.

It should thus be safe to take the next step towards longer TTLs. 48 hours
represents a conservative increment on the way to 1-2 weeks.

Change-Id: Ifca932d1efe8ea829a84dc5e9039c89ee69f74d3
---
M modules/restbase/templates/config.yaml.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/277112/1

diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index 5a4ebc7..8e162fa 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -61,7 +61,7 @@
 related:
   cache_control: s-maxage=86400, max-age=3600
 # Cache headers for purged end points.
-purged_cache_control: s-maxage=43200, max-age=0, must-revalidate
+purged_cache_control: s-maxage=172800, max-age=0, must-revalidate
 
 # A different project template, sharing configuration options.
 wikimedia.org: 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifca932d1efe8ea829a84dc5e9039c89ee69f74d3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: GWicke 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Rework and testing of Backends; move hooks back to php - change (mediawiki...Lingo)

2016-03-13 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Rework and testing of Backends; move hooks back to php
..


Rework and testing of Backends; move hooks back to php

* rework BasicBackend
* minor rework Backend
* minor rework LingoParser
* generally replace static methods
* improve testing of Backends

* put hook registration back into php
* no registration of hooks when not necessary (e.g. BasicBackend not used)
* introduce class Lingo for extension initialisation

Change-Id: I69c84dd442a448c4a7d56a878d6a3e29ddda5f05
---
M extension.json
M src/Backend.php
M src/BasicBackend.php
M src/Hooks.php
A src/Lingo.php
M src/LingoParser.php
M src/Tree.php
M tests/phpunit/Integration/ArticleAnnotationTest.php
M tests/phpunit/Unit/BackendTest.php
M tests/phpunit/Unit/BasicBackendTest.php
10 files changed, 337 insertions(+), 161 deletions(-)

Approvals:
  Foxtrott: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/extension.json b/extension.json
index 99b1e47..3b5923b 100644
--- a/extension.json
+++ b/extension.json
@@ -60,6 +60,7 @@
"LingoMagic": "src/Lingo.i18n.magic.php"
},
"AutoloadClasses": {
+   "Lingo\\Lingo": "/src/Lingo.php",
"Lingo\\Hooks": "/src/Hooks.php",
"Lingo\\LingoParser": "/src/LingoParser.php",
"Lingo\\Tree": "/src/Tree.php",
@@ -69,22 +70,6 @@
"Lingo\\MessageLog": "/src/MessageLog.php",
"Lingo\\Tests\\Util\\XmlFileProvider": 
"/tests/phpunit/Util/XmlFileProvider.php"
},
-   "Hooks": {
-   "ParserFirstCallInit": [
-   "Lingo\\Hooks::registerTags"
-   ],
-   "ArticlePurge": [
-   "Lingo\\BasicBackend::purgeCache"
-   ],
-   "ArticleSave": [
-   "Lingo\\BasicBackend::purgeCache"
-   ],
-   "ParserAfterParse": [
-   "Lingo\\Hooks::parse"
-   ]
-   },
-   "ExtensionFunctions": [
-   "Lingo\\Hooks::initExtension"
-   ],
+   "callback": "Lingo\\Lingo::initExtension",
"manifest_version": 1
 }
diff --git a/src/Backend.php b/src/Backend.php
index e2ece01..d49851c 100644
--- a/src/Backend.php
+++ b/src/Backend.php
@@ -36,6 +36,7 @@
 abstract class Backend {
 
protected $mMessageLog;
+   protected $mLingoParser;
 
/**
 * Lingo\Backend constructor.
@@ -43,21 +44,41 @@
 */
public function __construct( MessageLog &$messages = null ) {
 
-   if ( !$messages ) {
-   $this->mMessageLog = new MessageLog();
-   } else {
-   $this->mMessageLog = $messages;
-   }
+   $this->mMessageLog = $messages;
}
 
/**
 * @return MessageLog
 */
public function getMessageLog() {
+
+   if ( !$this->mMessageLog ) {
+   $this->mMessageLog = new MessageLog();
+   }
+
return $this->mMessageLog;
}
 
/**
+* @return LingoParser
+*/
+   public function getLingoParser() {
+
+   if ( !$this->mLingoParser ) {
+   $this->mLingoParser = LingoParser::getInstance();
+   }
+
+   return $this->mLingoParser;
+   }
+
+   /**
+* @param LingoParser $mLingoParser
+*/
+   public function setLingoParser( LingoParser $mLingoParser ) {
+   $this->mLingoParser = $mLingoParser;
+   }
+
+   /**
 * This function returns true if the backend is cache-enabled.
 *
 * Actual caching is done by the parser, but to be cache-enabled the 
backend
diff --git a/src/BasicBackend.php b/src/BasicBackend.php
index d7fa827..9ea5343 100644
--- a/src/BasicBackend.php
+++ b/src/BasicBackend.php
@@ -29,12 +29,14 @@
 
 use ApprovedRevs;
 use ContentHandler;
+use Hooks;
 use Page;
 use Parser;
 use ParserOptions;
 use Revision;
 use Title;
 use User;
+use WikiPage;
 
 /**
  * The Lingo\BasicBackend class.
@@ -48,59 +50,26 @@
/**
 * Lingo\BasicBackend constructor.
 * @param MessageLog|null $messages
+* @param LingoParser $lingoParser
 */
public function __construct( MessageLog &$messages = null ) {
 
-   global $wgRequest;
-
-   $page = self::getLingoPage();
-
parent::__construct( $messages );
 
-   // Get Terminology page
-   $title = Title::newFromText( $page );
-   if ( $title->getInterwiki() ) {
-   $this->getMessageLog()->addError( wfMessage( 
'lingo-terminologypagenotlocal', $page )->inContentLanguage()->text() );
-   return;
-   }
+   

[MediaWiki-commits] [Gerrit] Rework and testing of Backends; move hooks back to php - change (mediawiki...Lingo)

2016-03-13 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277111

Change subject: Rework and testing of Backends; move hooks back to php
..

Rework and testing of Backends; move hooks back to php

* rework BasicBackend
* minor rework Backend
* minor rework LingoParser
* generally replace static methods
* improve testing of Backends

* put hook registration back into php
* no registration of hooks when not necessary (e.g. BasicBackend not used)
* introduce class Lingo for extension initialisation

Change-Id: I69c84dd442a448c4a7d56a878d6a3e29ddda5f05
---
M extension.json
M src/Backend.php
M src/BasicBackend.php
M src/Hooks.php
A src/Lingo.php
M src/LingoParser.php
M src/Tree.php
M tests/phpunit/Integration/ArticleAnnotationTest.php
M tests/phpunit/Unit/BackendTest.php
M tests/phpunit/Unit/BasicBackendTest.php
10 files changed, 337 insertions(+), 161 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lingo 
refs/changes/11/277111/1

diff --git a/extension.json b/extension.json
index 99b1e47..3b5923b 100644
--- a/extension.json
+++ b/extension.json
@@ -60,6 +60,7 @@
"LingoMagic": "src/Lingo.i18n.magic.php"
},
"AutoloadClasses": {
+   "Lingo\\Lingo": "/src/Lingo.php",
"Lingo\\Hooks": "/src/Hooks.php",
"Lingo\\LingoParser": "/src/LingoParser.php",
"Lingo\\Tree": "/src/Tree.php",
@@ -69,22 +70,6 @@
"Lingo\\MessageLog": "/src/MessageLog.php",
"Lingo\\Tests\\Util\\XmlFileProvider": 
"/tests/phpunit/Util/XmlFileProvider.php"
},
-   "Hooks": {
-   "ParserFirstCallInit": [
-   "Lingo\\Hooks::registerTags"
-   ],
-   "ArticlePurge": [
-   "Lingo\\BasicBackend::purgeCache"
-   ],
-   "ArticleSave": [
-   "Lingo\\BasicBackend::purgeCache"
-   ],
-   "ParserAfterParse": [
-   "Lingo\\Hooks::parse"
-   ]
-   },
-   "ExtensionFunctions": [
-   "Lingo\\Hooks::initExtension"
-   ],
+   "callback": "Lingo\\Lingo::initExtension",
"manifest_version": 1
 }
diff --git a/src/Backend.php b/src/Backend.php
index e2ece01..d49851c 100644
--- a/src/Backend.php
+++ b/src/Backend.php
@@ -36,6 +36,7 @@
 abstract class Backend {
 
protected $mMessageLog;
+   protected $mLingoParser;
 
/**
 * Lingo\Backend constructor.
@@ -43,21 +44,41 @@
 */
public function __construct( MessageLog &$messages = null ) {
 
-   if ( !$messages ) {
-   $this->mMessageLog = new MessageLog();
-   } else {
-   $this->mMessageLog = $messages;
-   }
+   $this->mMessageLog = $messages;
}
 
/**
 * @return MessageLog
 */
public function getMessageLog() {
+
+   if ( !$this->mMessageLog ) {
+   $this->mMessageLog = new MessageLog();
+   }
+
return $this->mMessageLog;
}
 
/**
+* @return LingoParser
+*/
+   public function getLingoParser() {
+
+   if ( !$this->mLingoParser ) {
+   $this->mLingoParser = LingoParser::getInstance();
+   }
+
+   return $this->mLingoParser;
+   }
+
+   /**
+* @param LingoParser $mLingoParser
+*/
+   public function setLingoParser( LingoParser $mLingoParser ) {
+   $this->mLingoParser = $mLingoParser;
+   }
+
+   /**
 * This function returns true if the backend is cache-enabled.
 *
 * Actual caching is done by the parser, but to be cache-enabled the 
backend
diff --git a/src/BasicBackend.php b/src/BasicBackend.php
index d7fa827..9ea5343 100644
--- a/src/BasicBackend.php
+++ b/src/BasicBackend.php
@@ -29,12 +29,14 @@
 
 use ApprovedRevs;
 use ContentHandler;
+use Hooks;
 use Page;
 use Parser;
 use ParserOptions;
 use Revision;
 use Title;
 use User;
+use WikiPage;
 
 /**
  * The Lingo\BasicBackend class.
@@ -48,59 +50,26 @@
/**
 * Lingo\BasicBackend constructor.
 * @param MessageLog|null $messages
+* @param LingoParser $lingoParser
 */
public function __construct( MessageLog &$messages = null ) {
 
-   global $wgRequest;
-
-   $page = self::getLingoPage();
-
parent::__construct( $messages );
 
-   // Get Terminology page
-   $title = Title::newFromText( $page );
-   if ( $title->getInterwiki() ) {
-   $this->getMessageLog()->addError( wfMessage( 
'lingo-terminologypagenotlocal', $page )->inContentLanguage()->text() );
-   return;
-  

[MediaWiki-commits] [Gerrit] [ArticleIndex] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277110

Change subject: [ArticleIndex] Add npm test
..

[ArticleIndex] Add npm test

Also move jsonlint and jshint to check: for non-whitelisted users.

Requires I7d0f066467b0f043836807f89448c2b1d7be3765

Change-Id: I6dc23d3d7e53b4ac8c1ee5fcee1e0ec39fe3d02a
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/10/277110/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..9b3c55e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4004,9 +4004,11 @@
 
   - name: mediawiki/extensions/ArticleIndex
 template:
-  - name: jsonlint
-  - name: jshint
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/AssertEdit
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6dc23d3d7e53b4ac8c1ee5fcee1e0ec39fe3d02a
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Ensure table cells are ce=true before computing offsets - change (VisualEditor/VisualEditor)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Ensure table cells are ce=true before computing offsets
..


Ensure table cells are ce=true before computing offsets

Firefox won't return an offset inside ce=false, and thus
breaks double-click to edit.

Bug: T128282
Change-Id: I0a4056a8daa9f41a35f98161118e4b352af27ba4
---
M src/ce/nodes/ve.ce.TableNode.js
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/src/ce/nodes/ve.ce.TableNode.js b/src/ce/nodes/ve.ce.TableNode.js
index 437103e..e1d1a21 100644
--- a/src/ce/nodes/ve.ce.TableNode.js
+++ b/src/ce/nodes/ve.ce.TableNode.js
@@ -104,10 +104,12 @@
return;
}
if ( this.surface.getModel().getSelection() instanceof 
ve.dm.TableSelection ) {
+   // Don't change selection in setEditing to avoid scrolling to 
bottom of cell
+   this.setEditing( true, true );
+   // getOffsetFromEventCoords doesn't work in ce=false in 
Firefox, so ensure
+   // this is called after setEditing( true ).
offset = this.surface.getOffsetFromEventCoords( e.originalEvent 
);
if ( offset !== -1 ) {
-   // Don't change selection in setEditing to avoid 
scrolling to bottom of cell
-   this.setEditing( true, true );
// Set selection to where the double click happened
this.surface.getModel().setLinearSelection( new 
ve.Range( offset ) );
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a4056a8daa9f41a35f98161118e4b352af27ba4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: DLynch 
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 npm entry point - change (mediawiki...ArticleIndex)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277109

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I7d0f066467b0f043836807f89448c2b1d7be3765
---
A .jshintignore
A .jshintrc
A Gruntfile.js
A package.json
4 files changed, 66 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleIndex 
refs/changes/09/277109/1

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..04c3a97
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,23 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "freeze": true,
+   "latedef": "nofunc",
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+   "strict": false,
+
+   // Relaxing
+   "es5": false,
+
+   // Environment
+   "browser": true,
+   "jquery": true,
+
+   "globals": {
+   "mediaWiki": false
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..ec97d7b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,12 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d0f066467b0f043836807f89448c2b1d7be3765
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleIndex
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [ArticleCreationWorkflow] Archive extension - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277108

Change subject: [ArticleCreationWorkflow] Archive extension
..

[ArticleCreationWorkflow] Archive extension

Requires I9320997628e9ba28eda203309ba052f17ac77b9e

Change-Id: I641a61e87f099e533fe6d5d2137df40d3e0f1c70
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/08/277108/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..e693ab9 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3999,8 +3999,7 @@
 
   - name: mediawiki/extensions/ArticleCreationWorkflow
 template:
-  - name: jsonlint
-  - name: extension-unittests-generic
+  - name: archived
 
   - name: mediawiki/extensions/ArticleIndex
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I641a61e87f099e533fe6d5d2137df40d3e0f1c70
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...ArticleCreationWorkflow)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277107

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I9320997628e9ba28eda203309ba052f17ac77b9e
---
A .jshintignore
A .jshintrc
A Gruntfile.js
A package.json
4 files changed, 66 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleCreationWorkflow 
refs/changes/07/277107/1

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..04c3a97
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,23 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "freeze": true,
+   "latedef": "nofunc",
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+   "strict": false,
+
+   // Relaxing
+   "es5": false,
+
+   // Environment
+   "browser": true,
+   "jquery": true,
+
+   "globals": {
+   "mediaWiki": false
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..ec97d7b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,12 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9320997628e9ba28eda203309ba052f17ac77b9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleCreationWorkflow
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [ApiSVGProxy] Archive repo - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277106

Change subject: [ApiSVGProxy] Archive repo
..

[ApiSVGProxy] Archive repo

See I2b4ba8fdb058009fc18fa80b12f345ee77da3e7c

Change-Id: I9332eb6dc639548e5a66a77b70df2979effc1e45
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/06/277106/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..c28e626 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3995,7 +3995,7 @@
 
   - name: mediawiki/extensions/ApiSVGProxy
 template:
-  - name: extension-unittests-generic
+  - name: archived
 
   - name: mediawiki/extensions/ArticleCreationWorkflow
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9332eb6dc639548e5a66a77b70df2979effc1e45
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [ApiExplorer] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277105

Change subject: [ApiExplorer] Add npm test
..

[ApiExplorer] Add npm test

Also move jsonlint to check and add jshint to check: for non-whitelisted
users.

Requires If49cdfd2916a37659c8460c40242b16eef0d75fc

Change-Id: Iae135692f06b7b9d7fd0cf08e467d89dc72a1932
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/05/277105/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..e1e7765 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3981,8 +3981,11 @@
 
   - name: mediawiki/extensions/ApiExplorer
 template:
-  - name: jsonlint
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/ApiFeatureUsage
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae135692f06b7b9d7fd0cf08e467d89dc72a1932
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Ensure table cells are ce=true before computing offsets - change (VisualEditor/VisualEditor)

2016-03-13 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277104

Change subject: Ensure table cells are ce=true before computing offsets
..

Ensure table cells are ce=true before computing offsets

Firefox won't return an offset inside ce=false, and thus
breaks double-click to edit.

Bug: T128282
Change-Id: I0a4056a8daa9f41a35f98161118e4b352af27ba4
---
M src/ce/nodes/ve.ce.TableNode.js
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/04/277104/1

diff --git a/src/ce/nodes/ve.ce.TableNode.js b/src/ce/nodes/ve.ce.TableNode.js
index 437103e..e1d1a21 100644
--- a/src/ce/nodes/ve.ce.TableNode.js
+++ b/src/ce/nodes/ve.ce.TableNode.js
@@ -104,10 +104,12 @@
return;
}
if ( this.surface.getModel().getSelection() instanceof 
ve.dm.TableSelection ) {
+   // Don't change selection in setEditing to avoid scrolling to 
bottom of cell
+   this.setEditing( true, true );
+   // getOffsetFromEventCoords doesn't work in ce=false in 
Firefox, so ensure
+   // this is called after setEditing( true ).
offset = this.surface.getOffsetFromEventCoords( e.originalEvent 
);
if ( offset !== -1 ) {
-   // Don't change selection in setEditing to avoid 
scrolling to bottom of cell
-   this.setEditing( true, true );
// Set selection to where the double click happened
this.surface.getModel().setLinearSelection( new 
ve.Range( offset ) );
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a4056a8daa9f41a35f98161118e4b352af27ba4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...ApiExplorer)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277103

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: If49cdfd2916a37659c8460c40242b16eef0d75fc
---
A .jshintignore
A .jshintrc
A Gruntfile.js
A package.json
4 files changed, 66 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApiExplorer 
refs/changes/03/277103/1

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..04c3a97
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,23 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "freeze": true,
+   "latedef": "nofunc",
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+   "strict": false,
+
+   // Relaxing
+   "es5": false,
+
+   // Environment
+   "browser": true,
+   "jquery": true,
+
+   "globals": {
+   "mediaWiki": false
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..ec97d7b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,12 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If49cdfd2916a37659c8460c40242b16eef0d75fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiExplorer
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AnchorHandler] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277102

Change subject: [AnchorHandler] Add npm test
..

[AnchorHandler] Add npm test

Also add jsonlint to check: for non-whitelisted users.

Requires I99c855cbb4e0edec3ef63b3dd4db0a02268c77fe

Change-Id: I24433b5f7cac6ddf6f97ab687ada4b98b91db165
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/02/277102/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..1e265ca 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3978,6 +3978,9 @@
   - name: mediawiki/extensions/AnchorHandler
 template:
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/ApiExplorer
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24433b5f7cac6ddf6f97ab687ada4b98b91db165
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...AnchorHandler)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277101

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I99c855cbb4e0edec3ef63b3dd4db0a02268c77fe
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AnchorHandler 
refs/changes/01/277101/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99c855cbb4e0edec3ef63b3dd4db0a02268c77fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AnchorHandler
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AllTimeZones] Add jsonlint to check: - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277100

Change subject: [AllTimeZones] Add jsonlint to check:
..

[AllTimeZones] Add jsonlint to check:

Change-Id: I059823f17dd679b2051d3bc96ce4be15128ea18f
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/00/277100/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..2e97418 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3974,6 +3974,8 @@
   - name: composer-test
   - name: extension-unittests-generic
   - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/AnchorHandler
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I059823f17dd679b2051d3bc96ce4be15128ea18f
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AkismetKlik] Add jsonlint to check: - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277099

Change subject: [AkismetKlik] Add jsonlint to check:
..

[AkismetKlik] Add jsonlint to check:

Change-Id: I346ad19b7d6be7a6bdd232e813eb300437f33050
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/99/277099/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..ddd01c9 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3968,6 +3968,8 @@
   - name: composer-test
   - name: extension-unittests-generic
   - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/AllTimeZones
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I346ad19b7d6be7a6bdd232e813eb300437f33050
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AdvancedMeta] Add jsonlint to check: - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277098

Change subject: [AdvancedMeta] Add jsonlint to check:
..

[AdvancedMeta] Add jsonlint to check:

Change-Id: I842cc7492c5fcc0725b5ce9d01bc7a5687652d07
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/98/277098/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..86aef97 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3944,6 +3944,8 @@
   - name: composer-test
   - name: extension-unittests-generic
   - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/AjaxLogin
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I842cc7492c5fcc0725b5ce9d01bc7a5687652d07
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 1a0733c..6b3ed57 - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 1a0733c..6b3ed57
..


Syncronize VisualEditor: 1a0733c..6b3ed57

Change-Id: Ied86aea9140b117d3e24769a56c078cf750e972a
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 1a0733c..6b3ed57 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 1a0733c4f28a25dd883232541565f7f5703e17c7
+Subproject commit 6b3ed57eedda7763539a924b0b0faca2e677cff5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied86aea9140b117d3e24769a56c078cf750e972a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 1a0733c..6b3ed57 - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277097

Change subject: Syncronize VisualEditor: 1a0733c..6b3ed57
..

Syncronize VisualEditor: 1a0733c..6b3ed57

Change-Id: Ied86aea9140b117d3e24769a56c078cf750e972a
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/97/277097/1

diff --git a/VisualEditor b/VisualEditor
index 1a0733c..6b3ed57 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 1a0733c4f28a25dd883232541565f7f5703e17c7
+Subproject commit 6b3ed57eedda7763539a924b0b0faca2e677cff5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied86aea9140b117d3e24769a56c078cf750e972a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (5f451d2) - change (mediawiki...VisualEditor)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update VE core submodule to master (5f451d2)
..


Update VE core submodule to master (5f451d2)

New changes:
1c654c0 AnnotationContextItem: refactor applying a change to the annotation
ea2b30f Localisation updates from https://translatewiki.net.
5f451d2 CommandHelpDialog: Use this.constructor.static

Change-Id: I5bde122199920ffb986fbffbc46ea6e3369a59e3
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index bf1f2cc..5f451d2 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit bf1f2ccec72516162ec147babd63fb5ef3d904cc
+Subproject commit 5f451d2718fb104863972192e0bd4a86b92b126f

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bde122199920ffb986fbffbc46ea6e3369a59e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [IMPR] default parameter for Options.format() may be optional - change (pywikibot/core)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [IMPR] default parameter for Options.format() may be optional
..


[IMPR] default parameter for Options.format() may be optional

- change default parameter from mandatory positional
  to predefined named parameter. All format() methods
  are able to use None as default parameter.
- Some tests added

Change-Id: I8a329ee88ed5d1f46ea896eb1dc2767ddd8896c9
---
M pywikibot/bot_choice.py
M tests/ui_options_tests.py
2 files changed, 25 insertions(+), 13 deletions(-)

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



diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py
index af5bc28..6be7704 100755
--- a/pywikibot/bot_choice.py
+++ b/pywikibot/bot_choice.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Choices for input_choice."""
 #
-# (C) Pywikibot team, 2015
+# (C) Pywikibot team, 2015-2016
 #
 # Distributed under the terms of the MIT license.
 #
@@ -18,7 +18,7 @@
 A basic option for input_choice.
 
 The following methods need to be implemented:
-* format(default)
+* format(default=None)
 * result(value)
 * test(value)
 
@@ -37,11 +37,11 @@
 self._stop = stop
 
 @staticmethod
-def formatted(text, options, default):
+def formatted(text, options, default=None):
 """Create a text with the options formatted into it."""
 formatted_options = []
 for option in options:
-formatted_options.append(option.format(default))
+formatted_options.append(option.format(default=default))
 return '{0} ({1})'.format(text, ', '.join(formatted_options))
 
 @property
@@ -60,7 +60,7 @@
 else:
 return None
 
-def format(self, default):
+def format(self, default=None):
 """Return a formatted string for that option."""
 raise NotImplementedError()
 
@@ -103,7 +103,7 @@
 self.option = option
 self.shortcut = shortcut.lower()
 
-def format(self, default):
+def format(self, default=None):
 """Return a formatted string for that option."""
 index = self.option.lower().find(self.shortcut)
 shortcut = self.shortcut
@@ -154,10 +154,10 @@
 self.description = description
 self.options = options
 
-def format(self, default):
+def format(self, default=None):
 """Return a formatted string for that option."""
-self._output = Option.formatted(self.description, self.options, 
default)
-return super(NestedOption, self).format(default)
+self._output = Option.formatted(self.description, self.options)
+return super(NestedOption, self).format(default=default)
 
 def handled(self, value):
 """Return itself if it applies or the appling sub option."""
@@ -210,7 +210,7 @@
 """Return the upper bound of the range of allowed values."""
 return self._max
 
-def format(self, default):
+def format(self, default=None):
 """Return a formatted string showing the range."""
 if default is not None and self.test(default):
 value = self.parse(default)
@@ -292,12 +292,12 @@
 raise ValueError('The sequence is empty.')
 del self._max
 
-def format(self, default):
+def format(self, default=None):
 """Return a string showing the range."""
 if not self._list:
 raise ValueError('The sequence is empty.')
 else:
-return super(ListOption, self).format(default)
+return super(ListOption, self).format(default=default)
 
 @property
 def maximum(self):
diff --git a/tests/ui_options_tests.py b/tests/ui_options_tests.py
index 6c145a2..e83ed9b 100644
--- a/tests/ui_options_tests.py
+++ b/tests/ui_options_tests.py
@@ -39,7 +39,10 @@
 self.assertEqual(option.shortcut, 't')
 self.assertEqual(option.shortcut, option.result(None))
 self.assertEqual(option.format(None), '[t]est')
+self.assertEqual(option.format(), '[t]est')
+self.assertEqual(option.format(default=None), '[t]est')
 self.assertEqual(option.format('t'), '[T]est')
+self.assertEqual(option.format(default='t'), '[T]est')
 self.assertTrue(option.test('Test'))
 self.assertTrue(option.test('t'))
 self.assertTrue(option.test('T'))
@@ -47,13 +50,16 @@
 self.assertIs(option.handled('T'), option)
 self.assertIsNone(option.handled('?'))
 self.assertEqual(message('?', [option], None), '? ([t]est)')
+self.assertEqual(message('?', [option]), '? ([t]est)')
 self.assertEqual(message('?', [option], 't'), '? ([T]est)')
+self.assertEqual(message('?', [option], default='t'), '? ([T]est)')
 
 def test_Nested(self):
 """Test NestedOption."""
 standard = bot.StandardOption('Test', 'T')
 option = 

[MediaWiki-commits] [Gerrit] Introduce LanguageDirectionalityLookup - change (mediawiki...Wikibase)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Introduce LanguageDirectionalityLookup
..


Introduce LanguageDirectionalityLookup

Change-Id: Icbf9b6c7b0dca72bb1aff49c3db1e9de0c50ec03
---
A repo/includes/MediaWikiLanguageDirectionalityLookup.php
M repo/includes/WikibaseRepo.php
M view/src/EntityView.php
M view/src/ItemView.php
A view/src/LanguageDirectionalityLookup.php
M view/src/PropertyView.php
M view/src/ViewFactory.php
M view/tests/phpunit/ItemViewTest.php
M view/tests/phpunit/PropertyViewTest.php
M view/tests/phpunit/ViewFactoryTest.php
10 files changed, 95 insertions(+), 30 deletions(-)

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



diff --git a/repo/includes/MediaWikiLanguageDirectionalityLookup.php 
b/repo/includes/MediaWikiLanguageDirectionalityLookup.php
new file mode 100644
index 000..cf582f8
--- /dev/null
+++ b/repo/includes/MediaWikiLanguageDirectionalityLookup.php
@@ -0,0 +1,26 @@
+
+ */
+class MediaWikiLanguageDirectionalityLookup implements 
LanguageDirectionalityLookup {
+
+   /**
+* @see LanguageDirectionalityLookup::getDirectionality
+*/
+   public function getDirectionality( $languageCode ) {
+   return Language::factory( $languageCode )->getDir();
+   }
+
+}
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index c912ea8..b4acc90 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -1536,6 +1536,7 @@
$this->getDataTypeFactory(),
TemplateFactory::getDefaultInstance(),
new LanguageNameLookup( $wgLang->getCode() ),
+   new MediaWikiLanguageDirectionalityLookup(),
$this->settings->getSetting( 'siteLinkGroups' ),
$this->settings->getSetting( 'specialSiteLinkGroups' ),
$this->settings->getSetting( 'badgeItems' )
diff --git a/view/src/EntityView.php b/view/src/EntityView.php
index a7e10d7..14a95b4 100644
--- a/view/src/EntityView.php
+++ b/view/src/EntityView.php
@@ -2,7 +2,6 @@
 
 namespace Wikibase\View;
 
-use Language;
 use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Term\FingerprintProvider;
@@ -38,9 +37,14 @@
private $entityTermsView;
 
/**
-* @var Language
+* @var LanguageDirectionalityLookup
 */
-   protected $language;
+   private $languageDirectionalityLookup;
+
+   /**
+* @var string
+*/
+   protected $languageCode;
 
/**
 * @var TextInjector
@@ -50,15 +54,18 @@
/**
 * @param TemplateFactory $templateFactory
 * @param EntityTermsView $entityTermsView
-* @param Language $language
+* @param LanguageDirectionalityLookup $languageDirectionalityLookup
+* @param string $languageCode
 */
public function __construct(
TemplateFactory $templateFactory,
EntityTermsView $entityTermsView,
-   Language $language
+   LanguageDirectionalityLookup $languageDirectionalityLookup,
+   $languageCode
) {
$this->entityTermsView = $entityTermsView;
-   $this->language = $language;
+   $this->languageDirectionalityLookup = 
$languageDirectionalityLookup;
+   $this->languageCode = $languageCode;
 
$this->textInjector = new TextInjector();
$this->templateFactory = $templateFactory;
@@ -96,8 +103,8 @@
$html = $this->templateFactory->render( 'wikibase-entityview',
$entity->getType(),
$entityId,
-   $this->language->getCode(),
-   $this->language->getDir(),
+   $this->languageCode,
+   $this->languageDirectionalityLookup->getDirectionality( 
$this->languageCode ) ?: 'auto',
$this->getMainHtml( $entityRevision ),
$this->getSideHtml( $entity )
);
diff --git a/view/src/ItemView.php b/view/src/ItemView.php
index 90bbad9..f0409f6 100644
--- a/view/src/ItemView.php
+++ b/view/src/ItemView.php
@@ -3,7 +3,6 @@
 namespace Wikibase\View;
 
 use InvalidArgumentException;
-use Language;
 use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\EntityRevision;
@@ -41,20 +40,22 @@
 *
 * @param TemplateFactory $templateFactory
 * @param EntityTermsView $entityTermsView
+* @param LanguageDirectionalityLookup $languageDirectionalityLookup
 * @param StatementSectionsView $statementSectionsView
-* @param Language $language
+* @param string $languageCode
 * @param 

[MediaWiki-commits] [Gerrit] [Captcha Edit] Add new key to ignore - change (translatewiki)

2016-03-13 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [Captcha Edit] Add new key to ignore
..


[Captcha Edit] Add new key to ignore

https://gerrit.wikimedia.org/r/#/c/275528/

Change-Id: I9369556928dc8c3f3b098031a616f4262dfaa6e6
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 9425f77..8d60b7e 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -671,6 +671,7 @@
 file = ConfirmEdit/i18n/%CODE%.json
 aliasfile = ConfirmEdit/ConfirmEdit.alias.php
 descmsg = captcha-desc
+ignored = captcha-ip-whitelist
 
 ConfirmEdit Fancy Captcha
 file = ConfirmEdit/FancyCaptcha/i18n/%CODE%.json
@@ -2253,6 +2254,8 @@
 Special 404
 aliasfile = Special404/Special404.alias.php
 
+# Special Namespaces // No i18n in JSON format, unmaintained code
+
 Spelling Api
 
 # Spelling Dictionary // 2016-03-08: Inconsistent/no message prefix

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9369556928dc8c3f3b098031a616f4262dfaa6e6
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [Captcha Edit] Add new key to ignore - change (translatewiki)

2016-03-13 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277096

Change subject: [Captcha Edit] Add new key to ignore
..

[Captcha Edit] Add new key to ignore

https://gerrit.wikimedia.org/r/#/c/275528/

Change-Id: I9369556928dc8c3f3b098031a616f4262dfaa6e6
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/96/277096/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 9425f77..8d60b7e 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -671,6 +671,7 @@
 file = ConfirmEdit/i18n/%CODE%.json
 aliasfile = ConfirmEdit/ConfirmEdit.alias.php
 descmsg = captcha-desc
+ignored = captcha-ip-whitelist
 
 ConfirmEdit Fancy Captcha
 file = ConfirmEdit/FancyCaptcha/i18n/%CODE%.json
@@ -2253,6 +2254,8 @@
 Special 404
 aliasfile = Special404/Special404.alias.php
 
+# Special Namespaces // No i18n in JSON format, unmaintained code
+
 Spelling Api
 
 # Spelling Dictionary // 2016-03-08: Inconsistent/no message prefix

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9369556928dc8c3f3b098031a616f4262dfaa6e6
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AdManager] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277095

Change subject: [AdManager] Add npm test
..

[AdManager] Add npm test

Also add jsonlint to check: for non-whitelisted users.

See I37dc46ec291bc57d954c9effd79744cb3942d31c

Change-Id: I7e2d9bd497a13875ab411476de9da2fc6b40331b
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/95/277095/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..4bb4d68 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3928,8 +3928,11 @@
 
   - name: mediawiki/extensions/AdManager
 template:
-  - name: extension-unittests-generic
   - name: composer-test
+  - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/Ads
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e2d9bd497a13875ab411476de9da2fc6b40331b
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AddThis] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277094

Change subject: [AddThis] Add npm test
..

[AddThis] Add npm test

Also add jsonlint to check: for non-whitelisted users.

See I1a33fd8a94bd95315d7ce127e4b33a50870edc0e

Change-Id: I352c957bed8c1b9e16f0cf57bf117ee568d6fe48
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/94/277094/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..4164f1e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3923,8 +3923,11 @@
 
   - name: mediawiki/extensions/AddThis
 template:
-  - name: extension-unittests-generic
   - name: composer-test
+  - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/AdManager
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I352c957bed8c1b9e16f0cf57bf117ee568d6fe48
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AddHTMLMetaAndTitle] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277093

Change subject: [AddHTMLMetaAndTitle] Add npm test
..

[AddHTMLMetaAndTitle] Add npm test

Also add jsonlint to check: for non-whitelisted users.

See Ie93537f316655523db5f8b396003efdbdbfad459

Change-Id: I77c28f2febe0a71c26794fe486e69656ad2fd8f9
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/93/277093/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..1568b4e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3917,9 +3917,11 @@
 
   - name: mediawiki/extensions/AddHTMLMetaAndTitle
 template:
-  - name: jsonlint
-  - name: extension-unittests-generic
   - name: composer-test
+  - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/AddThis
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77c28f2febe0a71c26794fe486e69656ad2fd8f9
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [ActionEditSubmit] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277092

Change subject: [ActionEditSubmit] Add npm test
..

[ActionEditSubmit] Add npm test

Also add jsonlint to check: for non-whitelisted users.

Requires Idd8c5212547c38dc0adb8e0cf5f6db144352aefd

Change-Id: I6f3a54b58d1baeb86c0c95c3db920935bfaff9db
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/92/277092/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..326e7d4 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3914,6 +3914,9 @@
 template:
   - name: composer-test
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/AddHTMLMetaAndTitle
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f3a54b58d1baeb86c0c95c3db920935bfaff9db
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Upgrade to Support 23.2.1, without functional changes. - change (apps...wikipedia)

2016-03-13 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277091

Change subject: Upgrade to Support 23.2.1, without functional changes.
..

Upgrade to Support 23.2.1, without functional changes.

The only necessary workarounds I had to make have to do with the system
bar, and the inability to set its flags via styles. It looks like the
"windowTranslucentStatus" and "windowFullScreen" flags no longer work when
set via an inherited theme, so I'm setting them in the code.

Bug: T128126
Change-Id: I5d231a113e36d8acec973fc4a9f0ece2eaa58d7e
---
M app/build.gradle
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java
3 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/91/277091/1

diff --git a/app/build.gradle b/app/build.gradle
index 1ce8236..f574c7b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -164,7 +164,7 @@
 // Debug with ./gradlew -q app:dependencies --configuration compile
 
 String okHttpVersion = '2.7.0'
-String supportVersion = '23.1.1'
+String supportVersion = '23.2.1'
 String espressoVersion = '2.2.1'
 
 compile "com.android.support:appcompat-v7:$supportVersion" // includes 
support-v4
diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index 4753d28..b3ba2e6 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -72,6 +72,7 @@
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.WindowManager;
 import android.widget.ProgressBar;
 import android.widget.TextView;
 
@@ -190,6 +191,10 @@
 app = (WikipediaApp) getApplicationContext();
 app.checkCrashes(this);
 
+if (ApiUtil.hasKitKat()) {
+
getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, 
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+}
+
 PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
 setContentView(R.layout.activity_page);
 
diff --git a/app/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java 
b/app/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java
index e89a2ec..fc12089 100644
--- a/app/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java
+++ b/app/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java
@@ -37,6 +37,7 @@
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowManager;
 import android.widget.ImageView;
 import android.widget.ProgressBar;
 import android.widget.TextView;
@@ -126,6 +127,8 @@
 app = (WikipediaApp)getApplicationContext();
 downloadReceiver = new MediaDownloadReceiver(this);
 
+getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
WindowManager.LayoutParams.FLAG_FULLSCREEN);
+
 setContentView(R.layout.activity_gallery);
 final Toolbar toolbar = (Toolbar) findViewById(R.id.gallery_toolbar);
 // give it a gradient background

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d231a113e36d8acec973fc4a9f0ece2eaa58d7e
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...ActionEditSubmit)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277090

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Idd8c5212547c38dc0adb8e0cf5f6db144352aefd
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ActionEditSubmit 
refs/changes/90/277090/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd8c5212547c38dc0adb8e0cf5f6db144352aefd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ActionEditSubmit
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add nltk data - change (research...wheels)

2016-03-13 Thread Ladsgroup (Code Review)
Ladsgroup has submitted this change and it was merged.

Change subject: Add nltk data
..


Add nltk data

Change-Id: Ie36018bf59f459e79d940465ea55c6682c9e4ba3
---
A nltk/corpora/omw/LICENSE
A nltk/corpora/omw/README
A nltk/corpora/omw/als/LICENSE
A nltk/corpora/omw/als/README
A nltk/corpora/omw/als/citation.bib
A nltk/corpora/omw/als/wn-data-als.tab
A nltk/corpora/omw/arb/LICENSE
A nltk/corpora/omw/arb/README
A nltk/corpora/omw/arb/citation.bib
A nltk/corpora/omw/arb/wn-data-arb.tab
A nltk/corpora/omw/bul/LICENSE
A nltk/corpora/omw/bul/README
A nltk/corpora/omw/bul/citation.bib
A nltk/corpora/omw/bul/wn-data-bul.tab
A nltk/corpora/omw/cat/LICENSE
A nltk/corpora/omw/cat/citation.bib
A nltk/corpora/omw/cat/wn-data-cat.tab
A nltk/corpora/omw/citation.bib
A nltk/corpora/omw/cmn/LICENSE
A nltk/corpora/omw/cmn/citation.bib
A nltk/corpora/omw/cmn/wn-data-cmn.tab
A nltk/corpora/omw/dan/LICENSE
A nltk/corpora/omw/dan/citation.bib
A nltk/corpora/omw/dan/wn-data-dan.tab
A nltk/corpora/omw/ell/LICENSE
A nltk/corpora/omw/ell/README
A nltk/corpora/omw/ell/citation.bib
A nltk/corpora/omw/ell/wn-data-ell.tab
A nltk/corpora/omw/eus/LICENSE
A nltk/corpora/omw/eus/citation.bib
A nltk/corpora/omw/eus/wn-data-eus.tab
A nltk/corpora/omw/fas/LICENSE
A nltk/corpora/omw/fas/citation.bib
A nltk/corpora/omw/fas/wn-data-fas.tab
A nltk/corpora/omw/fin/LICENSE
A nltk/corpora/omw/fin/citation.bib
A nltk/corpora/omw/fin/wn-data-fin.tab
A nltk/corpora/omw/fra/LICENSE
A nltk/corpora/omw/fra/citation.bib
A nltk/corpora/omw/fra/wn-data-fra.tab
A nltk/corpora/omw/glg/LICENSE
A nltk/corpora/omw/glg/citation.bib
A nltk/corpora/omw/glg/wn-data-glg.tab
A nltk/corpora/omw/heb/LICENSE
A nltk/corpora/omw/heb/README
A nltk/corpora/omw/heb/citation.bib
A nltk/corpora/omw/heb/wn-data-heb.tab
A nltk/corpora/omw/hrv/LICENSE
A nltk/corpora/omw/hrv/README
A nltk/corpora/omw/hrv/citation.bib
A nltk/corpora/omw/hrv/wn-data-hrv.tab
A nltk/corpora/omw/ind/LICENSE
A nltk/corpora/omw/ind/README
A nltk/corpora/omw/ind/citation.bib
A nltk/corpora/omw/ind/wn-data-ind.tab
A nltk/corpora/omw/ita/LICENSE
A nltk/corpora/omw/ita/README
A nltk/corpora/omw/ita/citation.bib
A nltk/corpora/omw/ita/wn-data-ita.tab
A nltk/corpora/omw/jpn/LICENSE
A nltk/corpora/omw/jpn/README
A nltk/corpora/omw/jpn/citation.bib
A nltk/corpora/omw/jpn/wn-data-jpn.tab
A nltk/corpora/omw/nno/LICENSE
A nltk/corpora/omw/nno/README
A nltk/corpora/omw/nno/citation.bib
A nltk/corpora/omw/nno/wn-data-nno.tab
A nltk/corpora/omw/nob/LICENSE
A nltk/corpora/omw/nob/README
A nltk/corpora/omw/nob/citation.bib
A nltk/corpora/omw/nob/wn-data-nob.tab
A nltk/corpora/omw/pol/LICENSE
A nltk/corpora/omw/pol/citation.bib
A nltk/corpora/omw/pol/wn-data-pol.tab
A nltk/corpora/omw/por/LICENSE
A nltk/corpora/omw/por/README
A nltk/corpora/omw/por/citation.bib
A nltk/corpora/omw/por/wn-data-por.tab
A nltk/corpora/omw/qcn/LICENSE
A nltk/corpora/omw/qcn/citation.bib
A nltk/corpora/omw/qcn/wn-data-qcn.tab
A nltk/corpora/omw/slv/LICENSE
A nltk/corpora/omw/slv/README
A nltk/corpora/omw/slv/citation.bib
A nltk/corpora/omw/slv/wn-data-slv.tab
A nltk/corpora/omw/spa/LICENSE
A nltk/corpora/omw/spa/citation.bib
A nltk/corpora/omw/spa/wn-data-spa.tab
A nltk/corpora/omw/swe/LICENSE
A nltk/corpora/omw/swe/README
A nltk/corpora/omw/swe/citation.bib
A nltk/corpora/omw/swe/wn-data-swe.tab
A nltk/corpora/omw/tha/LICENSE
A nltk/corpora/omw/tha/citation.bib
A nltk/corpora/omw/tha/wn-data-tha.tab
A nltk/corpora/omw/zsm/LICENSE
A nltk/corpora/omw/zsm/README
A nltk/corpora/omw/zsm/citation.bib
A nltk/corpora/omw/zsm/wn-data-zsm.tab
A nltk/corpora/stopwords/README
A nltk/corpora/stopwords/danish
A nltk/corpora/stopwords/dutch
A nltk/corpora/stopwords/english
A nltk/corpora/stopwords/finnish
A nltk/corpora/stopwords/french
A nltk/corpora/stopwords/german
A nltk/corpora/stopwords/hungarian
A nltk/corpora/stopwords/italian
A nltk/corpora/stopwords/norwegian
A nltk/corpora/stopwords/portuguese
A nltk/corpora/stopwords/russian
A nltk/corpora/stopwords/spanish
A nltk/corpora/stopwords/swedish
A nltk/corpora/stopwords/turkish
A nltk/corpora/wordnet/LICENSE
A nltk/corpora/wordnet/README
A nltk/corpora/wordnet/adj.exc
A nltk/corpora/wordnet/adv.exc
A nltk/corpora/wordnet/citation.bib
A nltk/corpora/wordnet/cntlist.rev
A nltk/corpora/wordnet/data.adj
A nltk/corpora/wordnet/data.adv
A nltk/corpora/wordnet/data.noun
A nltk/corpora/wordnet/data.verb
A nltk/corpora/wordnet/index.adj
A nltk/corpora/wordnet/index.adv
A nltk/corpora/wordnet/index.noun
A nltk/corpora/wordnet/index.sense
A nltk/corpora/wordnet/index.verb
A nltk/corpora/wordnet/lexnames
A nltk/corpora/wordnet/noun.exc
A nltk/corpora/wordnet/verb.exc
132 files changed, 2,019,383 insertions(+), 0 deletions(-)

Approvals:
  Ladsgroup: Verified; Looks good to me, approved




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

Gerrit-MessageType: merged

[MediaWiki-commits] [Gerrit] Add nltk data - change (research...wheels)

2016-03-13 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277089

Change subject: Add nltk data
..

Add nltk data

Change-Id: Ie36018bf59f459e79d940465ea55c6682c9e4ba3
---
A nltk/corpora/omw/LICENSE
A nltk/corpora/omw/README
A nltk/corpora/omw/als/LICENSE
A nltk/corpora/omw/als/README
A nltk/corpora/omw/als/citation.bib
A nltk/corpora/omw/als/wn-data-als.tab
A nltk/corpora/omw/arb/LICENSE
A nltk/corpora/omw/arb/README
A nltk/corpora/omw/arb/citation.bib
A nltk/corpora/omw/arb/wn-data-arb.tab
A nltk/corpora/omw/bul/LICENSE
A nltk/corpora/omw/bul/README
A nltk/corpora/omw/bul/citation.bib
A nltk/corpora/omw/bul/wn-data-bul.tab
A nltk/corpora/omw/cat/LICENSE
A nltk/corpora/omw/cat/citation.bib
A nltk/corpora/omw/cat/wn-data-cat.tab
A nltk/corpora/omw/citation.bib
A nltk/corpora/omw/cmn/LICENSE
A nltk/corpora/omw/cmn/citation.bib
A nltk/corpora/omw/cmn/wn-data-cmn.tab
A nltk/corpora/omw/dan/LICENSE
A nltk/corpora/omw/dan/citation.bib
A nltk/corpora/omw/dan/wn-data-dan.tab
A nltk/corpora/omw/ell/LICENSE
A nltk/corpora/omw/ell/README
A nltk/corpora/omw/ell/citation.bib
A nltk/corpora/omw/ell/wn-data-ell.tab
A nltk/corpora/omw/eus/LICENSE
A nltk/corpora/omw/eus/citation.bib
A nltk/corpora/omw/eus/wn-data-eus.tab
A nltk/corpora/omw/fas/LICENSE
A nltk/corpora/omw/fas/citation.bib
A nltk/corpora/omw/fas/wn-data-fas.tab
A nltk/corpora/omw/fin/LICENSE
A nltk/corpora/omw/fin/citation.bib
A nltk/corpora/omw/fin/wn-data-fin.tab
A nltk/corpora/omw/fra/LICENSE
A nltk/corpora/omw/fra/citation.bib
A nltk/corpora/omw/fra/wn-data-fra.tab
A nltk/corpora/omw/glg/LICENSE
A nltk/corpora/omw/glg/citation.bib
A nltk/corpora/omw/glg/wn-data-glg.tab
A nltk/corpora/omw/heb/LICENSE
A nltk/corpora/omw/heb/README
A nltk/corpora/omw/heb/citation.bib
A nltk/corpora/omw/heb/wn-data-heb.tab
A nltk/corpora/omw/hrv/LICENSE
A nltk/corpora/omw/hrv/README
A nltk/corpora/omw/hrv/citation.bib
A nltk/corpora/omw/hrv/wn-data-hrv.tab
A nltk/corpora/omw/ind/LICENSE
A nltk/corpora/omw/ind/README
A nltk/corpora/omw/ind/citation.bib
A nltk/corpora/omw/ind/wn-data-ind.tab
A nltk/corpora/omw/ita/LICENSE
A nltk/corpora/omw/ita/README
A nltk/corpora/omw/ita/citation.bib
A nltk/corpora/omw/ita/wn-data-ita.tab
A nltk/corpora/omw/jpn/LICENSE
A nltk/corpora/omw/jpn/README
A nltk/corpora/omw/jpn/citation.bib
A nltk/corpora/omw/jpn/wn-data-jpn.tab
A nltk/corpora/omw/nno/LICENSE
A nltk/corpora/omw/nno/README
A nltk/corpora/omw/nno/citation.bib
A nltk/corpora/omw/nno/wn-data-nno.tab
A nltk/corpora/omw/nob/LICENSE
A nltk/corpora/omw/nob/README
A nltk/corpora/omw/nob/citation.bib
A nltk/corpora/omw/nob/wn-data-nob.tab
A nltk/corpora/omw/pol/LICENSE
A nltk/corpora/omw/pol/citation.bib
A nltk/corpora/omw/pol/wn-data-pol.tab
A nltk/corpora/omw/por/LICENSE
A nltk/corpora/omw/por/README
A nltk/corpora/omw/por/citation.bib
A nltk/corpora/omw/por/wn-data-por.tab
A nltk/corpora/omw/qcn/LICENSE
A nltk/corpora/omw/qcn/citation.bib
A nltk/corpora/omw/qcn/wn-data-qcn.tab
A nltk/corpora/omw/slv/LICENSE
A nltk/corpora/omw/slv/README
A nltk/corpora/omw/slv/citation.bib
A nltk/corpora/omw/slv/wn-data-slv.tab
A nltk/corpora/omw/spa/LICENSE
A nltk/corpora/omw/spa/citation.bib
A nltk/corpora/omw/spa/wn-data-spa.tab
A nltk/corpora/omw/swe/LICENSE
A nltk/corpora/omw/swe/README
A nltk/corpora/omw/swe/citation.bib
A nltk/corpora/omw/swe/wn-data-swe.tab
A nltk/corpora/omw/tha/LICENSE
A nltk/corpora/omw/tha/citation.bib
A nltk/corpora/omw/tha/wn-data-tha.tab
A nltk/corpora/omw/zsm/LICENSE
A nltk/corpora/omw/zsm/README
A nltk/corpora/omw/zsm/citation.bib
A nltk/corpora/omw/zsm/wn-data-zsm.tab
A nltk/corpora/stopwords/README
A nltk/corpora/stopwords/danish
A nltk/corpora/stopwords/dutch
A nltk/corpora/stopwords/english
A nltk/corpora/stopwords/finnish
A nltk/corpora/stopwords/french
A nltk/corpora/stopwords/german
A nltk/corpora/stopwords/hungarian
A nltk/corpora/stopwords/italian
A nltk/corpora/stopwords/norwegian
A nltk/corpora/stopwords/portuguese
A nltk/corpora/stopwords/russian
A nltk/corpora/stopwords/spanish
A nltk/corpora/stopwords/swedish
A nltk/corpora/stopwords/turkish
A nltk/corpora/wordnet/LICENSE
A nltk/corpora/wordnet/README
A nltk/corpora/wordnet/adj.exc
A nltk/corpora/wordnet/adv.exc
A nltk/corpora/wordnet/citation.bib
A nltk/corpora/wordnet/cntlist.rev
A nltk/corpora/wordnet/data.adj
A nltk/corpora/wordnet/data.adv
A nltk/corpora/wordnet/data.noun
A nltk/corpora/wordnet/data.verb
A nltk/corpora/wordnet/index.adj
A nltk/corpora/wordnet/index.adv
A nltk/corpora/wordnet/index.noun
A nltk/corpora/wordnet/index.sense
A nltk/corpora/wordnet/index.verb
A nltk/corpora/wordnet/lexnames
A nltk/corpora/wordnet/noun.exc
A nltk/corpora/wordnet/verb.exc
132 files changed, 2,019,383 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/89/277089/1


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

[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...Patroller)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add npm entry point
..


Add npm entry point

Change-Id: Ic5604a1692d3160ed68c57ec676be197876ef18a
---
A Gruntfile.js
A package.json
2 files changed, 30 insertions(+), 0 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..545b62a
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   // grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   /* banana: {
+   all: 'i18n/'
+   }, */
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint' /* 'banana' */ ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..1819ae0
--- /dev/null
+++ b/package.json
@@ -0,0 +1,10 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5604a1692d3160ed68c57ec676be197876ef18a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Patroller
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Cblair91 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Lazyload map marker popup content - change (wikidata...gui)

2016-03-13 Thread Jonas Kress (WMDE) (Code Review)
Jonas Kress (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277088

Change subject: Lazyload map marker popup content
..

Lazyload map marker popup content

Change-Id: I8b53b757f186a94eca1d07e9bfc38c5147cfed2e
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 10 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/88/277088/1

diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index fb71ee9..2ba9668 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -82,16 +82,21 @@
if( !longLat[0] || !longLat[1] || 
isNaN( longLat[0] ) ){
return true;
}
-   var info = self._getItemDescription( rowKey );
 
-   markers.push(
-   L.circle( [ longLat[0], 
longLat[1] ], 50, {
+   var popup = L.popup(),
+   marker = L.circle( [ longLat[0], 
longLat[1] ], 50, {
color: '#e04545',
opacity: 0.9,
fillColor: '#e04545',
fillOpacity: 0.9
-   } ).bindPopup( info[0] )
-   );
+   } ).bindPopup( popup );
+
+   marker.on( 'click', function() {
+   var info = self._getItemDescription( 
rowKey );
+   popup.setContent( info[0] );
+   } );
+
+   markers.push( marker );
}
} );
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b53b757f186a94eca1d07e9bfc38c5147cfed2e
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make function accessControlExtension static - change (mediawiki...AccessControl)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277087

Change subject: Make function accessControlExtension static
..

Make function accessControlExtension static

Found in
https://integration.wikimedia.org/ci/job/mediawiki-extensions-qunit/34840/consoleFull

Change-Id: If676108155cbbb712780ed4cbf730063fd406773
---
M AccessControl.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AccessControl 
refs/changes/87/277087/1

diff --git a/AccessControl.hooks.php b/AccessControl.hooks.php
index b78f658..a5d3ce8 100644
--- a/AccessControl.hooks.php
+++ b/AccessControl.hooks.php
@@ -12,7 +12,7 @@
return false;
}
 
-   public function accessControlExtension( Parser $parser ) {
+   public static function accessControlExtension( Parser $parser ) {
/* This the hook function adds the tag  to the 
wiki parser */
$parser->setHook( "accesscontrol", array( &$this, 
"doControlUserAccess" ) );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If676108155cbbb712780ed4cbf730063fd406773
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AccessControl
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AccessControl] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277086

Change subject: [AccessControl] Add npm test
..

[AccessControl] Add npm test

Also move jsonlint to check: for non-whitelisted users.

Requires Idd4744598164dd0ca1942df2f24b705ab23a2823

Change-Id: Icd00f0afc33c03847ff8251f89dd02bc9e125072
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/86/277086/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..50bd19d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3904,7 +3904,9 @@
 template:
   - name: composer-test
   - name: extension-unittests-generic
-  - name: jsonlint
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/AccessibilitySimulation
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd00f0afc33c03847ff8251f89dd02bc9e125072
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...AccessControl)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277085

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Idd4744598164dd0ca1942df2f24b705ab23a2823
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AccessControl 
refs/changes/85/277085/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd4744598164dd0ca1942df2f24b705ab23a2823
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AccessControl
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [AbsenteeLandlord] Add jsonlint to check: - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277084

Change subject: [AbsenteeLandlord] Add jsonlint to check:
..

[AbsenteeLandlord] Add jsonlint to check:

Change-Id: I407ad830566278739b20c5fd664f0dd9e3e60119
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/84/277084/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..ec1dfa2 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3899,6 +3899,8 @@
   - name: composer-test
   - name: extension-unittests-generic
   - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/AccessControl
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I407ad830566278739b20c5fd664f0dd9e3e60119
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [Prezi] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277083

Change subject: [Prezi] Add npm test
..

[Prezi] Add npm test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires I2a9c357825d09a046427f945472c6572c0cd8a09

Change-Id: I84d8384bb1b0ce0a6cf3e20fab608f3c0e2a0006
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/83/277083/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..e02cd3a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3888,9 +3888,10 @@
 
   - name: mediawiki/extensions/Prezi
 template:
-  - name: jshint
-  - name: jsonlint
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
 # Start of new currently disabled extensions checks from mass extension import 
- Addshore
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84d8384bb1b0ce0a6cf3e20fab608f3c0e2a0006
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...Prezi)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277082

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I2a9c357825d09a046427f945472c6572c0cd8a09
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Prezi 
refs/changes/82/277082/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a9c357825d09a046427f945472c6572c0cd8a09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Prezi
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [Patroller] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277081

Change subject: [Patroller] Add npm test
..

[Patroller] Add npm test

Also move jsonlint to check: for non-whitelisted users and remove jshint
since there are no js files.

Requires Ic5604a1692d3160ed68c57ec676be197876ef18a

Change-Id: I9d245f30db9e79b0c2b6a0332d049ccbb2b6475c
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/81/277081/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..6719afe 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3874,9 +3874,10 @@
   - name: mediawiki/extensions/Patroller
 template:
   - name: composer-test
-  - name: jshint
-  - name: jsonlint
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/Petition
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d245f30db9e79b0c2b6a0332d049ccbb2b6475c
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (5f451d2) - change (mediawiki...VisualEditor)

2016-03-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277080

Change subject: Update VE core submodule to master (5f451d2)
..

Update VE core submodule to master (5f451d2)

New changes:
1c654c0 AnnotationContextItem: refactor applying a change to the annotation
ea2b30f Localisation updates from https://translatewiki.net.
5f451d2 CommandHelpDialog: Use this.constructor.static

Change-Id: I5bde122199920ffb986fbffbc46ea6e3369a59e3
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/80/277080/1

diff --git a/lib/ve b/lib/ve
index bf1f2cc..5f451d2 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit bf1f2ccec72516162ec147babd63fb5ef3d904cc
+Subproject commit 5f451d2718fb104863972192e0bd4a86b92b126f

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bde122199920ffb986fbffbc46ea6e3369a59e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...Patroller)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277079

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Ic5604a1692d3160ed68c57ec676be197876ef18a
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Patroller 
refs/changes/79/277079/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5604a1692d3160ed68c57ec676be197876ef18a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Patroller
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add ability to specify device to pullfiles.bash - change (apps...wikipedia)

2016-03-13 Thread Maroloccio (Code Review)
Maroloccio has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277078

Change subject: Add ability to specify device to pullfiles.bash
..

Add ability to specify device to pullfiles.bash

Change-Id: I9e25d7ff6a65c07b280a88ecdfb0a4bb823b3614
---
M scripts/pullfiles.bash
1 file changed, 28 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/78/277078/1

diff --git a/scripts/pullfiles.bash b/scripts/pullfiles.bash
index bdd0f27..b9f9c92 100755
--- a/scripts/pullfiles.bash
+++ b/scripts/pullfiles.bash
@@ -1,3 +1,29 @@
-#!/usr/bin/env bash
+#! /usr/bin/env bash
+
 # Pulls all files from the device and extracts them under app/
-adb backup -noapk org.wikipedia && dd if=backup.ab bs=1 skip=24 | python -c 
"import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar 
-xvf -
+#
+# Allows specifying a device serial number or qualifier
+
+# Python-based decompression, to avoid binary dependencies
+read -r -d '' python_commands <<- 'EOF'
+import zlib
+import sys
+
+sys.stdout.write(zlib.decompress(sys.stdin.read()))
+EOF
+
+device_id=$1
+
+if [[ $device_id ]]; then
+device_specifier="-s $device_id"
+else
+device_specifier=
+fi
+
+adb $device_specifier backup -noapk org.wikipedia \
+&& \
+dd if=backup.ab bs=1 skip=24 \
+\
+| python -c "$python_commands" \
+\
+| tar -xvf -

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e25d7ff6a65c07b280a88ecdfb0a4bb823b3614
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Maroloccio 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [ParserHooks] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277077

Change subject: [ParserHooks] Add npm test
..

[ParserHooks] Add npm test

Also move jsonlint to check: for non-whitelisted users and remove jshint
because there are no js files.

Requires Iba26f725124c9af58b61f11a037979580a18f7a5

Change-Id: I83d88b03dda4d398395cc48184f828aac1ebf1cb
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/77/277077/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..6103f0a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3867,9 +3867,10 @@
   - name: mediawiki/extensions/ParserHooks
 template:
   - name: composer-test
-  - name: jshint
-  - name: jsonlint
   - name: extension-unittests-composer
+  - name: npm
+check:
+  - jsonlint
 
   - name: mediawiki/extensions/Patroller
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83d88b03dda4d398395cc48184f828aac1ebf1cb
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] CommandHelpDialog: Use this.constructor.static - change (VisualEditor/VisualEditor)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: CommandHelpDialog: Use this.constructor.static
..


CommandHelpDialog: Use this.constructor.static

Change-Id: I0c9c3f124c08c5ca1d9d310f15c33cbf82a22cae
---
M src/ui/dialogs/ve.ui.CommandHelpDialog.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/src/ui/dialogs/ve.ui.CommandHelpDialog.js 
b/src/ui/dialogs/ve.ui.CommandHelpDialog.js
index 51987e2..9ad8849 100644
--- a/src/ui/dialogs/ve.ui.CommandHelpDialog.js
+++ b/src/ui/dialogs/ve.ui.CommandHelpDialog.js
@@ -87,7 +87,7 @@
 
platform = ve.getSystemPlatform();
platformKey = platform === 'mac' ? 'mac' : 'pc';
-   commandGroups = ve.ui.CommandHelpDialog.static.commandGroups;
+   commandGroups = this.constructor.static.commandGroups;
 
this.contentLayout = new OO.ui.PanelLayout( {
scrollable: true,
@@ -97,7 +97,7 @@
this.$container = $( '' ).addClass( 
've-ui-commandHelpDialog-container' );
 
for ( i in commandGroups ) {
-   commands = 
ve.ui.CommandHelpDialog.static.sortedCommandsFromGroup( i, commandGroups[ i 
].promote, commandGroups[ i ].demote );
+   commands = this.constructor.static.sortedCommandsFromGroup( i, 
commandGroups[ i ].promote, commandGroups[ i ].demote );
$list = $( '' ).addClass( 've-ui-commandHelpDialog-list' );
for ( j = 0, jLen = commands.length; j < jLen; j++ ) {
if ( commands[ j ].trigger ) {
@@ -119,7 +119,7 @@
$shortcut = $( '' );
for ( k = 0, kLen = triggerList.length; k < kLen; k++ ) 
{
$shortcut.append( $( '' ).append(
-   triggerList[ k ].getMessage( true 
).map( ve.ui.CommandHelpDialog.static.buildKeyNode )
+   triggerList[ k ].getMessage( true 
).map( this.constructor.static.buildKeyNode )
).find( 'kbd + kbd' ).before( '+' ).end() );
}
if ( commands[ j ].sequences ) {
@@ -129,7 +129,7 @@
$shortcut.append( $( '' )
.attr( 'data-label', 
ve.msg( 'visualeditor-shortcuts-sequence-notice' ) )
.append(
-   
sequence.getMessage( true ).map( ve.ui.CommandHelpDialog.static.buildKeyNode )
+   
sequence.getMessage( true ).map( this.constructor.static.buildKeyNode )
)
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c9c3f124c08c5ca1d9d310f15c33cbf82a22cae
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
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 npm entry point - change (mediawiki...ParserHooks)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277076

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Iba26f725124c9af58b61f11a037979580a18f7a5
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserHooks 
refs/changes/76/277076/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba26f725124c9af58b61f11a037979580a18f7a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserHooks
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [PageBlock] Add npm test - change (integration/config)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277075

Change subject: [PageBlock] Add npm test
..

[PageBlock] Add npm test

Also move jsonlint and jshint to check: for non-whitelisted users.

Requires Ica2e26864e7cd6c34b6dd366b3b2c4b5d896bdbd

Change-Id: I5430289ddb1ffad07a44dc498f24859408f22abf
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/75/277075/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1c8cfba..8ff83dd 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3824,9 +3824,11 @@
 
   - name: mediawiki/extensions/PageBlock
 template:
-  - name: jshint
-  - name: jsonlint
   - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/PagedTiffHandler
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5430289ddb1ffad07a44dc498f24859408f22abf
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...PageBlock)

2016-03-13 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277074

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: Ica2e26864e7cd6c34b6dd366b3b2c4b5d896bdbd
---
A .jshintignore
A .jshintrc
A Gruntfile.js
A package.json
4 files changed, 66 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageBlock 
refs/changes/74/277074/1

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..04c3a97
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,23 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "freeze": true,
+   "latedef": "nofunc",
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+   "strict": false,
+
+   // Relaxing
+   "es5": false,
+
+   // Environment
+   "browser": true,
+   "jquery": true,
+
+   "globals": {
+   "mediaWiki": false
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..ec97d7b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,12 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica2e26864e7cd6c34b6dd366b3b2c4b5d896bdbd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageBlock
Gerrit-Branch: master
Gerrit-Owner: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [IMPR] Extend doc form ui.input_choice - change (pywikibot/core)

2016-03-13 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277073

Change subject: [IMPR] Extend doc form ui.input_choice
..

[IMPR] Extend doc form ui.input_choice

- Also allow singleton Option instance for options parameter

Bug: T129777
Change-Id: I72d97d90b7c05bb40c44516cd41bb09ced216618
---
M pywikibot/userinterfaces/terminal_interface_base.py
1 file changed, 13 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/73/277073/1

diff --git a/pywikibot/userinterfaces/terminal_interface_base.py 
b/pywikibot/userinterfaces/terminal_interface_base.py
index 2fbe1a8..4079820 100755
--- a/pywikibot/userinterfaces/terminal_interface_base.py
+++ b/pywikibot/userinterfaces/terminal_interface_base.py
@@ -305,12 +305,15 @@
 
 @param question: The question, without trailing whitespace.
 @type question: basestring
-@param options: All available options. Each entry contains the full
-length answer and a shortcut of only one character. The shortcut
-must not appear in the answer. Alternatively they may be a
-Option (or subclass) instance. ChoiceException instances which have
-a full option and shortcut and will be raised if selected.
-@type options: iterable containing sequences of length 2 or Option
+@param options: Iterable of all available options. Each entry contains
+the full length answer and a shortcut of only one character.
+The shortcut must not appear in the answer.
+Alternatively they may be Option (or subclass) instances or
+ChoiceException instances which have a full option and shortcut
+and will be raised if selected.
+@type options: iterable containing sequences of length 2 or
+iterable containing Option instances or ChoiceException as well.
+Singletons of Option and its subclasses ar also accepted.
 @param default: The default answer if no was entered. None to require
 an answer.
 @type default: basestring
@@ -329,7 +332,10 @@
 """
 if force and default is None:
 raise ValueError('With no default option it cannot be forced')
-options = list(options)
+if isinstance(options, Option):
+options = [options]
+else:  # make a copy
+options = list(options)
 if len(options) == 0:
 raise ValueError(u'No options are given.')
 if automatic_quit:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72d97d90b7c05bb40c44516cd41bb09ced216618
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Switch the canvas to a div layout - change (labs...ptable)

2016-03-13 Thread Tobias47n9e (Code Review)
Tobias47n9e has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277072

Change subject: Switch the canvas to a div layout
..

Switch the canvas to a div layout

Currently the layout of the page relies on tables.
This commit switches the canvas to a responsive
div layout. The legend floats over the canvas on
tablets and desktops. On phones the legend is shown
below the canvas.

Change-Id: I57d92839094f9f0cf6a5947124ed3347c323eeea
---
M static/nuclides.css
M templates/nuclides_common.html
2 files changed, 64 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/ptable 
refs/changes/72/277072/1

diff --git a/static/nuclides.css b/static/nuclides.css
index 13a30b3..82d7a15 100644
--- a/static/nuclides.css
+++ b/static/nuclides.css
@@ -316,3 +316,45 @@
 svg#nuclides text {
font-size: 4px;
 }
+
+.nuclide-canvas {
+   display: block;
+   position: relative;
+}
+
+.nuclide-legend {
+   position: absolute;
+   bottom: 20px;
+   right: 20px;
+   background-color: white;
+   border: 1px solid black;
+   padding: 15px;
+}
+
+.nuclide-chart {
+   border: 2px solid black;
+   margin: 15px 0;
+}
+
+.wikidata-logo {
+   position: absolute;
+   top: 10px;
+   right: 10px;
+}
+
+.wikidata-logo img {
+   width: 100px;
+}
+
+@media screen and (max-width: 500px) {
+   /* move legend below canvas */
+   .nuclide-legend {
+   position: relative;
+   bottom: 0;
+   right: 0;
+   }
+
+   .wikidata-logo {
+   display: none;
+   }
+}
diff --git a/templates/nuclides_common.html b/templates/nuclides_common.html
index f1353ab..7247ed4 100644
--- a/templates/nuclides_common.html
+++ b/templates/nuclides_common.html
@@ -47,26 +47,31 @@
   
   Reset
 
-
-
-
-   {%- for magic_number in magic_numbers -%}
-   {%- if magic_number < max_neutrons -%}
-
-{{ magic_number }} neutrons
+
+  
+
+  {%- for magic_number in magic_numbers -%}
+{%- if magic_number < max_neutrons -%}
+
+  {{ magic_number }} neutrons
 {%- endif -%}
-   {%- if magic_number < max_protons -%}
-
+{%- if magic_number < max_protons -%}
+
 {{ magic_number }} protons
-{%- endif -%}
-{%- endfor -%}
-   {%- for nuclide in nuclide_list -%}
-   {{ format_cell(nuclide) }}
-   {%- endfor -%}
+{%- endif -%}
+  {%- endfor -%}
+  {%- for nuclide in nuclide_list -%}
+{{ format_cell(nuclide) }}
+  {%- endfor -%}

-
-{% block legend %}{% endblock %}
-
+  
+  
+{% block legend %}{% endblock %}
+  
+  
+https://upload.wikimedia.org/wikipedia/commons/6/66/Wikidata-logo-en.svg; 
/>
+  
+
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57d92839094f9f0cf6a5947124ed3347c323eeea
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/ptable
Gerrit-Branch: master
Gerrit-Owner: Tobias47n9e 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Follow-up Ia16e19985: Fix table sort arrow direction - change (mediawiki/core)

2016-03-13 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277071

Change subject: Follow-up Ia16e19985: Fix table sort arrow direction
..

Follow-up Ia16e19985: Fix table sort arrow direction

In Ia16e19985 we accidentally fixed the down arrow being
'sort_up', but by not switches the class order we changed
the meaning of the up and down arrows.

An up arrow should be labelled as 'up' but show when the
table is in ascending order (smallest at the top).

Bug: T129775
Change-Id: Ia30d4a26728dd0fe93939d746ce9bf9e90742de6
---
M resources/src/jquery/jquery.tablesorter.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/277071/1

diff --git a/resources/src/jquery/jquery.tablesorter.js 
b/resources/src/jquery/jquery.tablesorter.js
index 2318b33..5235bee 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -808,7 +808,7 @@
$.data( table, 'tablesorter', { config: 
config } );
 
// Get the CSS class names, could be 
done elsewhere
-   sortCSS = [ config.cssDesc, 
config.cssAsc ];
+   sortCSS = [ config.cssAsc, 
config.cssDesc ];
sortMsg = [ mw.msg( 'sort-descending' 
), mw.msg( 'sort-ascending' ) ];
 
// Build headers

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia30d4a26728dd0fe93939d746ce9bf9e90742de6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Esanders 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add .gitignore and ignore pycache directory - change (labs...ptable)

2016-03-13 Thread Tobias47n9e (Code Review)
Tobias47n9e has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277070

Change subject: Add .gitignore and ignore pycache directory
..

Add .gitignore and ignore pycache directory

Change-Id: Ic43340092a6fba999b90f4806e173d7014088760
---
A .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/ptable 
refs/changes/70/277070/1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..c18dd8d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+__pycache__/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic43340092a6fba999b90f4806e173d7014088760
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/ptable
Gerrit-Branch: master
Gerrit-Owner: Tobias47n9e 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [IMPR] default parameter for Options.format() may be optional - change (pywikibot/core)

2016-03-13 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277069

Change subject: [IMPR] default parameter for Options.format() may be optional
..

[IMPR] default parameter for Options.format() may be optional

- change default parameter from mandatory positional
  to predefined named parameter. All format() methods
  are able to use None as default parameter.
- Some tests added

Change-Id: I8a329ee88ed5d1f46ea896eb1dc2767ddd8896c9
---
M pywikibot/bot_choice.py
M tests/ui_options_tests.py
2 files changed, 26 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/69/277069/1

diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py
index af5bc28..d5ebbb2 100755
--- a/pywikibot/bot_choice.py
+++ b/pywikibot/bot_choice.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Choices for input_choice."""
 #
-# (C) Pywikibot team, 2015
+# (C) Pywikibot team, 2015-2016
 #
 # Distributed under the terms of the MIT license.
 #
@@ -18,7 +18,7 @@
 A basic option for input_choice.
 
 The following methods need to be implemented:
-* format(default)
+* format(default=None)
 * result(value)
 * test(value)
 
@@ -37,11 +37,11 @@
 self._stop = stop
 
 @staticmethod
-def formatted(text, options, default):
+def formatted(text, options, default=None):
 """Create a text with the options formatted into it."""
 formatted_options = []
 for option in options:
-formatted_options.append(option.format(default))
+formatted_options.append(option.format(default=default))
 return '{0} ({1})'.format(text, ', '.join(formatted_options))
 
 @property
@@ -60,7 +60,7 @@
 else:
 return None
 
-def format(self, default):
+def format(self, default=None):
 """Return a formatted string for that option."""
 raise NotImplementedError()
 
@@ -103,7 +103,7 @@
 self.option = option
 self.shortcut = shortcut.lower()
 
-def format(self, default):
+def format(self, default=None):
 """Return a formatted string for that option."""
 index = self.option.lower().find(self.shortcut)
 shortcut = self.shortcut
@@ -154,10 +154,11 @@
 self.description = description
 self.options = options
 
-def format(self, default):
+def format(self, default=None):
 """Return a formatted string for that option."""
-self._output = Option.formatted(self.description, self.options, 
default)
-return super(NestedOption, self).format(default)
+self._output = Option.formatted(self.description, self.options,
+default=None)
+return super(NestedOption, self).format(default=default)
 
 def handled(self, value):
 """Return itself if it applies or the appling sub option."""
@@ -210,7 +211,7 @@
 """Return the upper bound of the range of allowed values."""
 return self._max
 
-def format(self, default):
+def format(self, default=None):
 """Return a formatted string showing the range."""
 if default is not None and self.test(default):
 value = self.parse(default)
@@ -292,12 +293,12 @@
 raise ValueError('The sequence is empty.')
 del self._max
 
-def format(self, default):
+def format(self, default=None):
 """Return a string showing the range."""
 if not self._list:
 raise ValueError('The sequence is empty.')
 else:
-return super(ListOption, self).format(default)
+return super(ListOption, self).format(default=default)
 
 @property
 def maximum(self):
diff --git a/tests/ui_options_tests.py b/tests/ui_options_tests.py
index 6c145a2..e83ed9b 100644
--- a/tests/ui_options_tests.py
+++ b/tests/ui_options_tests.py
@@ -39,7 +39,10 @@
 self.assertEqual(option.shortcut, 't')
 self.assertEqual(option.shortcut, option.result(None))
 self.assertEqual(option.format(None), '[t]est')
+self.assertEqual(option.format(), '[t]est')
+self.assertEqual(option.format(default=None), '[t]est')
 self.assertEqual(option.format('t'), '[T]est')
+self.assertEqual(option.format(default='t'), '[T]est')
 self.assertTrue(option.test('Test'))
 self.assertTrue(option.test('t'))
 self.assertTrue(option.test('T'))
@@ -47,13 +50,16 @@
 self.assertIs(option.handled('T'), option)
 self.assertIsNone(option.handled('?'))
 self.assertEqual(message('?', [option], None), '? ([t]est)')
+self.assertEqual(message('?', [option]), '? ([t]est)')
 self.assertEqual(message('?', [option], 't'), '? ([T]est)')
+self.assertEqual(message('?', [option], default='t'), '? ([T]est)')
 
 def test_Nested(self):
 """Test NestedOption."""

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 57da9bb..1a0733c - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 57da9bb..1a0733c
..


Syncronize VisualEditor: 57da9bb..1a0733c

Change-Id: I6c93f20c2cfba3e3328b1600016bfbdb651cacc3
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 57da9bb..1a0733c 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 57da9bb0ce2251e74fea716253da1f24af7dec80
+Subproject commit 1a0733c4f28a25dd883232541565f7f5703e17c7

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c93f20c2cfba3e3328b1600016bfbdb651cacc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] MWSaveDialog: Fix vertical alignment - change (mediawiki...VisualEditor)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: MWSaveDialog: Fix vertical alignment
..


MWSaveDialog: Fix vertical alignment

Change-Id: Ifb62375da6c872a3a4ef783e479a5476ca318b32
---
M modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css 
b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css
index db8422d..fa8bf3c 100644
--- a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css
+++ b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css
@@ -35,7 +35,7 @@
 
 .ve-ui-mwSaveDialog-checkboxes {
margin-right: 3.25em; /* Hack to prevent overlap on edit summary count 
*/
-   padding: 0.55em 0.75em 0 0.75em;
+   padding: 0.7em 0.7em 0 0.7em;
 }
 
 .ve-ui-mwSaveDialog-checkboxes .oo-ui-fieldLayout {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb62375da6c872a3a4ef783e479a5476ca318b32
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 57da9bb..1a0733c - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277068

Change subject: Syncronize VisualEditor: 57da9bb..1a0733c
..

Syncronize VisualEditor: 57da9bb..1a0733c

Change-Id: I6c93f20c2cfba3e3328b1600016bfbdb651cacc3
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/68/277068/1

diff --git a/VisualEditor b/VisualEditor
index 57da9bb..1a0733c 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 57da9bb0ce2251e74fea716253da1f24af7dec80
+Subproject commit 1a0733c4f28a25dd883232541565f7f5703e17c7

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c93f20c2cfba3e3328b1600016bfbdb651cacc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Drop backwards-compatibility ext.visualEditor.mwreference mo... - change (mediawiki...Cite)

2016-03-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277067

Change subject: Drop backwards-compatibility ext.visualEditor.mwreference module
..

Drop backwards-compatibility ext.visualEditor.mwreference module

Change-Id: I5051b650b9430107d683509aee12411fa1db551b
---
M extension.json
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/67/277067/1

diff --git a/extension.json b/extension.json
index cd3c5da..b010e1c 100644
--- a/extension.json
+++ b/extension.json
@@ -154,11 +154,6 @@
"desktop",
"mobile"
]
-   },
-   "ext.visualEditor.mwreference": {
-   "dependencies": [
-   "ext.cite.visualEditor"
-   ]
}
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5051b650b9430107d683509aee12411fa1db551b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Implement Coordinate.precisionToDim - change (pywikibot/core)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Implement Coordinate.precisionToDim
..


Implement Coordinate.precisionToDim

Enable precision to dim conversion by implementing Coordinate.precisionToDim
Add corresponding tests in wikibase_tests

Bug: T89670
Change-Id: I2f1432603218f0ede2b0f703ef3c5046928440b3
---
M pywikibot/__init__.py
M tests/wikibase_tests.py
2 files changed, 43 insertions(+), 2 deletions(-)

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



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 4fe6801..f9e750c 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -354,6 +354,8 @@
 
 @rtype: float or None
 """
+if self._dim is None and self._precision is None:
+raise ValueError('No values set for dim or precision')
 if self._precision is None and self._dim is not None:
 radius = 6378137  # TODO: Support other globes
 self._precision = math.degrees(
@@ -365,8 +367,32 @@
 self._precision = value
 
 def precisionToDim(self):
-"""Convert precision from Wikibase to GeoData's dim."""
-raise NotImplementedError
+"""Convert precision from Wikibase to GeoData's dim and return the 
latter.
+
+dim is calculated if the Coordinate doesn't have a dimension, and 
precision is set.
+When neither dim nor precision are set, ValueError is thrown.
+
+Carrying on from the earlier derivation of precision, since
+precision = 
math.degrees(dim/(radius*math.cos(math.radians(self.lat, we get
+dim = 
math.radians(precision)*radius*math.cos(math.radians(self.lat))
+But this is not valid, since it returns a float value for dim which is 
an integer.
+We must round it off to the nearest integer.
+
+Therefore::
+dim = 
int(round(math.radians(precision)*radius*math.cos(math.radians(self.lat
+
+@rtype: int or None
+"""
+if self._dim is None and self._precision is None:
+raise ValueError('No values set for dim or precision')
+if self._dim is None and self._precision is not None:
+radius = 6378137
+self._dim = int(
+round(
+math.radians(self._precision) * radius * 
math.cos(math.radians(self.lat))
+)
+)
+return self._dim
 
 
 class WbTime(_WbRepresentation):
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index ed3cd7e..a0d8265 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -144,6 +144,21 @@
 
 dry = True
 
+def test_Coordinate_dim(self):
+"""Test Coordinate."""
+repo = self.get_repo()
+x = pywikibot.Coordinate(site=repo, lat=12.0, lon=13.0, precision=5.0)
+self.assertEqual(x.precisionToDim(), 544434)
+self.assertIsInstance(x.precisionToDim(), int)
+y = pywikibot.Coordinate(site=repo, lat=12.0, lon=13.0, dim=5)
+self.assertEqual(y.precision, 0.55084017101)
+self.assertIsInstance(y.precision, float)
+z = pywikibot.Coordinate(site=repo, lat=12.0, lon=13.0)
+with self.assertRaises(ValueError):
+z.precision
+with self.assertRaises(ValueError):
+z.precisionToDim()
+
 def test_WbTime(self):
 """Test WbTime."""
 repo = self.get_repo()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f1432603218f0ede2b0f703ef3c5046928440b3
Gerrit-PatchSet: 15
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Darthbhyrava 
Gerrit-Reviewer: Darthbhyrava 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Polybuildr 
Gerrit-Reviewer: Xqt 
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 flower-related wheels - change (research...wheels)

2016-03-13 Thread Ladsgroup (Code Review)
Ladsgroup has submitted this change and it was merged.

Change subject: Add flower-related wheels
..


Add flower-related wheels

Change-Id: Ib2ba5c34318a60086ccce472c1eeb1b7f73d73b7
---
A Babel-2.2.0-py2.py3-none-any.whl
A flower-0.8.4-py2.py3-none-any.whl
A tornado-4.2-cp34-cp34m-linux_x86_64.whl
3 files changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Ladsgroup: Verified; Looks good to me, approved



diff --git a/Babel-2.2.0-py2.py3-none-any.whl b/Babel-2.2.0-py2.py3-none-any.whl
new file mode 100644
index 000..05733a8
--- /dev/null
+++ b/Babel-2.2.0-py2.py3-none-any.whl
Binary files differ
diff --git a/flower-0.8.4-py2.py3-none-any.whl 
b/flower-0.8.4-py2.py3-none-any.whl
new file mode 100644
index 000..35d273c
--- /dev/null
+++ b/flower-0.8.4-py2.py3-none-any.whl
Binary files differ
diff --git a/tornado-4.2-cp34-cp34m-linux_x86_64.whl 
b/tornado-4.2-cp34-cp34m-linux_x86_64.whl
new file mode 100644
index 000..3077bad
--- /dev/null
+++ b/tornado-4.2-cp34-cp34m-linux_x86_64.whl
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2ba5c34318a60086ccce472c1eeb1b7f73d73b7
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] jobrunner: monitor the HHVM server health - change (operations/puppet)

2016-03-13 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: jobrunner: monitor the HHVM server health
..


jobrunner: monitor the HHVM server health

We've been in the blind about the jobrunners not working for about a day
because there is no current way to monitor the HHVM server that is being
fed jobs from the jobqueue process. This patch introduces a simple check
that will hit HHVM and warn us in case of problems.

Change-Id: I6b99bba4eb3459f90bd27c0456308ebeedca3410
---
M modules/nagios_common/files/checkcommands.cfg
M modules/role/manifests/mediawiki/jobrunner.pp
2 files changed, 13 insertions(+), 1 deletion(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/modules/nagios_common/files/checkcommands.cfg 
b/modules/nagios_common/files/checkcommands.cfg
index ec18696..765a033 100644
--- a/modules/nagios_common/files/checkcommands.cfg
+++ b/modules/nagios_common/files/checkcommands.cfg
@@ -206,6 +206,12 @@
 command_line$USER1$/check_http -H en.wikipedia.org -I $HOSTADDRESS$ -u 
/wiki/Main_Page
 }
 
+# 'check_http_jobrunner' command definition, querying the rpc endpoint
+define command {
+command_namecheck_http_jobrunner
+command_line$USER1$/check_http -I $HOSTADDRESS$ -p 9005 -u 
/rpc/RunJobs.php
+}
+
 
 # 'check_http_upload' command definition, querying a different URL
 define command {
diff --git a/modules/role/manifests/mediawiki/jobrunner.pp 
b/modules/role/manifests/mediawiki/jobrunner.pp
index aba2a9e..8fa3df2 100644
--- a/modules/role/manifests/mediawiki/jobrunner.pp
+++ b/modules/role/manifests/mediawiki/jobrunner.pp
@@ -3,5 +3,11 @@
 
 include ::role::mediawiki::common
 include ::mediawiki::jobrunner
-}
 
+monitoring::service { 'jobrunner_http_hhvm':
+description   => 'HHVM jobrunner',
+check_command => 'check_http_jobrunner',
+retries   => 2,
+}
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b99bba4eb3459f90bd27c0456308ebeedca3410
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: Giuseppe Lavagetto 
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 flower-related wheels - change (research...wheels)

2016-03-13 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277066

Change subject: Add flower-related wheels
..

Add flower-related wheels

Change-Id: Ib2ba5c34318a60086ccce472c1eeb1b7f73d73b7
---
A Babel-2.2.0-py2.py3-none-any.whl
A flower-0.8.4-py2.py3-none-any.whl
A tornado-4.2-cp34-cp34m-linux_x86_64.whl
3 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/66/277066/1

diff --git a/Babel-2.2.0-py2.py3-none-any.whl b/Babel-2.2.0-py2.py3-none-any.whl
new file mode 100644
index 000..05733a8
--- /dev/null
+++ b/Babel-2.2.0-py2.py3-none-any.whl
Binary files differ
diff --git a/flower-0.8.4-py2.py3-none-any.whl 
b/flower-0.8.4-py2.py3-none-any.whl
new file mode 100644
index 000..35d273c
--- /dev/null
+++ b/flower-0.8.4-py2.py3-none-any.whl
Binary files differ
diff --git a/tornado-4.2-cp34-cp34m-linux_x86_64.whl 
b/tornado-4.2-cp34-cp34m-linux_x86_64.whl
new file mode 100644
index 000..3077bad
--- /dev/null
+++ b/tornado-4.2-cp34-cp34m-linux_x86_64.whl
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2ba5c34318a60086ccce472c1eeb1b7f73d73b7
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c2fb616..57da9bb - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277065

Change subject: Syncronize VisualEditor: c2fb616..57da9bb
..

Syncronize VisualEditor: c2fb616..57da9bb

Change-Id: Ice6aa7d01c164d2a1ad6fee4890dd084e03992a7
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/65/277065/1

diff --git a/VisualEditor b/VisualEditor
index c2fb616..57da9bb 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c2fb61678688e6a62e2fa8635b098b608f508b06
+Subproject commit 57da9bb0ce2251e74fea716253da1f24af7dec80

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice6aa7d01c164d2a1ad6fee4890dd084e03992a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c2fb616..57da9bb - change (mediawiki/extensions)

2016-03-13 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: c2fb616..57da9bb
..


Syncronize VisualEditor: c2fb616..57da9bb

Change-Id: Ice6aa7d01c164d2a1ad6fee4890dd084e03992a7
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index c2fb616..57da9bb 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c2fb61678688e6a62e2fa8635b098b608f508b06
+Subproject commit 57da9bb0ce2251e74fea716253da1f24af7dec80

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice6aa7d01c164d2a1ad6fee4890dd084e03992a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use ResourceLoaderContext::msg() in VisualEditorDataModule - change (mediawiki...VisualEditor)

2016-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use ResourceLoaderContext::msg() in VisualEditorDataModule
..


Use ResourceLoaderContext::msg() in VisualEditorDataModule

* Avoid global wfMessage since it defaults to the session-based user language.
  This can be worked around with `inLanguage( $context->getLanguage() )` but
  is rather fragile. MediaWiki provides msg() in its RequestContext as well
  (as used on special pages etc.). Use the same here.

* While at it, refactor this a bit to simplify the message handling.

* Remove empty constructor method.

Change-Id: I4a358d6de236e24fa6e0538bb049ddec98f9fcc4
---
M VisualEditorDataModule.php
1 file changed, 35 insertions(+), 42 deletions(-)

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



diff --git a/VisualEditorDataModule.php b/VisualEditorDataModule.php
index 21e7e3a..8eac30b 100644
--- a/VisualEditorDataModule.php
+++ b/VisualEditorDataModule.php
@@ -17,73 +17,66 @@
 
/* Methods */
 
-   public function __construct() {
-   }
-
public function getScript( ResourceLoaderContext $context ) {
-   // Messages
-   $msgInfo = $this->getMessageInfo();
+   $msgInfo = $this->getMessageInfo( $context );
$parsedMessages = [];
-   $messages = [];
-   foreach ( $msgInfo['args'] as $msgKey => $msgArgs ) {
-   $parsedMessages[ $msgKey ] = call_user_func_array( 
'wfMessage', $msgArgs )
-   ->inLanguage( $context->getLanguage() )
-   ->parse();
+   $textMessages = [];
+   foreach ( $msgInfo['parse'] as $msgKey => $msgObj ) {
+   $parsedMessages[ $msgKey ] = $msgObj->parse();
}
-   foreach ( $msgInfo['vals'] as $msgKey => $msgVal ) {
-   $messages[ $msgKey ] = $msgVal;
+   foreach ( $msgInfo['text'] as $msgKey => $msgObj ) {
+   $textMessages[ $msgKey ] = $msgObj->text();
}
 
-   return
-   've.init.platform.addParsedMessages(' . 
FormatJson::encode(
+   return 've.init.platform.addParsedMessages(' . 
FormatJson::encode(
$parsedMessages,
ResourceLoader::inDebugMode()
) . ');'.
've.init.platform.addMessages(' . FormatJson::encode(
-   $messages,
+   $textMessages,
ResourceLoader::inDebugMode()
) . ');';
}
 
-   protected function getMessageInfo() {
-   // Messages that just require simple parsing
-   $msgArgs = [
-   'minoredit' => [ 'minoredit' ],
-   'missingsummary' => [ 'missingsummary' ],
-   'summary' => [ 'summary' ],
-   'watchthis' => [ 'watchthis' ],
-   'visualeditor-browserwarning' => [ 
'visualeditor-browserwarning' ],
-   'visualeditor-wikitext-warning' => [ 
'visualeditor-wikitext-warning' ],
-   ];
-
-   // Override message value
-   $msgVals = [
-   'visualeditor-feedback-link' => wfMessage( 
'visualeditor-feedback-link' )
-   ->inContentLanguage()
-   ->text(),
+   protected function getMessageInfo( ResourceLoaderContext $context ) {
+   // Messages to be exported as parsed html
+   $parseMsgs = [
+   'minoredit' => $context->msg( 'minoredit' ),
+   'missingsummary' => $context->msg( 'missingsummary' ),
+   'summary' => $context->msg( 'summary' ),
+   'watchthis' => $context->msg( 'watchthis' ),
+   'visualeditor-browserwarning' => $context->msg( 
'visualeditor-browserwarning' ),
+   'visualeditor-wikitext-warning' => $context->msg( 
'visualeditor-wikitext-warning' ),
];
 
// Copyright warning (based on EditPage::getCopyrightWarning)
$rightsText = $this->config->get( 'RightsText' );
if ( $rightsText ) {
-   $copywarnMsg = [ 'copyrightwarning',
-   '[[' . wfMessage( 'copyrightpage' 
)->inContentLanguage()->text() . ']]',
+   $copywarnMsgArgs = [ 'copyrightwarning',
+   '[[' . $context->msg( 'copyrightpage' 
)->inContentLanguage()->text() . ']]',
$rightsText ];
} else {
-   $copywarnMsg = [ 'copyrightwarning2',
- 

  1   2   >