[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: ApiRequest title normalisation: Use getPrefixedText from med...

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377401 )

Change subject: ApiRequest title normalisation: Use getPrefixedText from 
mediawiki-title
..


ApiRequest title normalisation: Use getPrefixedText from mediawiki-title

Update mediawiki-title to 0.6.4

Change-Id: I5ff530e241737df9442d4416438e759971adf27f
---
M lib/mw/ApiRequest.js
M package.json
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index d8aab41..d540cad 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -191,8 +191,8 @@
if ( !titleObj ) {
return title;
}
-   // API wants spaces instead of underscores
-   return titleObj.getPrefixedDBKey().replace( /_/g, ' ' );
+   // API wants titles without underscores.
+   return titleObj.getPrefixedText();
 } );
 
 MWApiRequest.siteInfoCache = new Map();
diff --git a/package.json b/package.json
index 8ae0528..970f80f 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
 "js-yaml": "^3.6.1",
 "jsonwebtoken": "~5.6.0",
 "language-data": "git+https://github.com/wikimedia/language-data#master;,
-"mediawiki-title": "^0.6.3",
+"mediawiki-title": "^0.6.4",
 "preq": "^0.5.2",
 "sax": "1.2.1",
 "service-runner": "^2.2.5",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ff530e241737df9442d4416438e759971adf27f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Remove unnecessary wrapper element

2017-09-11 Thread Chrisneuroth (Code Review)
Chrisneuroth has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377404 )

Change subject: Remove unnecessary wrapper element
..

Remove unnecessary wrapper element

The PHP view doesn't need to know anything about the markup of the view anymore.

Change-Id: Icf6cc732b3d0336e5a2edcec3c70df62def5c593
---
M src/View/LexemeView.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme 
refs/changes/04/377404/1

diff --git a/src/View/LexemeView.php b/src/View/LexemeView.php
index fc2cd88..e6a02a8 100644
--- a/src/View/LexemeView.php
+++ b/src/View/LexemeView.php
@@ -262,9 +262,7 @@
 
$response = 
file_get_contents('http://nodejs:3000/lemma-widget', false, $context);
 
-   return ''
-   . $response
-   . '';
+   return $response;
}
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf6cc732b3d0336e5a2edcec3c70df62def5c593
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Chrisneuroth 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Remove unused Templating module

2017-09-11 Thread Chrisneuroth (Code Review)
Chrisneuroth has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377403 )

Change subject: Remove unused Templating module
..

Remove unused Templating module

Change-Id: Ifd4e3487c6f81b512481055e770dc66f7b7dc18c
---
M src/View/LexemeView.php
1 file changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/src/View/LexemeView.php b/src/View/LexemeView.php
index 78139dd..fc2cd88 100644
--- a/src/View/LexemeView.php
+++ b/src/View/LexemeView.php
@@ -19,8 +19,6 @@
 use Wikibase\View\StatementSectionsView;
 use Wikibase\View\Template\TemplateFactory;
 use Wikimedia\Assert\Assert;
-use WMDE\VueJsTemplating\Templating;
-
 /**
  * Class for creating HTML views for Lexeme instances.
  *
@@ -241,8 +239,6 @@
 * @return string
 */
protected function renderLemmaWidget( Lexeme $lexeme ) {
-   $templating = new Templating();
-
$lemmas = array_map(
function ( Term $lemma ) {
return [ 'value' => $lemma->getText(), 
'language' => $lemma->getLanguageCode() ];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd4e3487c6f81b512481055e770dc66f7b7dc18c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Chrisneuroth 

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


[MediaWiki-commits] [Gerrit] operations...apertium-cat-srd[master]: apertium-cat-srd: Initial Debian packaging

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377402 )

Change subject: apertium-cat-srd: Initial Debian packaging
..

apertium-cat-srd: Initial Debian packaging

Bug: T174987
Change-Id: Ic153740588da3cacdb8e9ee04fed73fa0a640882
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/docs
A debian/rules
A debian/source/format
A debian/watch
8 files changed, 98 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-cat-srd
 refs/changes/02/377402/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..1021ed8
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,12 @@
+apertium-cat-srd (0.9.0~r82238-1+wmf1) jessie-wikimedia; urgency=low
+
+  * Rebuild for Jessie.
+
+ -- Kartik Mistry   Tue, 12 Sep 2017 10:58:12 +0530
+
+apertium-cat-srd (0.9.0~r82238-1) unstable; urgency=low
+
+  [ Tino Didriksen ]
+  * Initial release (Closes: #874325)
+
+ -- Kartik Mistry   Tue, 05 Sep 2017 11:03:11 +0530
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..ad049a8
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,33 @@
+Source: apertium-cat-srd
+Section: science
+Priority: optional
+Maintainer: Debian Science Team 

+Uploaders: Tino Didriksen ,
+   Kartik Mistry 
+Build-Depends: apertium-cat (>= 2.3.0~r82237),
+   apertium-dev (>= 3.4),
+   apertium-lex-tools,
+   apertium-srd (>= 0.10.0~r82237),
+   autotools-dev,
+   cg3,
+   debhelper (>= 9),
+   dh-autoreconf,
+   gawk,
+   pkg-config (>= 0.21)
+Standards-Version: 3.9.8
+Homepage: http://apertium.org/
+Vcs-Git: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-cat-srd.git
+Vcs-Browser: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-cat-srd.git
+
+Package: apertium-cat-srd
+Architecture: all
+Depends: apertium (>= 3.4),
+ apertium-lex-tools,
+ cg3,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Provides: apertium-srd-cat
+Conflicts: apertium-srd-cat
+Description: Apertium translation data for the Catalan-Sardinian pair
+ Data package providing Apertium language resources for translating
+ between the Catalan and Sardinian languages.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..1cfdc08
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,32 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: http://apertium.org/
+
+Files: *
+Copyright:  2017, Hèctor Alòs i Font 
+   2010-2017, Francis M. Tyers 
+2017, Gianfranco Fronteddu 
+2010, node.ue 
+2010, Pasquale Minervini 
+2010, Jim O'Regan 
+License: GPL-3+
+
+Files: debian/*
+Copyright: 2014, Apertium Project Management Committee 

+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 000..6f83607
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+AUTHORS
+NEWS
+README
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..66f3957
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+#export DH_VERBOSE=1
+export DH_OPTIONS
+export LC_ALL=C.UTF-8
+
+%:
+   dh $@ --fail-missing --with autoreconf
+
+override_dh_auto_test:
+   # Do nothing for now
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add categories RDF dump into the index page

2017-09-11 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377369 )

Change subject: Add categories RDF dump into the index page
..


Add categories RDF dump into the index page

Bug: T173892
Change-Id: I84accad4cb25f9bafbb6ef015c638425672e884b
---
M modules/dataset/files/html/other_index.html
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/dataset/files/html/other_index.html 
b/modules/dataset/files/html/other_index.html
index 9798ee5..4c7ba08 100644
--- a/modules/dataset/files/html/other_index.html
+++ b/modules/dataset/files/html/other_index.html
@@ -34,6 +34,7 @@
Dumps of images and content of 
wikitech.wikimedia.org
Content 
Translation dumps in json and tmx format
XML or other files for 
testing use
+   Mediawiki categories as 
RDF




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84accad4cb25f9bafbb6ef015c638425672e884b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Change the sas.js file mode to 0644

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377400 )

Change subject: Change the sas.js file mode to 0644
..


Change the sas.js file mode to 0644

Change-Id: I759d135386f98e9eb32ce6fef932f73b4c05fb20
---
M resources/lib/codemirror/mode/sas/sas.js
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/resources/lib/codemirror/mode/sas/sas.js 
b/resources/lib/codemirror/mode/sas/sas.js
old mode 100755
new mode 100644

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I759d135386f98e9eb32ce6fef932f73b4c05fb20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 
Gerrit-Reviewer: Pastakhov 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: ApiRequest title normalisation: Use getPrefixedText from med...

2017-09-11 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377401 )

Change subject: ApiRequest title normalisation: Use getPrefixedText from 
mediawiki-title
..

ApiRequest title normalisation: Use getPrefixedText from mediawiki-title

Update mediawiki-title to 0.6.4

Change-Id: I5ff530e241737df9442d4416438e759971adf27f
---
M lib/mw/ApiRequest.js
M package.json
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/01/377401/1

diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index d8aab41..d540cad 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -191,8 +191,8 @@
if ( !titleObj ) {
return title;
}
-   // API wants spaces instead of underscores
-   return titleObj.getPrefixedDBKey().replace( /_/g, ' ' );
+   // API wants titles without underscores.
+   return titleObj.getPrefixedText();
 } );
 
 MWApiRequest.siteInfoCache = new Map();
diff --git a/package.json b/package.json
index 8ae0528..970f80f 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
 "js-yaml": "^3.6.1",
 "jsonwebtoken": "~5.6.0",
 "language-data": "git+https://github.com/wikimedia/language-data#master;,
-"mediawiki-title": "^0.6.3",
+"mediawiki-title": "^0.6.4",
 "preq": "^0.5.2",
 "sax": "1.2.1",
 "service-runner": "^2.2.5",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ff530e241737df9442d4416438e759971adf27f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Change the sas.js file mode to 0644

2017-09-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377400 )

Change subject: Change the sas.js file mode to 0644
..

Change the sas.js file mode to 0644

Change-Id: I759d135386f98e9eb32ce6fef932f73b4c05fb20
---
M resources/lib/codemirror/mode/sas/sas.js
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror 
refs/changes/00/377400/1

diff --git a/resources/lib/codemirror/mode/sas/sas.js 
b/resources/lib/codemirror/mode/sas/sas.js
old mode 100755
new mode 100644

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I759d135386f98e9eb32ce6fef932f73b4c05fb20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 

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


[MediaWiki-commits] [Gerrit] operations...apertium-srd-ita[master]: apertium-srd-ita: New upstream release

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377399 )

Change subject: apertium-srd-ita: New upstream release
..

apertium-srd-ita: New upstream release

Depends on,
* apertium-srd >= 0.10.0~r82237
* apertium-ita >= 0.10.0~r82237

Bug: T174988
Change-Id: Ie29c53ed75f5e290ccfa4cef285e57095eb8471a
---
M debian/changelog
M debian/control
M debian/copyright
3 files changed, 15 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-srd-ita
 refs/changes/99/377399/1

diff --git a/debian/changelog b/debian/changelog
index e9396c5..a62af63 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+apertium-srd-ita (0.9.5~r82237-1+wmf1) jessie-wikimedia; urgency=low
+
+  * New upstream release.
+  * debian/control:
++ Updated dependency on apertium-srd and apertium-ita.
+  * Updated debian/copyright.
+
+ -- Kartik Mistry   Tue, 12 Sep 2017 10:40:24 +0530
+
 apertium-srd-ita (0.9.0~r72554-1+wmf1) jessie-wikimedia; urgency=low
 
   * Rebuild for Jessie.
diff --git a/debian/control b/debian/control
index f9959b3..7f93305 100644
--- a/debian/control
+++ b/debian/control
@@ -5,9 +5,9 @@
 Uploaders: Tino Didriksen ,
Kartik Mistry 
 Build-Depends: apertium-dev (>= 3.4),
-   apertium-ita (>= 0.9.0~r72553),
+   apertium-ita (>= 0.10.0~r82237),
apertium-lex-tools,
-   apertium-srd (>= 0.9.0~r72552),
+   apertium-srd (>= 0.10.0~r82237),
autotools-dev,
cg3,
debhelper (>= 9),
diff --git a/debian/copyright b/debian/copyright
index 793f504..775343c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,10 +2,10 @@
 Source: http://apertium.org/
 
 Files: *
-Copyright: 2016, Francis M. Tyers 
-   2016, Hèctor Alòs i Font 
-   2016, Gianfranco Fronteddu 
-   2016, Kevin Brubeck Unhammer 
+Copyright: 2016-2017, Hèctor Alòs i Font 
+   2016-2017, Gianfranco Fronteddu 
+2016, Francis M. Tyers 
+2016, Kevin Brubeck Unhammer 
 License: GPL-3+
 
 License: GPL-3+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie29c53ed75f5e290ccfa4cef285e57095eb8471a
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/contenttranslation/apertium-srd-ita
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] operations...apertium-ita[master]: apertium-ita: New upstream release

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377398 )

Change subject: apertium-ita: New upstream release
..

apertium-ita: New upstream release

Bug: T174988
Change-Id: Iec0bdb1757b749561ebfb416f1b65c561035be26
---
M debian/changelog
M debian/copyright
2 files changed, 13 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-ita
 refs/changes/98/377398/1

diff --git a/debian/changelog b/debian/changelog
index c302e2e..279e7dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+apertium-ita (0.10.0~r82237-1+wmf1) jessie-wikimedia; urgency=low
+
+  * New upstream release.
+  * Updated debian/copyright.
+
+ -- Kartik Mistry   Tue, 12 Sep 2017 10:34:28 +0530
+
 apertium-ita (0.9.0~r78828-1+wmf1) jessie-wikimedia; urgency=low
 
   * New upstream release.
diff --git a/debian/copyright b/debian/copyright
index 98bfc36..06e338f 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,14 +2,15 @@
 Source: http://apertium.org/
 
 Files: *
-Copyright: 2013-2016, Francis M. Tyers 
-2016, Hèctor Alòs i Font 
+Copyright: 2016-2017, Hèctor Alòs i Font 
+   2016-2017, Gema Ramírez Sánchez 
+   2014-2017, Gianluca Grossi 
+   2014-2016, Kevin Brubeck Unhammer 
+   2013-2016, Francis M. Tyers 
+2016, Xavi Ivars 
 2016, Marina Loffredo 
-2016, Gema Ramírez Sánchez 
 2016, Gianfranco Fronteddu 
 2016, Frankie Robertson 
-   2014-2016, Gianluca Grossi 
-   2014-2016, Kevin Brubeck Unhammer 
 License: GPL-2+
 
 License: GPL-2+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec0bdb1757b749561ebfb416f1b65c561035be26
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/contenttranslation/apertium-ita
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace autocomment color with WCAG conformant WikimediaUI p...

2017-09-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377397 )

Change subject: Replace autocomment color with WCAG conformant WikimediaUI 
palette one
..

Replace autocomment color with WCAG conformant WikimediaUI palette one

Replacing outdated `.autocomment` color with WCAG level AA conformant
one from WikimediaUI color palette and also replace `.wikitable`'s
color with normal text color. Black is to be used solely on emphasized
UI elements and we're remaining high contrast level.
Follow-up to Ide230784be654def9f120d5242d036f7423e65b2

Bug: T152025
Change-Id: I8e860b53481caf03e11f9bcdd836a80c3a2fc39f
---
M resources/src/mediawiki.legacy/shared.css
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/377397/1

diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index c6ad655..9930525 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -278,7 +278,7 @@
 
 /* The auto-generated edit comments */
 .autocomment {
-   color: #808080;
+   color: #72777d;
 }
 
 /** Generic minor/bot/newpage styling (recent changes) */
@@ -361,11 +361,11 @@
  * keep in sync with commonPrint.css
  */
 table.wikitable {
-   margin: 1em 0;
background-color: #f8f9fa;
+   color: #222;
+   margin: 1em 0;
border: 1px solid #a2a9b1;
border-collapse: collapse;
-   color: #000;
 }
 
 table.wikitable > tr > th,

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

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

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


[MediaWiki-commits] [Gerrit] operations...apertium-srd[master]: apertium-srd: New upstream release

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377396 )

Change subject: apertium-srd: New upstream release
..

apertium-srd: New upstream release

Bug: T174988
Change-Id: Ic450a361fea374cd01292bcf3852ec66f2f6984e
---
M debian/changelog
M debian/control
M debian/copyright
3 files changed, 17 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-srd
 refs/changes/96/377396/1

diff --git a/debian/changelog b/debian/changelog
index 94e6191..c5f5d66 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+apertium-srd (0.10.0~r82237-1+wmf1) jessie-wikimedia; urgency=low
+
+  * New upstream release.
+  * Build-Depends on python.
+  * Updated debian/copyright.
+
+ -- Kartik Mistry   Tue, 12 Sep 2017 10:24:34 +0530
+
 apertium-srd (0.9.0~r72792-1+wmf1) jessie-wikimedia; urgency=low
 
   * Rebuild for Jessie.
diff --git a/debian/control b/debian/control
index d219b8c..fd4e35e 100644
--- a/debian/control
+++ b/debian/control
@@ -2,14 +2,16 @@
 Section: science
 Priority: optional
 Maintainer: Debian Science Team 

-Uploaders: Tino Didriksen , Kartik Mistry 

+Uploaders: Tino Didriksen ,
+   Kartik Mistry 
 Build-Depends: apertium-dev (>= 3.4),
autotools-dev,
cg3,
debhelper (>= 9),
dh-autoreconf,
gawk,
-   pkg-config (>= 0.21)
+   pkg-config (>= 0.21),
+   python
 Standards-Version: 3.9.8
 Homepage: http://apertium.org/
 Vcs-Git: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-srd.git
diff --git a/debian/copyright b/debian/copyright
index bcad127..d1de178 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,10 +2,11 @@
 Source: http://apertium.org/
 
 Files: *
-Copyright: 2016, Francis M. Tyers 
-   2016, Hèctor Alòs i Font 
-   2016, Gianfranco Fronteddu 
-   2016, Frankie Robertson 
+Copyright: 2016-2017, Hèctor Alòs i Font 
+   2016-2017, Gianfranco Fronteddu 
+   2016-2017, Francis M. Tyers 
+2016, Kevin Brubeck Unhammer 
+2016, Frankie Robertson 
 License: GPL-3+
 
 License: GPL-3+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic450a361fea374cd01292bcf3852ec66f2f6984e
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/contenttranslation/apertium-srd
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] operations...apertium-cat[master]: apertium-cat: New upstream release

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377395 )

Change subject: apertium-cat: New upstream release
..

apertium-cat: New upstream release

Bug: T174988
Change-Id: I9dcfad8ae61154da49f959c074058aace4ed412f
---
M debian/changelog
M debian/copyright
2 files changed, 18 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-cat
 refs/changes/95/377395/1

diff --git a/debian/changelog b/debian/changelog
index 5f44052..a6b4fc2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+apertium-cat (2.3.0~r82237-1+wmf1) jessie-wikimedia; urgency=low
+
+  * New upstream release.
+  * Updated debian/copyright from upstream.
+
+ -- Kartik Mistry   Tue, 12 Sep 2017 10:11:47 +0530
+
 apertium-cat (2.2.0~r79715-1+wmf1) jessie-wikimedia; urgency=low
 
* Update to latest upstream release.
diff --git a/debian/copyright b/debian/copyright
index 6d21972..64a90d8 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,18 +2,22 @@
 Source: http://apertium.org/
 
 Files: *
-Copyright: 2015-2017, Xavi Ivars 
-2017, Hèctor Alòs i Font 
+Copyright:  2017, Hèctor Alòs i Font 
+   2016-2017, Juan Pablo Martínez Cortés 
+2017, Jaume Ortolà i Font 
+2017, Marc Riera Irigoyen 
+   2015-2017, Francis M. Tyers 
+2017, Gema Ramírez Sánchez 
+   2015-2017, Xavi Ivars 
 2016, Kevin Brubeck Unhammer 
-   2015-2016, Francis M. Tyers 
 2016, Frankie Robertson 
-2016, Juan Pablo Martínez Cortés 
-License: GPL-2
+License: GPL-2+
 
-License: GPL-2
+License: GPL-2+
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation, version 2 of the License
+ the Free Software Foundation, version 2 of the License, or
+ (at your option) any later version.
  .
  This package is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dcfad8ae61154da49f959c074058aace4ed412f
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/contenttranslation/apertium-cat
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix coverage annotations

2017-09-11 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377394 )

Change subject: Fix coverage annotations
..

Fix coverage annotations

Change-Id: I1f9b421a4ce55f1e0d4a81ed4a886aae20100fab
---
M tests/phpunit/includes/SanitizerTest.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/377394/1

diff --git a/tests/phpunit/includes/SanitizerTest.php 
b/tests/phpunit/includes/SanitizerTest.php
index 7472fb9..350cb70 100644
--- a/tests/phpunit/includes/SanitizerTest.php
+++ b/tests/phpunit/includes/SanitizerTest.php
@@ -432,7 +432,6 @@
 * @covers Sanitizer::escapeIdForLink()
 * @covers Sanitizer::escapeIdForExternalInterwiki()
 * @covers Sanitizer::escapeIdInternal()
-* @covers Sanitizer::urlEscapeId()
 *
 * @param string $stuff
 * @param string[] $config

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Setup Cirrus MLR models for top 20 language AB test

2017-09-11 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377393 )

Change subject: Setup Cirrus MLR models for top 20 language AB test
..

Setup Cirrus MLR models for top 20 language AB test

Change-Id: Ia712ed7f00d53d1729b41b994f5586f39cec0c0b
---
M wmf-config/CirrusSearch-production.php
M wmf-config/InitialiseSettings.php
2 files changed, 58 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/93/377393/1

diff --git a/wmf-config/CirrusSearch-production.php 
b/wmf-config/CirrusSearch-production.php
index 286589a..9671530 100644
--- a/wmf-config/CirrusSearch-production.php
+++ b/wmf-config/CirrusSearch-production.php
@@ -103,41 +103,40 @@
 // Enable searching archive
 $wgCirrusSearchEnableArchive = $wmgCirrusSearchEnableArchive;
 
-// LTR Rescore profile
-$wgCirrusSearchRescoreProfiles['enwiki-500t-v1-20rs'] = [
-   'i18n_msg' => 'cirrussearch-qi-profile-wsum-inclinks-pv',
-   'supported_namespaces' => 'content',
-   'unsupported_syntax' => [ 'full_text_querystring', 'query_string', 
'filter_only' ],
-   'fallback_profile' => 'wsum_inclinks_pv',
-   'rescore' => [
-   [
-   'window' => 8192,
-   'window_size_override' => 
'CirrusSearchFunctionRescoreWindowSize',
-   'query_weight' => 1.0,
-   'rescore_query_weight' => 1.0,
-   'score_mode' => 'total',
-   'type' => 'function_score',
-   'function_chain' => 'wsum_inclinks_pv'
+if ( $wmgCirrusSearchMLRModel ) {
+   // LTR Rescore profile
+   $wgCirrusSearchRescoreProfiles['mlr-1024rs'] = [
+   'i18n_msg' => 'cirrussearch-qi-profile-wsum-inclinks-pv',
+   'supported_namespaces' => 'content',
+   'unsupported_syntax' => [ 'full_text_querystring', 
'query_string', 'filter_only' ],
+   'fallback_profile' => 'wsum_inclinks_pv',
+   'rescore' => [
+   [
+   'window' => 8192,
+   'window_size_override' => 
'CirrusSearchFunctionRescoreWindowSize',
+   'query_weight' => 1.0,
+   'rescore_query_weight' => 1.0,
+   'score_mode' => 'total',
+   'type' => 'function_score',
+   'function_chain' => 'wsum_inclinks_pv'
+   ],
+   [
+   'window' => 8192,
+   'window_size_override' => 
'CirrusSearchFunctionRescoreWindowSize',
+   'query_weight' => 1.0,
+   'rescore_query_weight' => 1.0,
+   'score_mode' => 'multiply',
+   'type' => 'function_score',
+   'function_chain' => 'optional_chain'
+   ],
+   [
+   'window' => 1024,
+   'query_weight' => 1.0,
+   'rescore_query_weight' => 1.0,
+   'score_mode' => 'total',
+   'type' => 'ltr',
+   'model' => $wmgCirrusSearchMLRModel,
+   ],
],
-   [
-   'window' => 8192,
-   'window_size_override' => 
'CirrusSearchFunctionRescoreWindowSize',
-   'query_weight' => 1.0,
-   'rescore_query_weight' => 1.0,
-   'score_mode' => 'multiply',
-   'type' => 'function_score',
-   'function_chain' => 'optional_chain'
-   ],
-   [
-   'window' => 20,
-   'query_weight' => 1.0,
-   'rescore_query_weight' => 1.0,
-   'score_mode' => 'total',
-   'type' => 'ltr',
-   'model' => 'enwiki_32153k_500t',
-   ],
-   ],
-];
-
-$wgCirrusSearchRescoreProfiles['enwiki-500t-v1-1024rs'] = 
$wgCirrusSearchRescoreProfiles['enwiki-500t-v1-20rs'];
-$wgCirrusSearchRescoreProfiles['enwiki-500t-v1-1024rs']['rescore'][2]['window']
 = 1024;
+   ];
+}
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3a9dd7b..fd3bedb 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19426,6 +19426,28 @@
'testwikidatawiki' => false,
 ],
 
+'wmgCirrusSearchMLRModel' => [
+   'default' => false,
+   'arwiki' => '20170905_arwiki_v1',
+   'fawiki' => '20170905_fawiki_v1',
+   'jawiki' => 

[MediaWiki-commits] [Gerrit] operations...apertium-tur[master]: apertium-tur: Initial Debian packaging

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377392 )

Change subject: apertium-tur: Initial Debian packaging
..

apertium-tur: Initial Debian packaging

Bug: T174765
Change-Id: I88087e04900eb9a575da924ec6e1c15788e420f8
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/docs
A debian/rules
A debian/source/format
A debian/watch
8 files changed, 91 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-tur
 refs/changes/92/377392/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..14e2694
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,12 @@
+apertium-tur (0.1.0~r81882-1+wmf1) jessie-wikimedia; urgency=low
+
+  * Rebuild for Jessie.
+
+ -- Kartik Mistry   Tue, 12 Sep 2017 09:08:22 +0530
+
+apertium-tur (0.1.0~r81882-1) unstable; urgency=low
+
+  [ Tino Didriksen ]
+  * Initial release (Closes: #875431)
+
+ -- Kartik Mistry   Mon, 11 Sep 2017 17:11:08 +0530
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..5175a79
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,25 @@
+Source: apertium-tur
+Section: science
+Priority: optional
+Maintainer: Debian Science Team 

+Uploaders: Tino Didriksen ,
+   Kartik Mistry 
+Build-Depends: apertium-dev (>= 3.4),
+   autotools-dev,
+   cg3,
+   debhelper (>= 9),
+   dh-autoreconf,
+   gawk,
+   hfst,
+   libhfst49-dev,
+   pkg-config (>= 0.21)
+Standards-Version: 4.0.0
+Homepage: http://apertium.org/
+Vcs-Git: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-tur.git
+Vcs-Browser: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-tur.git
+
+Package: apertium-tur
+Architecture: all
+Depends: apertium (>= 3.4), cg3, hfst, ${misc:Depends}, ${shlibs:Depends}
+Description: Apertium single language data for Turkish
+ Data package providing Apertium language resources for Turkish
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..54c2b07
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,35 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: http://apertium.org/
+
+Files: *
+Copyright: 2011-2017, Francis M. Tyers 
+   2016-2017, Memduh Gökırmak 
+2017, Ilnar Salimzyan 
+2017, Sevilay Beyatli 
+   2013-2016, Kevin Brubeck Unhammer 
+2016, Tommi Pirinen 
+   2011-2015, Jonathan North Washington 
+2014, Trond Trosterud 
+   2011-2012, Gianluca Grossi 
+2012, Aglimzan 
+2012, Hèctor Alòs i Font 
+2012, Cristipiticul 
+2011, Yusuf Tezcan 
+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 000..6f83607
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+AUTHORS
+NEWS
+README
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..c12d371
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+#export DH_VERBOSE=1
+export DH_OPTIONS
+export LC_ALL=C.UTF-8
+
+%:
+   dh $@ --fail-missing --with autoreconf
+
+override_dh_auto_test:
+   # Disable test for now
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@

[MediaWiki-commits] [Gerrit] integration/config[master]: Add apertium-crh, -tur and -crh-tur packages

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377391 )

Change subject: Add apertium-crh, -tur and -crh-tur packages
..

Add apertium-crh, -tur and -crh-tur packages

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/91/377391/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 455bef9..d560c71 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2189,6 +2189,8 @@
   - { name: operations/debs/contenttranslation/apertium-br-fr, test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-ca-it, test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-cat,   test: 
['debian-glue'] }
+  - { name: operations/debs/contenttranslation/apertium-crh,   test: 
['debian-glue'] }
+  - { name: operations/debs/contenttranslation/apertium-crh-tur,   test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-cy-en, test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-dan,   test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-dan-nor,   test: 
['debian-glue'] }
@@ -2247,6 +2249,7 @@
   - { name: operations/debs/contenttranslation/apertium-swe-dan,   test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-swe-nor,   test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-tat,   test: 
['debian-glue'] }
+  - { name: operations/debs/contenttranslation/apertium-tur,   test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-urd,   test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/apertium-urd-hin,   test: 
['debian-glue'] }
   - { name: operations/debs/contenttranslation/cg3,test: 
['debian-glue'] }

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

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

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


[MediaWiki-commits] [Gerrit] operations...apertium-crh[master]: apertium-crh: Initial Debian packaging

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377390 )

Change subject: apertium-crh: Initial Debian packaging
..

apertium-crh: Initial Debian packaging

Bug: T174765
Change-Id: I07e5b15281d72bbb7551673e03262c3998b2bc65
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/docs
A debian/rules
A debian/source/format
A debian/watch
8 files changed, 82 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-crh
 refs/changes/90/377390/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..ca0fdad
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,12 @@
+apertium-crh (0.1.0~r81872-1+wmf1) jessie-wikimedia; urgency=low
+
+  * Rebuild fir Jessie.
+
+ -- Kartik Mistry   Tue, 12 Sep 2017 08:58:14 +0530
+
+apertium-crh (0.1.0~r81872-1) unstable; urgency=low
+
+  [ Tino Didriksen ]
+  * Initial release (Closes: #874681)
+
+ -- Kartik Mistry   Mon, 11 Sep 2017 16:31:57 +0530
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..7f1ba0c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,24 @@
+Source: apertium-crh
+Section: science
+Priority: optional
+Maintainer: Debian Science Team 

+Uploaders: Tino Didriksen ,
+   Kartik Mistry 
+Build-Depends: apertium-dev (>= 3.4),
+   autotools-dev,
+   cg3,
+   debhelper (>= 9),
+   dh-autoreconf,
+   gawk,
+   hfst,
+   pkg-config (>= 0.21)
+Standards-Version: 4.0.0
+Homepage: http://apertium.org/
+Vcs-Git: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-crh.git
+Vcs-Browser: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-crh.git
+
+Package: apertium-crh
+Architecture: all
+Depends: apertium (>= 3.4), cg3, hfst, ${misc:Depends}, ${shlibs:Depends}
+Description: Apertium single language data for Crimean Tatar
+ Data package providing Apertium language resources for Crimean Tatar
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..28dfabe
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,27 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: http://apertium.org/
+
+Files: *
+Copyright: 2014-2017, Francis M. Tyers 
+2017, Memduh Gökırmak 
+2017, Ilnar Salimzyan 
+   2015-2017, Jonathan North Washington 
+2016, Kevin Brubeck Unhammer 
+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 000..6f83607
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+AUTHORS
+NEWS
+README
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..c12d371
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+#export DH_VERBOSE=1
+export DH_OPTIONS
+export LC_ALL=C.UTF-8
+
+%:
+   dh $@ --fail-missing --with autoreconf
+
+override_dh_auto_test:
+   # Disable test for now
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 000..61595a5
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/apertium/apertium-crh-(\d\S+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07e5b15281d72bbb7551673e03262c3998b2bc65
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/contenttranslation/apertium-crh

[MediaWiki-commits] [Gerrit] operations...apertium[master]: Fix apertium-all-dev Depends

2017-09-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377389 )

Change subject: Fix apertium-all-dev Depends
..

Fix apertium-all-dev Depends

libhfst45-dev -> libhfst-dev

Change-Id: Ib28e297ea35a26025808ca81e21939823fb462fe
---
M debian/changelog
M debian/control
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium 
refs/changes/89/377389/1

diff --git a/debian/changelog b/debian/changelog
index 17f6792..17c0301 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+apertium (3.4.2~r68466-2+wmf2) jessie-wikimedia; urgency=low
+
+  * debian/control:
++ Fixed Depends for apertium-all-dev
+
+ -- Kartik Mistry   Thu, 07 Sep 2017 17:15:55 +0530
+
 apertium (3.4.2~r68466-2+wmf1) jessie; urgency=low
 
   * Rebuild for Jessie
diff --git a/debian/control b/debian/control
index b71cf87..61c0ece 100644
--- a/debian/control
+++ b/debian/control
@@ -85,7 +85,7 @@
  apertium-lex-tools (>= 0.1.1~r60994),
  cg3 (>= 0.9.9~r11621),
  hfst (>= 3.10.0~r2798),
- libhfst45-dev (>= 3.10.0~r2798),
+ libhfst-dev (>= 3.10.0~r2798),
  ${misc:Depends}
 Description: Metapackage for all tools required for Apertium development
  A metapackage to get all tools required for development of Apertium

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib28e297ea35a26025808ca81e21939823fb462fe
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/contenttranslation/apertium
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: API: Expose $wgCiteResponsiveReferences via meta=siteinfo

2017-09-11 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377388 )

Change subject: API: Expose $wgCiteResponsiveReferences via meta=siteinfo
..

API: Expose $wgCiteResponsiveReferences via meta=siteinfo

Bug: T159894
Change-Id: I2404999ab11b5cf7b740ae43696c4676ab1b6d22
---
M extension.json
M includes/CiteHooks.php
2 files changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/88/377388/1

diff --git a/extension.json b/extension.json
index cadd2dd..28a9229 100644
--- a/extension.json
+++ b/extension.json
@@ -44,7 +44,8 @@
],
"ResourceLoaderGetConfigVars": [
"CiteHooks::onResourceLoaderGetConfigVars"
-   ]
+   ],
+   "APIQuerySiteInfoGeneralInfo": 
"CiteHooks::onAPIQuerySiteInfoGeneralInfo"
},
"ResourceModules": {
"ext.cite.styles": {
diff --git a/includes/CiteHooks.php b/includes/CiteHooks.php
index 06bbba1..de5e70f 100644
--- a/includes/CiteHooks.php
+++ b/includes/CiteHooks.php
@@ -267,4 +267,17 @@
$vars['wgCiteVisualEditorOtherGroup'] = $config->get( 
'CiteVisualEditorOtherGroup' );
return true;
}
+
+   /**
+* Hook: APIQuerySiteInfoGeneralInfo
+*
+* Expose configs via action=query=siteinfo
+*
+* @param ApiQuerySiteInfo $api
+* @param array &$data
+*/
+   public static function onAPIQuerySiteInfoGeneralInfo( ApiQuerySiteInfo 
$api, array &$data ) {
+   $config = ConfigFactory::getDefaultInstance()->makeConfig( 
'cite' );
+   $data['citeresponsivereferences'] = $config->get( 
'CiteResponsiveReferences' );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2404999ab11b5cf7b740ae43696c4676ab1b6d22
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] marvin[master]: PoC: Chore: rename index files to use module name

2017-09-11 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377387 )

Change subject: PoC: Chore: rename index files to use module name
..

PoC: Chore: rename index files to use module name

- Rename all index.* files to use their enclosing folder's name. e.g.,
  app/app.tsx instead index.tsx. This change will require the Marvin
  staging server to launch `node dist/server/server` instead of
  `dist/server/index`.

- Rename all filenames to shish-kebab-case.

- Add a default export to with-context and a named export to page, and
  lowercase the named link export for consistency.

Change-Id: I728cf2e7621162f03178fd614c2e7b4034228a16
---
R docs/changelog.md
M docs/development.md
M docs/setting-a-staging-server.md
M package.json
M readme.md
R src/client/client.css
R src/client/client.tsx
R src/common/components/app/app.css
R src/common/components/app/app.test.ts
R src/common/components/app/app.tsx
R src/common/components/link/link.tsx
M src/common/components/pages/about.tsx
M src/common/components/pages/index.tsx
M src/common/components/pages/not-found.tsx
M src/common/components/pages/wiki.tsx
R src/common/components/with-context/with-context.ts
M src/server/assets/manifest.ts
R src/server/components/page/page.tsx
R src/server/server.tsx
R test/server/components/page/page.test.ts
M webpack.config.ts
21 files changed, 49 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/87/377387/1

diff --git a/docs/CHANGELOG.md b/docs/changelog.md
similarity index 100%
rename from docs/CHANGELOG.md
rename to docs/changelog.md
diff --git a/docs/development.md b/docs/development.md
index daa02e0..6568bd4 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -54,7 +54,7 @@
 * Build production artifacts in dist/
   * `npm run build`
 * Run the production server with:
-  * `NODE_ENV=production node dist/server/index.js`
+  * `NODE_ENV=production node dist/server/server`
 
 ## Coding conventions
 
@@ -116,11 +116,21 @@
 });
 ```
 
-### Naming
+### Identifier Naming
 
 - Static constants should be written in `SHOUTING_SNAKE_CASE`. All other
   variables should be written in `camelCase`.
 
+### Filenaming
+
+- All filenames are shish-kebab-case.
+- The filenames, not the enclosing folder, should describe the module. For
+  example:
+  - Prefer: app/app.tsx, client/client.css, routers/router.test,ts.
+  - Avoid: app/index.tsx, client/index.css, routers/index.test.ts.
+  The reason is that some editors use filenames for UI cues and naming
+  everything "index.x" makes it difficult to distinguish among files quickly.
+
 ## Environment variables
 
 See [configuration](../src/server/configuration.ts).
diff --git a/docs/setting-a-staging-server.md b/docs/setting-a-staging-server.md
index 159c06d..e0678b2 100644
--- a/docs/setting-a-staging-server.md
+++ b/docs/setting-a-staging-server.md
@@ -165,7 +165,7 @@
 cp -R node_modules/ /home/marvin/dist/node_modules
 
 echo "Running new server version"
-NODE_ENV=production node /home/marvin/dist/server/index.js &
+NODE_ENV=production node /home/marvin/dist/server/server &
 ```
 
 And make it executable
diff --git a/package.json b/package.json
index ca5b33e..b7f54cb 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
 "--- HOOKS ---": "# Triggered scripts.",
 "precommit": "npm test -s",
 "--- INTERNAL ---": "# Private scripts.",
-"start:server": "nodemon -i dist -i src/client -e js,json,ts,tsx 
${VERBOSE:--q} -x 'ts-node -P src/server src/server'",
+"start:server": "nodemon -i dist -i src/client -e js,json,ts,tsx 
${VERBOSE:--q} -x 'ts-node -P src/server src/server/server'",
 "start:client": "webpack-dev-server -dw",
 "build:server": "tsc -p src/server && copyup 'src/**/*.css' dist/",
 "build:client": "webpack -p"
diff --git a/readme.md b/readme.md
index 925e131..7d3b412 100644
--- a/readme.md
+++ b/readme.md
@@ -17,7 +17,7 @@
 
 Check out our [docs](./docs) folder for all the documentation:
 
-* [CHANGELOG](docs/CHANGELOG.md)
+* [Changelog](docs/changelog.md)
 
 ### [License](docs/license.txt) (GPLv2+)
 
diff --git a/src/client/index.css b/src/client/client.css
similarity index 100%
rename from src/client/index.css
rename to src/client/client.css
diff --git a/src/client/index.tsx b/src/client/client.tsx
similarity index 91%
rename from src/client/index.tsx
rename to src/client/client.tsx
index bb0be07..1f90396 100644
--- a/src/client/index.tsx
+++ b/src/client/client.tsx
@@ -1,7 +1,7 @@
-import "./index.css";
+import "./client.css";
 import { RouteResponse, newRouter } from "../common/routers/router";
 import { h, render } from "preact";
-import { WithContext } from "../client/components/with-context";
+import WithContext from "../common/components/with-context/with-context";
 import newHistory from "history/createBrowserHistory";
 import { routes } from "../common/routers/api";
 
diff --git 

[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-21109 only clear caches once on cli script, consolidate ...

2017-09-11 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377386 )

Change subject: CRM-21109 only clear caches once on cli script, consolidate code
..

CRM-21109 only clear caches once on cli script, consolidate code

This is a combination of the commits in
https://github.com/civicrm/civicrm-core/pull/10943

Bringing this in does not make any actual change for us. However, it makes it 
easier for us
to play with the following options

1) setting cache mode to FALSE on a per process basis.
Currently there are statics to try to ensure that caches are flushed
only once per process, but without this the add to group & remove from
group functions bypass them. From a script
CRM_Core_Config::setPermitCacheFlushMode(FALSE);
would prevent cache flushing in the session for group_contact_cache & acl 
caches until the
script ends or it is retoggled. Also acl caches were not previously subject to 
the statics.
2)We would consider flushing caches by cron rather than during script runtime. 
There
is a setting for that & we could extend to cover acl cache. Flushing by cron
permits (optionally) the use of TRUNCATE - which appears to be faster for 
everyone in the world but us :-)

Change-Id: Ib790939421d3b7ce5d2e258154a8015b8652234f
---
M CRM/ACL/BAO/Cache.php
M CRM/Contact/BAO/Contact.php
M CRM/Contact/BAO/Contact/Utils.php
M CRM/Contact/BAO/GroupContact.php
M CRM/Contact/BAO/GroupContactCache.php
M CRM/Contact/Form/Merge.php
M CRM/Contact/Import/Form/Preview.php
M CRM/Contact/Import/Parser/Contact.php
M CRM/Core/Config.php
M CRM/Dedupe/Merger.php
M bin/cli.class.php
11 files changed, 57 insertions(+), 59 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/86/377386/1

diff --git a/CRM/ACL/BAO/Cache.php b/CRM/ACL/BAO/Cache.php
index e1e989c..d6f156d 100644
--- a/CRM/ACL/BAO/Cache.php
+++ b/CRM/ACL/BAO/Cache.php
@@ -142,6 +142,9 @@
* Deletes all the cache entries.
*/
   public static function resetCache() {
+if (!CRM_Core_Config::isPermitCacheFlushMode()) {
+  return;
+}
 // reset any static caching
 self::$_cache = NULL;
 
diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php
index 0460b22..f9edbba 100644
--- a/CRM/Contact/BAO/Contact.php
+++ b/CRM/Contact/BAO/Contact.php
@@ -356,9 +356,7 @@
 //add website
 CRM_Core_BAO_Website::create($params['website'], $contact->id, 
$skipDelete);
 
-//get userID from session
-$session = CRM_Core_Session::singleton();
-$userID = $session->get('userID');
+$userID = CRM_Core_Session::singleton()->get('userID');
 // add notes
 if (!empty($params['note'])) {
   if (is_array($params['note'])) {
@@ -432,13 +430,7 @@
   'name'
 );
 
-if (!$config->doNotResetCache) {
-  // Note: doNotResetCache flag is currently set by import contact process 
and merging,
-  // since resetting and
-  // rebuilding cache could be expensive (for many contacts). We might 
come out with better
-  // approach in future.
-  CRM_Contact_BAO_Contact_Utils::clearContactCaches($contact->id);
-}
+CRM_Contact_BAO_Contact_Utils::clearContactCaches();
 
 if ($invokeHooks) {
   if ($isEdit) {
diff --git a/CRM/Contact/BAO/Contact/Utils.php 
b/CRM/Contact/BAO/Contact/Utils.php
index 9cbb44d..2ac9af4 100644
--- a/CRM/Contact/BAO/Contact/Utils.php
+++ b/CRM/Contact/BAO/Contact/Utils.php
@@ -897,18 +897,21 @@
* caches, but are backing off from this with every release. Compromise 
between ease of coding versus
* performance versus being accurate at that very instant
*
-   * @param $contactID
-   *   The contactID that was edited / deleted.
+   * @param bool $isEmptyPrevNextTable
+   *   Should the civicrm_prev_next table be cleared of any contact entries.
+   *   This is currently done from import but not other places and would
+   *   likely affect user experience in unexpected ways. Existing behaviour 
retained
+   *   ... reluctantly.
*/
-  public static function clearContactCaches($contactID = NULL) {
-// clear acl cache if any.
-CRM_ACL_BAO_Cache::resetCache();
-
-if (empty($contactID)) {
-  // also clear prev/next dedupe cache - if no contactID passed in
+  public static function clearContactCaches($isEmptyPrevNextTable = FALSE) {
+if (!CRM_Core_Config::isPermitCacheFlushMode()) {
+  return;
+}
+if ($isEmptyPrevNextTable) {
   CRM_Core_BAO_PrevNextCache::deleteItem();
 }
-
+// clear acl cache if any.
+CRM_ACL_BAO_Cache::resetCache();
 CRM_Contact_BAO_GroupContactCache::opportunisticCacheFlush();
   }
 
diff --git a/CRM/Contact/BAO/GroupContact.php b/CRM/Contact/BAO/GroupContact.php
index 8833d19..73bf59b 100644
--- a/CRM/Contact/BAO/GroupContact.php
+++ b/CRM/Contact/BAO/GroupContact.php
@@ -143,15 +143,7 @@
 list($numContactsAdded, $numContactsNotAdded)
   = 

[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-20722: 'Lock wait timeout exceeded' error triggered on s...

2017-09-11 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377385 )

Change subject: CRM-20722: 'Lock wait timeout exceeded' error triggered on 
smart group cache rebuild
..

CRM-20722: 'Lock wait timeout exceeded' error triggered on smart group cache 
rebuild

This patch is merged upstream & I am submitting it &
https://github.com/civicrm/civicrm-core/pull/10943

to our codebase.

Doing this
a) syncs us with upstream in the area we are working on
b) adds some code consolidation making it easier for us to tinker with the 
impact of
cache tables.

Note that this change switches from one sql call to many when clearing groups 
from
the group_contact_cache table. I'm thinking this is probably not a problem for 
us as we have
not that many groups (& hopefully we can further reduce them).

Also the apparent COMMIT is a bit of a a myth - CRM_Core_Transaction does weird 
complex
transaction nesting stuff...

Change-Id: I3d6505b04af1134884f660d71316afb2490221d1
---
M CRM/Contact/BAO/GroupContactCache.php
1 file changed, 45 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/85/377385/1

diff --git a/CRM/Contact/BAO/GroupContactCache.php 
b/CRM/Contact/BAO/GroupContactCache.php
index e0d041a..8875275 100644
--- a/CRM/Contact/BAO/GroupContactCache.php
+++ b/CRM/Contact/BAO/GroupContactCache.php
@@ -300,12 +300,12 @@
* @todo remove last call to this function from outside the class then make 
function protected,
* enforce groupID as an array & remove non group handling.
*
-   * @param int $groupID
+   * @param int $groupIDs
*   the groupID to delete cache entries, NULL for all groups.
* @param bool $onceOnly
*   run the function exactly once for all groups.
*/
-  public static function remove($groupID = NULL, $onceOnly = TRUE) {
+  public static function remove($groupIDs = NULL, $onceOnly = TRUE) {
 static $invoked = FALSE;
 
 // typically this needs to happy only once per instance
@@ -316,21 +316,21 @@
 if (
   $onceOnly &&
   $invoked &&
-  $groupID == NULL
+  $groupIDs == NULL
 ) {
   return;
 }
 
-if ($groupID == NULL) {
+if ($groupIDs == NULL) {
   $invoked = TRUE;
 }
-elseif (is_array($groupID)) {
-  foreach ($groupID as $gid) {
+elseif (is_array($groupIDs)) {
+  foreach ($groupIDs as $gid) {
 unset(self::$_alreadyLoaded[$gid]);
   }
 }
-elseif ($groupID && array_key_exists($groupID, self::$_alreadyLoaded)) {
-  unset(self::$_alreadyLoaded[$groupID]);
+elseif ($groupIDs && array_key_exists($groupIDs, self::$_alreadyLoaded)) {
+  unset(self::$_alreadyLoaded[$groupIDs]);
 }
 
 $refresh = NULL;
@@ -340,7 +340,7 @@
   2 => array(self::getRefreshDateTime(), 'String'),
 );
 
-if (!isset($groupID)) {
+if (!isset($groupIDs)) {
   if ($smartGroupCacheTimeout == 0) {
 $query = "
 DELETE FROM civicrm_group_contact_cache
@@ -352,7 +352,6 @@
 ";
   }
   else {
-
 $query = "
 DELETE gc
 FROM   civicrm_group_contact_cache gc
@@ -372,44 +371,49 @@
 ANDrefresh_date IS NULL
 ";
   }
-}
-elseif (is_array($groupID)) {
-  $groupIDs = implode(', ', $groupID);
-  $query = "
-DELETE g
-FROM   civicrm_group_contact_cache g
-WHERE  g.group_id IN ( $groupIDs )
-";
-  $update = "
-UPDATE civicrm_group g
-SETcache_date = null,
-   refresh_date = null
-WHERE  id IN ( $groupIDs )
-";
+
+  CRM_Core_DAO::executeQuery($query, $params);
+  if ($refresh) {
+CRM_Core_DAO::executeQuery($refresh, $params);
+  }
+  // also update the cache_date for these groups
+  CRM_Core_DAO::executeQuery($update, $params);
 }
 else {
-  $query = "
-DELETE g
-FROM   civicrm_group_contact_cache g
-WHERE  g.group_id = %1
-";
-  $update = "
-UPDATE civicrm_group g
-SETcache_date = null,
-   refresh_date = null
-WHERE  id = %1
-";
-  $params = array(1 => array($groupID, 'Integer'));
+  foreach ((array) $groupIDs as $groupID) {
+self::clearGroupContactCache($groupID);
+  }
 }
+  }
+
+  /**
+   * Function to clear group contact cache and reset the corresponding
+   *  group's cache and refresh date
+   *
+   *  @param int $groupID
+   *
+   */
+  public static function clearGroupContactCache($groupID) {
+$transaction = new CRM_Core_Transaction();
+$query = "
+DELETE  g
+  FROM  civicrm_group_contact_cache g
+  WHERE  g.group_id = %1 ";
+
+$update = "
+  UPDATE civicrm_group g
+SETcache_date = null, refresh_date = null
+WHERE  id = %1 ";
+
+$params = array(
+  1 => array($groupID, 'Integer'),
+);
 
 CRM_Core_DAO::executeQuery($query, $params);
-
-if ($refresh) {
-  CRM_Core_DAO::executeQuery($refresh, $params);
-}
-
 // also 

[MediaWiki-commits] [Gerrit] mediawiki...minus-x[master]: Add "homepage" to composer.json

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377383 )

Change subject: Add "homepage" to composer.json
..


Add "homepage" to composer.json

Change-Id: Ice07828b361263e1c3052b7ee08cf988f3571828
---
M composer.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/composer.json b/composer.json
index 67c9b19..f5e408f 100644
--- a/composer.json
+++ b/composer.json
@@ -2,6 +2,7 @@
"name": "mediawiki/minus-x",
"description": "Removes executable bit from files that shouldn't be 
executable",
"license": "GPL-3.0+",
+   "homepage": "https://www.mediawiki.org/wiki/MinusX;,
"authors": [
{
"name": "Kunal Mehta",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice07828b361263e1c3052b7ee08cf988f3571828
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/minus-x
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...minus-x[master]: Add HISTORY.md

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377384 )

Change subject: Add HISTORY.md
..


Add HISTORY.md

Change-Id: I204d819b8da5093c54267b1c6892588dfd0addf5
---
A HISTORY.md
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/HISTORY.md b/HISTORY.md
new file mode 100644
index 000..f5de459
--- /dev/null
+++ b/HISTORY.md
@@ -0,0 +1,5 @@
+# MinusX release history #
+
+## 0.1.0 / 2017-09-12 ##
+
+* Initial release (Kunal Mehta)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I204d819b8da5093c54267b1c6892588dfd0addf5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/minus-x
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...minus-x[master]: Add HISTORY.md

2017-09-11 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377384 )

Change subject: Add HISTORY.md
..

Add HISTORY.md

Change-Id: I204d819b8da5093c54267b1c6892588dfd0addf5
---
A HISTORY.md
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/minus-x 
refs/changes/84/377384/1

diff --git a/HISTORY.md b/HISTORY.md
new file mode 100644
index 000..f5de459
--- /dev/null
+++ b/HISTORY.md
@@ -0,0 +1,5 @@
+# MinusX release history #
+
+## 0.1.0 / 2017-09-12 ##
+
+* Initial release (Kunal Mehta)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I204d819b8da5093c54267b1c6892588dfd0addf5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/minus-x
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...minus-x[master]: Add "homepage" to composer.json

2017-09-11 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377383 )

Change subject: Add "homepage" to composer.json
..

Add "homepage" to composer.json

Change-Id: Ice07828b361263e1c3052b7ee08cf988f3571828
---
M composer.json
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/minus-x 
refs/changes/83/377383/1

diff --git a/composer.json b/composer.json
index 67c9b19..f5e408f 100644
--- a/composer.json
+++ b/composer.json
@@ -2,6 +2,7 @@
"name": "mediawiki/minus-x",
"description": "Removes executable bit from files that shouldn't be 
executable",
"license": "GPL-3.0+",
+   "homepage": "https://www.mediawiki.org/wiki/MinusX;,
"authors": [
{
"name": "Kunal Mehta",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice07828b361263e1c3052b7ee08cf988f3571828
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/minus-x
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...GuidedTour[master]: Replace remaining values with WikimediaUI Style Guide ones

2017-09-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377382 )

Change subject: Replace remaining values with WikimediaUI Style Guide ones
..

Replace remaining values with WikimediaUI Style Guide ones

Also removing superflous extension mixin, which is covered
by mediawiki.mixins.

Change-Id: Ieaa97944005ccbcb8a0562bb8a8707664b55fdb9
---
M modules/ext.guidedTour.less
D modules/ext.guidedTour.mixins.less
2 files changed, 22 insertions(+), 31 deletions(-)


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

diff --git a/modules/ext.guidedTour.less b/modules/ext.guidedTour.less
index 3ab4594..cf73eff 100644
--- a/modules/ext.guidedTour.less
+++ b/modules/ext.guidedTour.less
@@ -1,6 +1,5 @@
 @import 'mediawiki.mixins';
 @import 'mediawiki.mixins.animation';
-@import 'ext.guidedTour.mixins';
 
 // Variables
 
@@ -10,16 +9,15 @@
 // Rules
 
 .guider {
-   background: #fff;
+   background-color: #fff;
position: absolute;
-   border: 1px solid #c8ccd1;
width: 500px;
-   padding: 12px;
-   outline: 0;
-   font-size: 14px;
+   border: 1px solid #c8ccd1;
+   border-radius: 2px;
+   padding: 16px;
+   font-size: 0.875em; // equals `14px`; not inherited from 
`.mw-body-content`, as we insert at `body`
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
.box-shadow( 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ) );
-   border-radius: 3px;
z-index: 10005 !important;
 }
 
@@ -44,15 +42,9 @@
 .guider_content {
position: relative;
 
-   h1 {
-   float: left;
-   width: 95%;
+   h1,
+   p {
color: #222;
-   font-size: 1.5em;
-   font-weight: bold;
-   padding-top: 0.1em;
-   margin-bottom: 4px;
-   border-bottom: 0;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
@@ -60,17 +52,21 @@
word-wrap: break-word;
}
 
+   h1 {
+   float: left;
+   width: 95%;
+   font-size: 1.5em;
+   font-weight: bold;
+   padding: 0;
+   margin-bottom: 8px;
+   border-bottom: 0;
+   }
+
p {
clear: both;
font-size: 1em;
-   line-height: 1.3em;
-   color: #222;
+   line-height: 1.3;
margin-bottom: 1.5em;
-   -webkit-hyphens: auto;
-   -moz-hyphens: auto;
-   -ms-hyphens: auto;
-   hyphens: auto;
-   word-wrap: break-word;
}
 }
 
@@ -214,10 +210,10 @@
}
 }
 
-.position_guider_arrow_by_direction(up, @half_guider_arrow_height, 0);
-.position_guider_arrow_by_direction(right, 0, -@half_guider_arrow_height);
-.position_guider_arrow_by_direction(down, -@half_guider_arrow_height, 0);
-.position_guider_arrow_by_direction(left, 0, @half_guider_arrow_height);
+.position_guider_arrow_by_direction( up, @half_guider_arrow_height, 0 );
+.position_guider_arrow_by_direction( right, 0, -@half_guider_arrow_height );
+.position_guider_arrow_by_direction( down, -@half_guider_arrow_height, 0 );
+.position_guider_arrow_by_direction( left, 0, @half_guider_arrow_height );
 
 .ie8 .guider_arrow_inner {
-ms-filter: 
"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', 
M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, 
M22=0.7071067811865476)"; /* stylelint-disable-line string-quotes */
diff --git a/modules/ext.guidedTour.mixins.less 
b/modules/ext.guidedTour.mixins.less
deleted file mode 100644
index 1f461c1..000
--- a/modules/ext.guidedTour.mixins.less
+++ /dev/null
@@ -1,5 +0,0 @@
-.box-shadow(...) {
-   -webkit-box-shadow: @arguments;
-   -moz-box-shadow: @arguments;
-   box-shadow: @arguments;
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieaa97944005ccbcb8a0562bb8a8707664b55fdb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki...wikidiff2[master]: Extend WikiDiff2 to show changes inside moved paragraphs

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/319866 )

Change subject: Extend WikiDiff2 to show changes inside moved paragraphs
..


Extend WikiDiff2 to show changes inside moved paragraphs

This is the moved-line-diff branch by @jkroll copied from GitHub that was 
started to extend WikiDiff2 with options to make changes in moved paragraphs 
visible.

See also https://github.com/wmde/wikidiff2/compare/moved-line-diff

Bug: T150740
Bug: T149674
Change-Id: Ibf53658299115c2a86628c30e8ebe96795379193
---
M InlineDiff.cpp
M InlineDiff.h
M TableDiff.cpp
M TableDiff.h
M Wikidiff2.cpp
M Wikidiff2.h
M ext_wikidiff2.php
M hhvm_wikidiff2.cpp
M php_wikidiff2.cpp
M php_wikidiff2.h
M tests/001.phpt
A tests/007.phpt
M tests/008.phpt
13 files changed, 439 insertions(+), 53 deletions(-)

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



diff --git a/InlineDiff.cpp b/InlineDiff.cpp
index bc2ed54..2969b77 100644
--- a/InlineDiff.cpp
+++ b/InlineDiff.cpp
@@ -10,7 +10,7 @@
printWrappedLine("", line, 
"\n");
 }
 
-void InlineDiff::printWordDiff(const String& text1, const String& text2)
+void InlineDiff::printWordDiff(const String& text1, const String& text2, bool 
printLeft, bool printRight, const String & srcAnchor, const String & dstAnchor)
 {
WordVector words1, words2;
 
@@ -19,6 +19,8 @@
WordDiff worddiff(words1, words2, MAX_WORD_LEVEL_DIFF_COMPLEXITY);
String word;
 
+   //  todo: omit left side & do strike-through according to 
printLeft/printRight
+
result += "";
for (unsigned i = 0; i < worddiff.size(); ++i) {
DiffOp & op = worddiff[i];
diff --git a/InlineDiff.h b/InlineDiff.h
index 01304ca..4cff620 100644
--- a/InlineDiff.h
+++ b/InlineDiff.h
@@ -8,7 +8,7 @@
protected:
void printAdd(const String& line);
void printDelete(const String& line);
-   void printWordDiff(const String& text1, const String& text2);
+   void printWordDiff(const String& text1, const String& text2, 
bool printLeft = true, bool printRight = true, const String & srcAnchor = "", 
const String & dstAnchor = "");
void printBlockHeader(int leftLine, int rightLine);
void printContext(const String& input);
 
diff --git a/TableDiff.cpp b/TableDiff.cpp
index 9c44cc2..7d85f32 100644
--- a/TableDiff.cpp
+++ b/TableDiff.cpp
@@ -23,7 +23,7 @@
"\n";
 }
 
-void TableDiff::printWordDiff(const String & text1, const String & text2)
+void TableDiff::printWordDiff(const String & text1, const String & text2, bool 
printLeft, bool printRight, const String & srcAnchor, const String & dstAnchor)
 {
WordVector words1, words2;
 
@@ -33,17 +33,43 @@
 
//debugPrintWordDiff(worddiff);
 
-   // print twice; first for left side, then for right side
-   result += "\n"
-   "  −\n"
-   "  ";
-   printWordDiffSide(worddiff, false);
-   result += "\n"
-   "  +\n"
-   "  ";
-   printWordDiffSide(worddiff, true);
-   result += "\n"
-   "\n";
+   result += "\n";
+
+   // print left side or blank placeholder.
+   if (printLeft) {
+   result += "  ";
+   if(dstAnchor != "")
+   result += "";
+   else
+   result += "−";
+   result += "\n";
+   result += "  ";
+   if(srcAnchor != "")
+   result += "";
+   printWordDiffSide(worddiff, false);
+   result += "\n";
+   } else {
+   result += "  \n";
+   }
+
+   // print right side or blank placeholder.
+   if (printRight) {
+   result += "  ";
+   if(dstAnchor != "")
+   result += "";
+   else
+   result += "+";
+   result += "\n";
+   result += "  ";
+   if(srcAnchor != "")
+   result += "";
+   printWordDiffSide(worddiff, true);
+   result += "\n"
+   "\n";
+   } else {
+   result += "  \n"
+   "\n";
+   }
 }
 
 void TableDiff::printWordDiffSide(WordDiff , bool added)
diff --git a/TableDiff.h b/TableDiff.h
index 0a3adc6..9ec560d 100644
--- a/TableDiff.h
+++ b/TableDiff.h
@@ -8,7 +8,7 @@
protected:
void printAdd(const String& line);
void printDelete(const String& line);
-   void printWordDiff(const String& text1, const String & text2);
+   void printWordDiff(const String& text1, const String & text2, 
bool printLeft = true, bool printRight = true, const String & srcAnchor = "", 
const String & dstAnchor = "");
void printTextWithDiv(const String& 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make $wgExperimentalHtmlIds fall back on modern HTML5 mode

2017-09-11 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377381 )

Change subject: Make $wgExperimentalHtmlIds fall back on modern HTML5 mode
..

Make $wgExperimentalHtmlIds fall back on modern HTML5 mode

This is a first step of deprecation, next would be to swap the two
modes, making html5 fall back on html5-legacy. No separate release
notes are required as this is part of deprecation already documented.

Change-Id: I132cffbc70bf76f9863d61fd109c73da7bdaeb18
---
M includes/Setup.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/377381/1

diff --git a/includes/Setup.php b/includes/Setup.php
index 68e3d96..d4612dd 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -284,7 +284,7 @@
 
 // Convert this deprecated setting to modern system
 if ( $wgExperimentalHtmlIds ) {
-   $wgFragmentMode = [ 'html5-legacy', 'legacy' ];
+   $wgFragmentMode = [ 'html5-legacy', 'html5' ];
 }
 
 $rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't percent-encode HTML5 IDs

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/375099 )

Change subject: Don't percent-encode HTML5 IDs
..


Don't percent-encode HTML5 IDs

During the TechCom meeting, it was decided this is the better way.

Bug: T152540

Change-Id: I6c3ec1c407225b4e925b7373bf52208e2f6b6c4a
---
M includes/DefaultSettings.php
M includes/Linker.php
M includes/Sanitizer.php
M resources/src/mediawiki/mediawiki.util.js
M tests/parser/parserTests.txt
M tests/phpunit/includes/SanitizerTest.php
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
7 files changed, 37 insertions(+), 55 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 86b1bdc..5b77d16 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3394,8 +3394,8 @@
 /**
  * How should section IDs be encoded?
  * This array can contain 1 or 2 elements, each of them can be one of:
- * - 'html5'  is modern HTML5 style encoding with minimal escaping. Allows to
- *display Unicode characters in many browsers' address bars.
+ * - 'html5'  is modern HTML5 style encoding with minimal escaping. Displays 
Unicode
+ *characters in most browsers' address bars.
  * - 'legacy' is old MediaWiki-style encoding, e.g. 啤酒 turns into 
.E5.95.A4.E9.85.92
  * - 'html5-legacy' corresponds to DEPRECATED $wgExperimentalHtmlIds mode. DO 
NOT use
  *it for anything but migration off that mode (see below).
diff --git a/includes/Linker.php b/includes/Linker.php
index aedb704..dccd99c 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -1539,10 +1539,16 @@
if ( $sectionIndex !== false ) {
$classes .= " tocsection-$sectionIndex";
}
-   return "\n' .
-   $tocnumber . ' ' .
-   $tocline . '';
+
+   // \n
+   // $tocnumber $tocline
+   return "\n" . Html::openElement( 'li', [ 'class' => $classes ] )
+   . Html::rawElement( 'a',
+   [ 'href' => "#$anchor" ],
+   Html::element( 'span', [ 'class' => 'tocnumber' 
], $tocnumber )
+   . ' '
+   . Html::rawElement( 'span', [ 'class' 
=> 'toctext' ], $tocline )
+   );
}
 
/**
diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index ed09701..7d17cd1 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -1284,7 +1284,6 @@
$mode = $wgFragmentMode[self::ID_PRIMARY];
 
$id = self::escapeIdInternal( $id, $mode );
-   $id = self::urlEscapeId( $id, $mode );
 
return $id;
}
@@ -1302,23 +1301,6 @@
global $wgExternalInterwikiFragmentMode;
 
$id = self::escapeIdInternal( $id, 
$wgExternalInterwikiFragmentMode );
-   $id = self::urlEscapeId( $id, $wgExternalInterwikiFragmentMode 
);
-
-   return $id;
-   }
-
-   /**
-* Helper for escapeIdFor*() functions. URL-escapes the ID if needed.
-*
-* @param string $id String to escape
-* @param string $mode One of modes from $wgFragmentMode
-* @return string
-*/
-   private static function urlEscapeId( $id, $mode ) {
-   if ( $mode === 'html5' ) {
-   $id = urlencode( $id );
-   $id = str_replace( '%3A', ':', $id );
-   }
 
return $id;
}
diff --git a/resources/src/mediawiki/mediawiki.util.js 
b/resources/src/mediawiki/mediawiki.util.js
index 34f7eba..fb34a89 100644
--- a/resources/src/mediawiki/mediawiki.util.js
+++ b/resources/src/mediawiki/mediawiki.util.js
@@ -90,14 +90,9 @@
 * @return {string} Encoded string
 */
escapeIdForLink: function ( str ) {
-   var mode = mw.config.get( 'wgFragmentMode' )[ 0 ],
-   id = escapeIdInternal( str, mode );
+   var mode = mw.config.get( 'wgFragmentMode' )[ 0 ];
 
-   if ( mode === 'html5' ) {
-   id = encodeURIComponent( id ).replace( /%3A/g, 
':' );
-   }
-
-   return id;
+   return escapeIdInternal( str, mode );
},
 
/**
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 3f93793..bf2679f 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -29307,10 +29307,10 @@
 
 1 Foo bar
 2 foo Bar
-3 Тест
-4 Тест
-5 тест
-6 Hey  # " %: '
+3 Тест
+4 Тест
+5 тест
+6 Hey  # " %: '
 
 
 

[MediaWiki-commits] [Gerrit] marvin[master]: Fix: script production script and CSS references

2017-09-11 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377380 )

Change subject: Fix: script production script and CSS references
..

Fix: script production script and CSS references

Anchor chunk requests to / because they come from /public/... not
/some/directory/public/...

Change-Id: I8664aac877e2cfdab9dd76b09a4fda0a9a5a6ade
---
M src/server/components/Page/index.tsx
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/80/377380/1

diff --git a/src/server/components/Page/index.tsx 
b/src/server/components/Page/index.tsx
index ef32009..f9371e1 100644
--- a/src/server/components/Page/index.tsx
+++ b/src/server/components/Page/index.tsx
@@ -25,15 +25,16 @@
 
 
 
-
 {title ? `${title} - ` : ""}Marvin
+
+
 {assets.map(path => (
-  
+  
 ))}
   
   
 {children}
-{assets.map(path => )}
+{assets.map(path => )}
   
 
   );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8664aac877e2cfdab9dd76b09a4fda0a9a5a6ade
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] mediawiki...GuidedTour[master]: build: Remove 'no-duplicate-selectors' stylelint exception rule

2017-09-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377379 )

Change subject: build: Remove 'no-duplicate-selectors' stylelint exception rule
..

build: Remove 'no-duplicate-selectors' stylelint exception rule

Removing 'no-duplicate-selectors' stylelint exception rule and
make pass.

Change-Id: Ia90b8fc2aa5141098e4123e8e65a6161363a6a0d
---
M .stylelintrc.json
M modules/ext.guidedTour.less
2 files changed, 11 insertions(+), 17 deletions(-)


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

diff --git a/.stylelintrc.json b/.stylelintrc.json
index 1953a5e..c0d30c6 100644
--- a/.stylelintrc.json
+++ b/.stylelintrc.json
@@ -2,7 +2,6 @@
"extends": "stylelint-config-wikimedia",
"rules": {
"declaration-no-important": null,
-   "no-duplicate-selectors": null,
"selector-no-id": null
}
 }
diff --git a/modules/ext.guidedTour.less b/modules/ext.guidedTour.less
index 7c051f2..3ab4594 100644
--- a/modules/ext.guidedTour.less
+++ b/modules/ext.guidedTour.less
@@ -127,8 +127,8 @@
 .guider_arrow_inner_container {
position: relative;
overflow: hidden;
-   width: 100%;
-   height: 100%;
+   width: @guider_arrow_height;
+   height: @guider_arrow_height;
 }
 
 .guider_arrow_inner {
@@ -162,20 +162,6 @@
}
 }
 
-.guider_arrow_inner_container {
-   height: @guider_arrow_height;
-   width: @guider_arrow_height;
-
-   .guider_arrow_right & {
-   /* @noflip */
-   left: -@half_guider_arrow_height;
-   }
-
-   .guider_arrow_down & {
-   top: -@half_guider_arrow_height;
-   }
-}
-
 .guider_arrow_up {
display: block;
top: -@half_guider_arrow_height;
@@ -185,11 +171,20 @@
display: block;
/* @noflip */
right: -@half_guider_arrow_height;
+
+   & .guider_arrow_inner_container {
+   /* @noflip */
+   left: -@half_guider_arrow_height;
+   }
 }
 
 .guider_arrow_down {
display: block;
bottom: -@half_guider_arrow_height;
+
+   & .guider_arrow_inner_container {
+   top: -@half_guider_arrow_height;
+   }
 }
 
 .guider_arrow_left {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia90b8fc2aa5141098e4123e8e65a6161363a6a0d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Add script for loading category data

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377372 )

Change subject: Add script for loading category data
..


Add script for loading category data

Use: loadCategoryDump.sh WIKI

Bug: T157676
Change-Id: I138ed5243fc58acf7961f4e6a5b81190b13b6f78
---
A dist/src/script/loadCategoryDump.sh
A docs/Categories.md
2 files changed, 42 insertions(+), 0 deletions(-)

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



diff --git a/dist/src/script/loadCategoryDump.sh 
b/dist/src/script/loadCategoryDump.sh
new file mode 100755
index 000..25cb738
--- /dev/null
+++ b/dist/src/script/loadCategoryDump.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+if [ -r /etc/wdqs/vars.sh ]; then
+  . /etc/wdqs/vars.sh
+fi
+
+SOURCE=${SOURCE:-"https://dumps.wikimedia.org/other/categoriesrdf"}
+DATA_DIR=${DATA_DIR:-"/srv/wdqs"}
+HOST=http://localhost:
+CONTEXT=bigdata
+NAMESPACE=categories
+WIKI=$1
+
+if [ -z "$WIKI" ]; then
+   echo "Use: $0 WIKI-NAME"
+   exit 1
+fi
+
+TS=$(curl -s -XGET $SOURCE/lastdump/$WIKI-categories.last)
+if [ -z "$TS" ]; then
+   echo "Could not load timestamp"
+   exit 1
+fi
+FILENAME=$WIKI-$TS-categories.ttl.gz
+curl -s -XGET $SOURCE/$TS/$FILENAME -o $DATA_DIR/$FILENAME
+if [ ! -s $DATA_DIR/$FILENAME ]; then
+   echo "Could not download $FILENAME"
+   exit 1
+fi 
+curl -XPOST --data-binary update="LOAD " 
$HOST/$CONTEXT/namespace/$NAMESPACE/sparql
\ No newline at end of file
diff --git a/docs/Categories.md b/docs/Categories.md
new file mode 100644
index 000..e5233bc
--- /dev/null
+++ b/docs/Categories.md
@@ -0,0 +1,13 @@
+# Categories
+
+This document describes how to set up and maintain Mediawiki categories graph 
on top of Wikidata Query Service.
+
+# Setup
+
+In order to create categories namespace, run `createNamespace.sh categories`.
+
+# Data loading
+
+To load the data, the dumps should be in 
https://dumps.wikimedia.org/other/categoriesrdf or another place with analogous 
structure pointed to by SOURCE variable.
+
+Run script loadCategoryDump.sh for each wiki, e.g.: `loadCategoryDump.sh 
testwiki`
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I138ed5243fc58acf7961f4e6a5b81190b13b6f78
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix bug in dl-dt list output generation

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376446 )

Change subject: Fix bug in dl-dt list output generation
..


Fix bug in dl-dt list output generation

* An open  (;) should be closed when we encounter a new  (:)
  char even if it is on a new line that has other nested lists inside.

* Tidy was hiding this PHP parser bug by closing a  and opening
  a  when given this HTML: "ab"
  It generates "ab"

  However, a HTML5 parser like RemexHTML, domino (used by Parsoid),
  or browsers don't do this fixup.

* So, what I thought was a bug in RemexHTML turned out to be a bug
  in the PHP parser that was being hidden by the use of Tidy.

* Added a regression test.

Bug: T175099
Change-Id: I6d5b225b82cecf9a43f23837ed8ec359b31aadad
---
M includes/parser/BlockLevelPass.php
M tests/parser/parserTests.txt
2 files changed, 22 insertions(+), 2 deletions(-)

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



diff --git a/includes/parser/BlockLevelPass.php 
b/includes/parser/BlockLevelPass.php
index 599fbf6..fab9ab7 100644
--- a/includes/parser/BlockLevelPass.php
+++ b/includes/parser/BlockLevelPass.php
@@ -257,12 +257,17 @@
$output .= $this->nextItem( 
$prefix[$commonPrefixLength - 1] );
}
 
+   # Close an open  if we have a  (":") 
starting on this line
+   if ( $this->DTopen && $commonPrefixLength > 0 
&& $prefix[$commonPrefixLength - 1] === ':' ) {
+   $output .= $this->nextItem( ':' );
+   }
+
# Open prefixes where appropriate.
if ( $lastPrefix && $prefixLength > 
$commonPrefixLength ) {
$output .= "\n";
}
while ( $prefixLength > $commonPrefixLength ) {
-   $char = substr( $prefix, 
$commonPrefixLength, 1 );
+   $char = $prefix[$commonPrefixLength];
$output .= $this->openList( $char );
 
if ( ';' === $char ) {
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 3f93793..380fe6f 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -4332,6 +4332,21 @@
 
 !! end
 
+# This is a regression test for T175099
+# html/php+tidy is insufficient since Tidy covers up the bug.
+# But once Tidy is replaced with RemexHTML, html/php+tidy is good enough
+!! test
+Definition Lists: Mixed Lists: Test 11
+!! wikitext
+;a
+:*b
+!! html
+a
+
+b
+
+!! end
+
 # The Parsoid team disagrees with the PHP parser's seemingly-random
 # rules regarding dd/dt on the next two tests.  Parsoid is more
 # consistent, and recognizes the shared nesting and keeps the
@@ -4339,7 +4354,7 @@
 # (And tidy again converts  to  before 'bar'.)
 
 !! test
-Definition Lists: Mixed Lists: Test 11
+Definition Lists: Mixed Lists: Test 12
 !! wikitext
 *#*#;*;;foo :bar
 *#*#;boo :baz

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d5b225b82cecf9a43f23837ed8ec359b31aadad
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GuidedTour[master]: Replace outdated colors with WikimediaUI palette ones

2017-09-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377378 )

Change subject: Replace outdated colors with WikimediaUI palette ones
..

Replace outdated colors with WikimediaUI palette ones

Replacing all colors (and box shadows) with current WikimediaUI
palette ones.

Bug: T175660
Change-Id: If983f2762aa0daee21e2bb30f5c31e32974467f5
---
M modules/ext.guidedTour.less
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour 
refs/changes/78/377378/1

diff --git a/modules/ext.guidedTour.less b/modules/ext.guidedTour.less
index 51bf1dc..7c051f2 100644
--- a/modules/ext.guidedTour.less
+++ b/modules/ext.guidedTour.less
@@ -1,6 +1,6 @@
-@import 'ext.guidedTour.mixins';
 @import 'mediawiki.mixins';
 @import 'mediawiki.mixins.animation';
+@import 'ext.guidedTour.mixins';
 
 // Variables
 
@@ -12,13 +12,13 @@
 .guider {
background: #fff;
position: absolute;
-   border: 1px solid #ccc;
+   border: 1px solid #c8ccd1;
width: 500px;
padding: 12px;
outline: 0;
font-size: 14px;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
-   .box-shadow( 0 0 4px rgba( 0, 0, 0, 0.2 ) );
+   .box-shadow( 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ) );
border-radius: 3px;
z-index: 10005 !important;
 }
@@ -47,7 +47,7 @@
h1 {
float: left;
width: 95%;
-   color: #333;
+   color: #222;
font-size: 1.5em;
font-weight: bold;
padding-top: 0.1em;
@@ -64,7 +64,7 @@
clear: both;
font-size: 1em;
line-height: 1.3em;
-   color: #252525;
+   color: #222;
margin-bottom: 1.5em;
-webkit-hyphens: auto;
-moz-hyphens: auto;
@@ -136,9 +136,9 @@
width: 100%;
height: 100%;
background: #fff;
-   border: 1px solid #bbb;
-   .box-shadow(0 0 4px rgba(0, 0, 0, 0.2));
-   .transform-rotate(45deg);
+   border: 1px solid #a2a9b1;
+   .box-shadow( 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ) );
+   .transform-rotate( 45deg );
 }
 
 .guider_arrow {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If983f2762aa0daee21e2bb30f5c31e32974467f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Explore Similar AB test 2

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376509 )

Change subject: Explore Similar AB test 2
..


Explore Similar AB test 2

Testing Explore Similar feature with just language link + icon.
Removing related pages and categories sections.

Bug: T149809, T175647

Change-Id: Ib3a8f9fe0fff5dd163e22e1e7e5feceff8b0d943
---
M resources/ext.cirrus.explore-similar.js
M resources/ext.cirrus.explore-similar.less
2 files changed, 14 insertions(+), 11 deletions(-)

Approvals:
  Tjones: Looks good to me, but someone else must approve
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified
  DCausse: Looks good to me, but someone else must approve



diff --git a/resources/ext.cirrus.explore-similar.js 
b/resources/ext.cirrus.explore-similar.js
index f10248a..0f9b1d3 100644
--- a/resources/ext.cirrus.explore-similar.js
+++ b/resources/ext.cirrus.explore-similar.js
@@ -154,6 +154,7 @@
 *
 * @return {Object} - extended DeferredContentWidget object.
 */
+   /*
function RelatedCategoriesWidget( articleTitle ) {
var config = {
apiConfig: {
@@ -208,6 +209,7 @@
};
return DeferredContentWidget.call( this, config );
}
+   */
 
/**
 * Extends the DeferredContentWidget function with params
@@ -278,6 +280,7 @@
 *
 * @return {Object} - extended DeferredContentWidget object.
 */
+   /*
function RelatedPagesWidget( articleTitle ) {
var config = {
apiConfig: {
@@ -346,6 +349,7 @@
};
return DeferredContentWidget.call( this, config );
}
+   */
 
/**
 * Global array for storing & deleting explore similar buttons
@@ -368,20 +372,10 @@
 * This mapping used in openExploreSimilarItem().
 */
var contentWidgets = {
-   related: new RelatedPagesWidget( 
resultTitle ),
-   categories: new 
RelatedCategoriesWidget( resultTitle ),
languages: new LangLinksWidget( 
resultTitle )
},
$template = $(
'' +
-   '' +
-   l10n.relatedLink +
-   '' +
-   '' +
-   '' +
-   l10n.categoriesLink +
-   '' +
-   '' +
'' +
l10n.languagesLink +
'' +
diff --git a/resources/ext.cirrus.explore-similar.less 
b/resources/ext.cirrus.explore-similar.less
index 3ca379a..3ac4193 100644
--- a/resources/ext.cirrus.explore-similar.less
+++ b/resources/ext.cirrus.explore-similar.less
@@ -13,7 +13,7 @@
width: 100%;
 }
 
-.mw-search-results > li:hover .@{prefix}__buttons {
+.mw-search-results > li .@{prefix}__buttons {
display: inline;
 }
 
@@ -67,6 +67,15 @@
transform: rotate( 0 );
 }
 
+.ext-cirrus__xplr__button[data-es-content='languages']:before {
+   content: '';
+   display: inline-block;
+   height: 15px;
+   width: 19px;
+   margin-right: 2px;
+   background-image: linear-gradient( transparent, transparent ), url( 
data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M13%2019l.8-3h5.3l.9%203h2.2l-4.2-13h-3l-4.2%2013h2.2zm3.5-11l2%206h-4l2-6z%22%20fill%3D%22%23707070%22%2F%3E%3Cpath%20d%3D%22M5%204l.938%201.906h-4.938v2.094h1.594c.6%201.8%201.406%203.206%202.406%204.406-1.1.7-4.313%201.781-4.313%201.781l1.313%201.813s3.487-1.387%204.688-2.188c1%20.7%202.319%201.188%203.719%201.688l.594-2c-1-.3-1.988-.688-2.688-1.188%201.1-1.1%201.9-2.506%202.5-4.406h2.188l.5-2h-5.563l-.938-1.906h-2zm-.188%204h3.781c-.4%201.3-.906%202-1.906%203-1.1-1-1.475-1.7-1.875-3z%22%20fill%3D%22%23707070%22%2F%3E%3C%2Fsvg%3E%0A
 );
+}
+
 .@{prefix}__content {
margin: 0;

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Change popup label colour to green

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377376 )

Change subject: Change popup label colour to green
..


Change popup label colour to green

This is to stop it looking so much like a link that can be clicked on.

Bug: T174219
Change-Id: Icdae8ddf32aa0c08fe0d708eb289bafe53f9b589
---
M resources/modules/popup.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/modules/popup.less b/resources/modules/popup.less
index 53f4fba..12cf3dd 100644
--- a/resources/modules/popup.less
+++ b/resources/modules/popup.less
@@ -14,7 +14,7 @@
}
 
.codemirror-popup-label span {
-   color: #1e90ff;
+   color: #457d39;
}
 
.codemirror-popup-text {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icdae8ddf32aa0c08fe0d708eb289bafe53f9b589
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Samwilson 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Allow deprecated call through phan for test-only code

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377363 )

Change subject: Allow deprecated call through phan for test-only code
..


Allow deprecated call through phan for test-only code

Change-Id: If7c015e19016d523466dc99b0964f8567a4f78fe
---
M includes/Api/SuggestIndex.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/Api/SuggestIndex.php b/includes/Api/SuggestIndex.php
index 31fe236..9484d5b 100644
--- a/includes/Api/SuggestIndex.php
+++ b/includes/Api/SuggestIndex.php
@@ -27,6 +27,7 @@
// and probably should be eventually replaced with something 
more sane.
$updaterScript = 
"extensions/CirrusSearch/maintenance/updateSuggesterIndex.php";
$this->getResult()->addValue( null, 'result',
+   /** @suppress PhanDeprecatedFunction this is a 
test-only api call. */
wfShellExecWithStderr( "unset REQUEST_METHOD; 
/usr/local/bin/mwscript $updaterScript --wiki " . wfWikiID() )
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7c015e19016d523466dc99b0964f8567a4f78fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Fix left padding of root comments

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/373905 )

Change subject: Fix left padding of root comments
..


Fix left padding of root comments

Also fix alignment of ReorderTopicsWidget, and colour
of non-JS reply placeholder (to avoid FOUC).

Bug: T174169
Change-Id: I647d74f24bd824d2bd8ba4f84c199c3538d27ff6
---
M modules/styles/board/menu.less
M modules/styles/board/topic/post.less
M modules/styles/board/topic/titlebar.less
M modules/styles/board/topic/watchlist.less
M modules/styles/flow.variables.less
M modules/styles/flow/widgets/mw.flow.ui.ReorderTopicsWidget.less
M modules/styles/flow/widgets/mw.flow.ui.ReplyWidget.less
M modules/styles/mediawiki.ui/forms.less
8 files changed, 65 insertions(+), 34 deletions(-)

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



diff --git a/modules/styles/board/menu.less b/modules/styles/board/menu.less
index 4a2b696..72ebeee 100644
--- a/modules/styles/board/menu.less
+++ b/modules/styles/board/menu.less
@@ -143,6 +143,10 @@
border-width: 0;
color: @colorTextLight;
}
+
+   .mw-ui-icon.mw-ui-icon-before:before {
+   margin-right: 0;
+   }
}
 
// Correct positioning for ltr/rtl content direction
diff --git a/modules/styles/board/topic/post.less 
b/modules/styles/board/topic/post.less
index 2b8e921..2dcc3cb 100644
--- a/modules/styles/board/topic/post.less
+++ b/modules/styles/board/topic/post.less
@@ -78,7 +78,7 @@
// Nested comments (replies & reply forms)
.flow-replies {
/* @noflip */
-   margin-left: @topicIndent;
+   margin-left: @replyIndent;
/* @noflip */
padding-left: 0.5em;
/* @noflip */
@@ -233,11 +233,19 @@
/* @noflip */
margin: 1em 0 0 @topicIndent;
}
+   .mw-content-ltr .flow-replies & {
+   /* @noflip */
+   margin-left: @replyIndent;
+   }
 
.mw-content-rtl & {
/* @noflip */
margin: 1em @topicIndent 0 0;
}
+   .mw-content-rtl .flow-replies & {
+   /* @noflip */
+   margin-right: @replyIndent;
+   }
 
padding: 0;
 
diff --git a/modules/styles/board/topic/titlebar.less 
b/modules/styles/board/topic/titlebar.less
index e6db91a..0097310 100644
--- a/modules/styles/board/topic/titlebar.less
+++ b/modules/styles/board/topic/titlebar.less
@@ -14,6 +14,28 @@
.flow-menu {
top: 2em;
}
+
+   @media all and ( min-width: @small ) {
+   .flow-topic-titlebar-container,
+   .flow-edit-title-form,
+   .flow-topic-summary,
+   .flow-ui-editTopicSummaryWidget {
+
+   .mw-content-ltr & {
+   /* @noflip */
+   padding-right: @topicIndent + 1;
+   /* @noflip */
+   padding-left: @topicIndent;
+   }
+
+   .mw-content-rtl & {
+   /* @noflip */
+   padding-right: @topicIndent;
+   /* @noflip */
+   padding-left: @topicIndent + 1;
+   }
+   }
+   }
 }
 
 // needs extra specificity to override `div#content h2` from vector
@@ -92,33 +114,5 @@
 .flow-topic-title-activate-edit {
.flow-topic-title {
display: none;
-   }
-}
-
-// MEDIA QUERIES
-@media all and ( min-width: @small ) {
-   .flow-topic-titlebar {
-   padding-top: 0.5em;
-   padding-bottom: 0.5em;
-
-   .flow-topic-titlebar-container,
-   .flow-edit-title-form,
-   .flow-topic-summary,
-   .flow-ui-editTopicSummaryWidget {
-
-   .mw-content-ltr & {
-   /* @noflip */
-   padding-right: @topicIndent + 1;
-   /* @noflip */
-   padding-left: @topicIndent;
-   }
-
-   .mw-content-rtl & {
-   /* @noflip */
-   padding-right: @topicIndent;
-   /* @noflip */
-   padding-left: @topicIndent + 1;
-   }
-   }
}
 }
diff --git a/modules/styles/board/topic/watchlist.less 
b/modules/styles/board/topic/watchlist.less

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Hide RC/WL related preferences as appropriate

2017-09-11 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377377 )

Change subject: Hide RC/WL related preferences as appropriate
..

Hide RC/WL related preferences as appropriate

If the new filters are enabled on the RC page, hide the RC-related
preferences. This was already being done, but the logic didn't
take the new opt-out preference into account.

If the new filters are enabled on the Watchlist, hide the WL-related
preferences too. If the new filters are enabled on both,
hide the threshold preference as well.

Bug: T175611
Change-Id: Ia9355fb95e82c72185d2df93d48115f718fabe99
---
M includes/Hooks.php
M includes/Hooks/PreferencesHookHandler.php
2 files changed, 35 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/77/377377/1

diff --git a/includes/Hooks.php b/includes/Hooks.php
index bc3d8ec..6f72133 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -790,6 +790,18 @@
return $context->getTitle()->isSpecial( 'Watchlist' );
}
 
+   public static function isRCStructuredUiEnabled( IContextSource $context 
) {
+   $page = new SpecialRecentChanges();
+   $page->setContext( $context );
+   return $page->isStructuredFilterUiEnabled();
+   }
+
+   public static function isWLStructuredUiEnabled( IContextSource $context 
) {
+   $page = new SpecialWatchlist();
+   $page->setContext( $context );
+   return $page->isStructuredFilterUiEnabled();
+   }
+
/**
 * @param IContextSource $context
 * @return bool Whether highlights should be shown
@@ -812,16 +824,12 @@
}
 
if ( self::isRCPage( $context ) ) {
-   $page = new SpecialRecentChanges();
-   $page->setContext( $context );
-   return !$page->isStructuredFilterUiEnabled() &&
+   return !self::isRCStructuredUiEnabled() &&
$user->getBoolOption( 'ores-damaging-flag-rc' );
}
 
if ( self::isWLPage( $context ) ) {
-   $page = new SpecialWatchlist();
-   $page->setContext( $context );
-   return !$page->isStructuredFilterUiEnabled() &&
+   return !self::isWLStructuredUiEnabled() &&
$user->getBoolOption( 'oresHighlight' );
}
 
diff --git a/includes/Hooks/PreferencesHookHandler.php 
b/includes/Hooks/PreferencesHookHandler.php
index a0452ae..26b34a5 100644
--- a/includes/Hooks/PreferencesHookHandler.php
+++ b/includes/Hooks/PreferencesHookHandler.php
@@ -3,6 +3,9 @@
 namespace ORES\Hooks;
 
 use ORES\Hooks;
+use DerivativeContext;
+use DerivativeRequest;
+use RequestContext;
 use User;
 
 class PreferencesHookHandler {
@@ -72,14 +75,27 @@
'section' => 'rc/advancedrc',
'label-message' => 'ores-pref-rc-hidenondamaging',
];
-   // Hide RC prefs if enhanced filters are enabled
-   if ( $user->getBoolOption( 'rcenhancedfilters' ) ) {
-   // HACK: Note that this only hides the preferences on 
the preferences page,
-   // it does not cause them to behave as if they're set 
to their default value,
-   // because this hook only runs on the preferences page.
+
+   // Hide RC/wL prefs if enhanced filters are enabled
+   $context = new DerivativeContext( RequestContext::getMain() );
+   $context->setUser( $user );
+   $context->setRequest( new DerivativeRequest( 
$context->getRequest(), [] ) );
+   $rcFiltersEnabled = Hooks::isRCStructuredUiEnabled( $context );
+   $wlFiltersEnabled = Hooks::isWLStructuredUiEnabled( $context );
+   // HACK: Note that this only hides the preferences on the 
preferences page,
+   // it does not cause them to behave as if they're set to their 
default value,
+   // because this hook only runs on the preferences page.
+   if ( $rcFiltersEnabled ) {
$wgHiddenPrefs[] = 'oresRCHideNonDamaging';
$wgHiddenPrefs[] = 'ores-damaging-flag-rc';
}
+   if ( $wlFiltersEnabled ) {
+   $wgHiddenPrefs[] = 'oresWatchlistHideNonDamaging';
+   $wgHiddenPrefs[] = 'oresHighlight';
+   }
+   if ( $rcFiltersEnabled && $wlFiltersEnabled ) {
+   $wgHiddenPrefs[] = 'oresDamagingPref';
+   }
}
 
 }

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

Gerrit-MessageType: newchange

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Provide an opt-out preference for New Filters for RecentChanges

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/373384 )

Change subject: Provide an opt-out preference for New Filters for RecentChanges
..


Provide an opt-out preference for New Filters for RecentChanges

Currently this is disabled by default. On wikis with the BetaFeatures and
WikimediaMessages extensions installed, this preference is set (if the
$wgEnableRcFiltersBetaFeature flag is set) via BetaFeatures. This change
lets users on normal wikis use these too, and lets BetaFeatures-capable
wikis "graduate" the feature to be provided to all users by default.

Bug: T168376
Change-Id: I3c75f9f2f6287414bf330f116d959d078250392d
---
M includes/DefaultSettings.php
M includes/Preferences.php
M includes/specialpage/ChangesListSpecialPage.php
M includes/specials/SpecialWatchlist.php
M languages/i18n/en.json
M languages/i18n/qqq.json
6 files changed, 64 insertions(+), 4 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index cf8e089..86b1bdc 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4920,6 +4920,7 @@
'previewontop' => 1,
'rcdays' => 7,
'rcenhancedfilters' => 0,
+   'rcenhancedfilters-disable' => 0,
'rclimit' => 50,
'rows' => 25, // @deprecated since 1.29 No longer used in core
'showhiddencats' => 0,
@@ -6830,18 +6831,36 @@
 $wgUseRCPatrol = true;
 
 /**
+ * Whether a preference is displayed for structured change filters.
+ * If false, no preference is displayed and structured change filters are 
disabled.
+ * If true, structured change filters are *enabled* by default, and a 
preference is displayed
+ * that lets users disable them.
+ *
+ * Temporary variable during development and will be removed.
+ *
+ * @since 1.30
+ */
+$wgStructuredChangeFiltersShowPreference = false;
+
+/**
  * Whether to show the new experimental views (like namespaces, tags, and 
users) in
  * RecentChanges filters
+ *
+ * Temporary variable during development and will be removed.
  */
 $wgStructuredChangeFiltersEnableExperimentalViews = false;
 
 /**
  * Whether to allow users to use the experimental live update feature in the 
new RecentChanges UI
+ *
+ * Temporary variable during development and will be removed.
  */
 $wgStructuredChangeFiltersEnableLiveUpdate = false;
 
 /**
  * Whether to enable RCFilters app on Special:Watchlist
+ *
+ * Temporary variable during development and will be removed.
  */
 $wgStructuredChangeFiltersOnWatchlist = false;
 
diff --git a/includes/Preferences.php b/includes/Preferences.php
index c64e8a8..c29c4b9 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -958,6 +958,15 @@
'label-message' => 'tog-shownumberswatching',
];
}
+
+   if ( $config->get( 'StructuredChangeFiltersShowPreference' ) ) {
+   $defaultPreferences['rcenhancedfilters-disable'] = [
+   'type' => 'toggle',
+   'section' => 'rc/advancedrc',
+   'label-message' => 'rcfilters-preference-label',
+   'help-message' => 'rcfilters-preference-help',
+   ];
+   }
}
 
/**
diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 5f54404..d498195 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -1537,7 +1537,29 @@
 * @return bool
 */
public function isStructuredFilterUiEnabled() {
-   return $this->getUser()->getOption( 'rcenhancedfilters' );
+   if ( $this->getRequest()->getBool( 'rcfilters' ) ) {
+   return true;
+   }
+
+   if ( $this->getConfig()->get( 
'StructuredChangeFiltersShowPreference' ) ) {
+   return !$this->getUser()->getOption( 
'rcenhancedfilters-disable' );
+   } else {
+   return $this->getUser()->getOption( 'rcenhancedfilters' 
);
+   }
+   }
+
+   /**
+* Check whether the structured filter UI is enabled by default 
(regardless of
+* this particular user's setting)
+*
+* @return bool
+*/
+   public function isStructuredFilterUiEnabledByDefault() {
+   if ( $this->getConfig()->get( 
'StructuredChangeFiltersShowPreference' ) ) {
+   return !$this->getUser()->getDefaultOption( 
'rcenhancedfilters-disable' );
+   } else {
+   return $this->getUser()->getDefaultOption( 
'rcenhancedfilters' );
+   }
}
 
abstract function 

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Change popup label colour to green

2017-09-11 Thread Samwilson (Code Review)
Samwilson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377376 )

Change subject: Change popup label colour to green
..

Change popup label colour to green

This is to stop it looking so much like a link that can be clicked on.

Bug: T174219
Change-Id: Icdae8ddf32aa0c08fe0d708eb289bafe53f9b589
---
M resources/modules/popup.less
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/modules/popup.less b/resources/modules/popup.less
index 53f4fba..12cf3dd 100644
--- a/resources/modules/popup.less
+++ b/resources/modules/popup.less
@@ -14,7 +14,7 @@
}
 
.codemirror-popup-label span {
-   color: #1e90ff;
+   color: #457d39;
}
 
.codemirror-popup-text {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdae8ddf32aa0c08fe0d708eb289bafe53f9b589
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Samwilson 

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Cleanup initialization to use exception instead of null checks.

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370228 )

Change subject: Cleanup initialization to use exception instead of null checks.
..


Cleanup initialization to use exception instead of null checks.

This removes a bit of logic, and replace it with 2 exception handlers, which
will log and rethrow any problem during initilization or at runtime.

Change-Id: I647a27792e6238ce592fc36afb44ba09e7e81471
---
M tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
1 file changed, 68 insertions(+), 30 deletions(-)

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



diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
index 9973412..676864c 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
@@ -43,35 +43,77 @@
  * Run updates configured from the command line.
  * @throws Exception on error
  */
+// Catching exception is OK in a main exception handler, more so since the
+// exception is rethrown
+@SuppressWarnings("checkstyle:IllegalCatch")
 public static void main(String[] args) throws Exception {
-UpdateOptions options = handleOptions(UpdateOptions.class, args);
-WikibaseRepository wikibaseRepository = 
buildWikibaseRepository(options);
-if (wikibaseRepository == null) {
-return;
+RdfRepository rdfRepository = null;
+Updater updater;
+
+try {
+UpdateOptions options = handleOptions(UpdateOptions.class, args);
+WikibaseRepository wikibaseRepository = 
buildWikibaseRepository(options);
+URI sparqlUri = sparqlUri(options);
+WikibaseUris uris = new WikibaseUris(options.wikibaseHost());
+rdfRepository = new RdfRepository(sparqlUri, uris);
+Change.Source changeSource = 
buildChangeSource(options, rdfRepository,
+wikibaseRepository);
+updater = createUpdater(options, wikibaseRepository, uris, 
rdfRepository, changeSource);
+} catch (Exception e) {
+log.error("Error during initialization.", e);
+if (rdfRepository != null) {
+rdfRepository.close();
+}
+throw e;
 }
+try (RdfRepository r = rdfRepository) {
+updater.run();
+} catch (Exception e) {
+log.error("Error during updater run.", e);
+throw e;
+}
+}
+
+/**
+ * Create an @{link Updater}.
+ *
+ * @param options
+ * @param wikibaseRepository
+ * @param uris
+ * @param rdfRepository
+ * @param changeSource
+ * @return a newly created updater
+ */
+private static Updater createUpdater(
+UpdateOptions options,
+WikibaseRepository wikibaseRepository,
+WikibaseUris uris,
+RdfRepository rdfRepository,
+Change.Source changeSource) {
+int threads = options.threadCount();
+ThreadFactoryBuilder threadFactory = new 
ThreadFactoryBuilder().setDaemon(true).setNameFormat("update %s");
+ExecutorService executor = new ThreadPoolExecutor(threads, threads, 0, 
TimeUnit.SECONDS,
+new LinkedBlockingQueue<>(), threadFactory.build());
+
+Munger munger = mungerFromOptions(options);
+return new Updater<>(changeSource, wikibaseRepository, rdfRepository, 
munger, executor,
+options.pollDelay(), uris, options.verify());
+}
+
+/**
+ * Create the sparql URI from the given configuration.
+ *
+ * @param options
+ * @return a newly created sparql URI
+ */
+private static URI sparqlUri(UpdateOptions options) {
 URI sparqlUri;
 try {
 sparqlUri = new URI(options.sparqlUrl());
 } catch (URISyntaxException e) {
-log.error("Invalid url:  " + options.sparqlUrl(), e);
-return;
+throw new IllegalArgumentException("Invalid url:  " + 
options.sparqlUrl(), e);
 }
-WikibaseUris uris = new WikibaseUris(options.wikibaseHost());
-try (RdfRepository rdfRepository = new RdfRepository(sparqlUri, uris)) 
{
-Change.Source changeSource = 
buildChangeSource(options, rdfRepository,
-wikibaseRepository);
-if (changeSource == null) {
-return;
-}
-int threads = options.threadCount();
-ThreadFactoryBuilder threadFactory = new 
ThreadFactoryBuilder().setDaemon(true).setNameFormat("update %s");
-ExecutorService executor = new ThreadPoolExecutor(threads, 
threads, 0, TimeUnit.SECONDS,
-new LinkedBlockingQueue(), 
threadFactory.build());
-
-Munger munger 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update Changelog

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377371 )

Change subject: Update Changelog
..


Update Changelog

Change-Id: Idebdba56d6fc8ef3aee01dd2f9948f09d4343c13
---
M docs/ChangeLog
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/docs/ChangeLog b/docs/ChangeLog
index 5124253..cc21589 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -4,6 +4,7 @@
 New functions:
 - geof:globe, geof:latitude & geof:longitude for coordinate literals
 - wikibase:decodeUri for urldecoding strings
+Add throttling and rate limits
 
 0.2.4
 -

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idebdba56d6fc8ef3aee01dd2f9948f09d4343c13
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Move mwapi: url

2017-09-11 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377375 )

Change subject: Move mwapi: url
..

Move mwapi: url

Change mwapi: prefix to be  https://www.mediawiki.org/ontology#API/
so that it does not confuse some federated endpoints.

Bug: T174930
Change-Id: Ia9c2be7a5cf96c80a47f7c63f7a9a81a9f04388a
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceFactory.java
M common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
M dist/src/script/prefixes.conf
3 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/75/377375/1

diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceFactory.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceFactory.java
index 8eda026..7fe91d8 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceFactory.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceFactory.java
@@ -78,7 +78,7 @@
 /**
  * Namespace for MWAPI parameters.
  */
-public static final String MWAPI_NAMESPACE = Ontology.NAMESPACE + "api#";
+public static final String MWAPI_NAMESPACE = Ontology.MEDIAWIKI_NAMESPACE 
+ "API/";
 /**
  * Default service config filename.
  */
diff --git 
a/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java 
b/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
index 1501559..c5a642e 100644
--- a/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
+++ b/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
@@ -9,6 +9,10 @@
  */
 public static final String NAMESPACE = "http://wikiba.se/ontology#;;
 /**
+ * Common prefix of Mediawiki ontology parts.
+ */
+public static final String MEDIAWIKI_NAMESPACE = 
"https://www.mediawiki.org/ontology#;;
+/**
  * Old ontology prefix, for loading old dumps.
  * TODO: remove this when ontology stabilizes.
  */
diff --git a/dist/src/script/prefixes.conf b/dist/src/script/prefixes.conf
index 56f8ddb..973a150 100644
--- a/dist/src/script/prefixes.conf
+++ b/dist/src/script/prefixes.conf
@@ -1,4 +1,4 @@
 PREFIX psn: 
 PREFIX pqn: 
 PREFIX prn: 
-PREFIX mwapi: 
+PREFIX mwapi: 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9c2be7a5cf96c80a47f7c63f7a9a81a9f04388a
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] marvin[master]: New: add wiki page route

2017-09-11 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377374 )

Change subject: New: add wiki page route
..

New: add wiki page route

- New: add route for wiki articles and pages.
- Fix: off by one error in route parameter name to value mapping.
- Fix: Route.initialProperties() signature.

Bug: T173323
Change-Id: I6a90d39fa1feb39011ece7ecc00db37125d8ebc4
---
M src/common/components/app/index.tsx
A src/common/components/pages/wiki.tsx
M src/common/routers/api.ts
M src/common/routers/route.ts
M src/common/routers/router.ts
5 files changed, 50 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/74/377374/1

diff --git a/src/common/components/app/index.tsx 
b/src/common/components/app/index.tsx
index 82f20c8..79372ef 100644
--- a/src/common/components/app/index.tsx
+++ b/src/common/components/app/index.tsx
@@ -12,6 +12,12 @@
 About
   
   
+Banana
+  
+  
+Cucumber
+  
+  
 404
   
 
diff --git a/src/common/components/pages/wiki.tsx 
b/src/common/components/pages/wiki.tsx
new file mode 100644
index 000..45f77b1
--- /dev/null
+++ b/src/common/components/pages/wiki.tsx
@@ -0,0 +1,23 @@
+import App from "../app";
+import { RouteParameters } from "../../routers/route";
+import { h } from "preact";
+
+export interface Parameters extends RouteParameters {
+  title: string
+}
+
+export interface Properties {
+  title: string
+}
+
+export const initialProperties = ({
+  title
+}: Parameters): Promise => {
+  return Promise.resolve({ title });
+};
+
+export const component = ({ title }: Properties): JSX.Element => (
+  
+{title}
+  
+);
diff --git a/src/common/routers/api.ts b/src/common/routers/api.ts
index dc2fd96..7aa655a 100644
--- a/src/common/routers/api.ts
+++ b/src/common/routers/api.ts
@@ -1,4 +1,5 @@
 import { Route } from "./route";
+import { Properties as WikiProperties } from "../components/pages/wiki";
 
 export const index: Route = {
   path: "/",
@@ -18,7 +19,18 @@
   status: 200
 };
 
+export const wiki: Route = {
+  path: "/wiki/:title",
+  endpoint: () =>
+import(/* webpackChunkName: "components/pages/wiki" */
+"../components/pages/wiki"),
+  chunkName: "components/pages/wiki",
+  status: 200
+};
+
 export const notFound: Route = {
+  // `(.*)` is the new `*`. See
+  // https://github.com/pillarjs/path-to-regexp/issues/37.
   path: "(.*)",
   endpoint: () =>
 import(/* webpackChunkName: "components/pages/not-found" */
@@ -27,4 +39,4 @@
   status: 404
 };
 
-export const routes: Route[] = [index, about, notFound];
+export const routes: Route[] = [index, about, wiki, notFound];
diff --git a/src/common/routers/route.ts b/src/common/routers/route.ts
index b68d45b..4f82ad0 100644
--- a/src/common/routers/route.ts
+++ b/src/common/routers/route.ts
@@ -12,9 +12,7 @@
* A function that returns a Promise for the dependencies needed to construct
* the view component such as a remote resource.
*/
-  initialProperties?: (parameters: { parameters: RouteParameters }) => Promise<
-Properties
-  >
+  initialProperties?: (parameters: RouteParameters) => Promise
 }
 
 export interface Route {
diff --git a/src/common/routers/router.ts b/src/common/routers/router.ts
index 19c0b30..86eb3fd 100644
--- a/src/common/routers/router.ts
+++ b/src/common/routers/router.ts
@@ -35,7 +35,7 @@
 
 const newRouteParameters = (
   parameterNames: pathToRegExp.Key[],
-  parameterValues: RegExpExecArray
+  parameterValues: string[]
 ): RouteParameters =>
   parameterNames.reduce(
 (
@@ -54,7 +54,7 @@
   parameters: RouteParameters
 ): Promise {
   if (endpoint.initialProperties) {
-return endpoint.initialProperties({ parameters });
+return endpoint.initialProperties(parameters);
   }
   return Promise.resolve({});
 }
@@ -87,7 +87,11 @@
   for (const route of parsedRoutes) {
 const matches = route.regularExpression.exec(url);
 if (matches) {
-  const parameters = newRouteParameters(route.parameterNames, matches);
+  const [url, ...parameterValues] = matches;
+  const parameters = newRouteParameters(
+route.parameterNames,
+parameterValues
+  );
   return respond(route, url, parameters);
 }
   }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a90d39fa1feb39011ece7ecc00db37125d8ebc4
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update GUI

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377370 )

Change subject: Update GUI
..


Update GUI

Change-Id: I3e71db76426e4fd5a6553dd0c849ee8f9cd23565
---
M gui
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/gui b/gui
index 30c8e39..c1a865f 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 30c8e39dd68b217149069b58158e61443b92de1a
+Subproject commit c1a865f6d71a0b09c5642b7bff2d1fe607b5f214

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e71db76426e4fd5a6553dd0c849ee8f9cd23565
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Dump should allow getting elections by their ID

2017-09-11 Thread Huji (Code Review)
Huji has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377373 )

Change subject: Dump should allow getting elections by their ID
..

Dump should allow getting elections by their ID

Bug: T175652
Change-Id: I5b13be15ebde7db44c6454e0af005784af5aa611
---
M cli/dump.php
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll 
refs/changes/73/377373/1

diff --git a/cli/dump.php b/cli/dump.php
index 8521b5f..45a8399 100644
--- a/cli/dump.php
+++ b/cli/dump.php
@@ -11,6 +11,7 @@
 Usage: php dump.php [options...] 
 Options:
 -o Output to the specified file
+--by-id Get election using its numerical ID, instead 
of its title
 --votes Include vote records
 --all-langs Include messages for all languages instead of 
just the primary
 --jump  Produce a configuration dump suitable for 
setting up a jump wiki
@@ -21,7 +22,12 @@
 }
 
 $context = new SecurePoll_Context;
-$election = $context->getElectionByTitle( $args[0] );
+if ( isset( $options['by-id'] ) ) {
+  $election = $context->getElection( $args[0] );
+} else {
+  $election = $context->getElectionByTitle( $args[0] );
+}
+
 if ( !$election ) {
spFatal( "There is no election called \"$args[0]\"" );
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b13be15ebde7db44c6454e0af005784af5aa611
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Huji 

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Add script for loading category data

2017-09-11 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377372 )

Change subject: Add script for loading category data
..

Add script for loading category data

Use: loadCategoryDump.sh WIKI

Bug: T157676
Change-Id: I138ed5243fc58acf7961f4e6a5b81190b13b6f78
---
A dist/src/script/loadCategoryDump.sh
A docs/Categories.md
2 files changed, 42 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/72/377372/1

diff --git a/dist/src/script/loadCategoryDump.sh 
b/dist/src/script/loadCategoryDump.sh
new file mode 100755
index 000..25cb738
--- /dev/null
+++ b/dist/src/script/loadCategoryDump.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+if [ -r /etc/wdqs/vars.sh ]; then
+  . /etc/wdqs/vars.sh
+fi
+
+SOURCE=${SOURCE:-"https://dumps.wikimedia.org/other/categoriesrdf"}
+DATA_DIR=${DATA_DIR:-"/srv/wdqs"}
+HOST=http://localhost:
+CONTEXT=bigdata
+NAMESPACE=categories
+WIKI=$1
+
+if [ -z "$WIKI" ]; then
+   echo "Use: $0 WIKI-NAME"
+   exit 1
+fi
+
+TS=$(curl -s -XGET $SOURCE/lastdump/$WIKI-categories.last)
+if [ -z "$TS" ]; then
+   echo "Could not load timestamp"
+   exit 1
+fi
+FILENAME=$WIKI-$TS-categories.ttl.gz
+curl -s -XGET $SOURCE/$TS/$FILENAME -o $DATA_DIR/$FILENAME
+if [ ! -s $DATA_DIR/$FILENAME ]; then
+   echo "Could not download $FILENAME"
+   exit 1
+fi 
+curl -XPOST --data-binary update="LOAD " 
$HOST/$CONTEXT/namespace/$NAMESPACE/sparql
\ No newline at end of file
diff --git a/docs/Categories.md b/docs/Categories.md
new file mode 100644
index 000..e5233bc
--- /dev/null
+++ b/docs/Categories.md
@@ -0,0 +1,13 @@
+# Categories
+
+This document describes how to set up and maintain Mediawiki categories graph 
on top of Wikidata Query Service.
+
+# Setup
+
+In order to create categories namespace, run `createNamespace.sh categories`.
+
+# Data loading
+
+To load the data, the dumps should be in 
https://dumps.wikimedia.org/other/categoriesrdf or another place with analogous 
structure pointed to by SOURCE variable.
+
+Run script loadCategoryDump.sh for each wiki, e.g.: `loadCategoryDump.sh 
testwiki`
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I138ed5243fc58acf7961f4e6a5b81190b13b6f78
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...minus-x[master]: Fix finding autoloader in minus-x.php

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377367 )

Change subject: Fix finding autoloader in minus-x.php
..


Fix finding autoloader in minus-x.php

When installed as a package, the autoloader is in a different location
relative to minus-x.php.

Change-Id: I294e39274f7aeaf59f73525f871978a3968533ee
---
M bin/minus-x.php
1 file changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/bin/minus-x.php b/bin/minus-x.php
index 946464e..b5a6fe3 100755
--- a/bin/minus-x.php
+++ b/bin/minus-x.php
@@ -20,7 +20,25 @@
  * @file
  */
 
-require_once __DIR__ . '/../vendor/autoload.php';
+// This file can be located in ./bin/minus-x.php
+// or ./vendor/mediawiki/minus-x/bin/minus-x.php
+$autoload = [
+   __DIR__ . '/../../../../vendor/autoload.php',
+   __DIR__ . '/../vendor/autoload.php',
+];
+$found = false;
+foreach ( $autoload as $file ) {
+   if ( file_exists( $file ) ) {
+   require_once $file;
+   $found = true;
+   break;
+   }
+}
+
+if ( !$found ) {
+   echo "Error, unable to find composer autoloader.\n";
+   die( 1 );
+}
 
 use MediaWiki\MinusX\CheckCommand;
 use MediaWiki\MinusX\FixCommand;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I294e39274f7aeaf59f73525f871978a3968533ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/minus-x
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update Changelog

2017-09-11 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377371 )

Change subject: Update Changelog
..

Update Changelog

Change-Id: Idebdba56d6fc8ef3aee01dd2f9948f09d4343c13
---
M docs/ChangeLog
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/71/377371/1

diff --git a/docs/ChangeLog b/docs/ChangeLog
index 5124253..cc21589 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -4,6 +4,7 @@
 New functions:
 - geof:globe, geof:latitude & geof:longitude for coordinate literals
 - wikibase:decodeUri for urldecoding strings
+Add throttling and rate limits
 
 0.2.4
 -

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idebdba56d6fc8ef3aee01dd2f9948f09d4343c13
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update GUI

2017-09-11 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377370 )

Change subject: Update GUI
..

Update GUI

Change-Id: I3e71db76426e4fd5a6553dd0c849ee8f9cd23565
---
M gui
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/70/377370/1

diff --git a/gui b/gui
index 30c8e39..c1a865f 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 30c8e39dd68b217149069b58158e61443b92de1a
+Subproject commit c1a865f6d71a0b09c5642b7bff2d1fe607b5f214

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e71db76426e4fd5a6553dd0c849ee8f9cd23565
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add categories RDF dump into the index page

2017-09-11 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377369 )

Change subject: Add categories RDF dump into the index page
..

Add categories RDF dump into the index page

Bug: T173892
Change-Id: I84accad4cb25f9bafbb6ef015c638425672e884b
---
M modules/dataset/files/html/other_index.html
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/377369/1

diff --git a/modules/dataset/files/html/other_index.html 
b/modules/dataset/files/html/other_index.html
index 9798ee5..4c7ba08 100644
--- a/modules/dataset/files/html/other_index.html
+++ b/modules/dataset/files/html/other_index.html
@@ -34,6 +34,7 @@
Dumps of images and content of 
wikitech.wikimedia.org
Content 
Translation dumps in json and tmx format
XML or other files for 
testing use
+   Mediawiki categories as 
RDF




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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: [WIP] T159894: Add support for Cite's `responsive` parameter

2017-09-11 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377368 )

Change subject: [WIP] T159894: Add support for Cite's `responsive` parameter
..

[WIP] T159894: Add support for Cite's `responsive` parameter

 * Ports commit 04c3ad01 in core's Cite extension.

 * Until $wgCiteResponsiveReferences is exported, a number of wikis
   which have enabled this won't be getting the right default.
   
https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L14945-L14970

   However, it looks like enwiki's {{reflist}} explicitly sets the
   parameter either way, so not a bad start.

 * The "ext.cite.styles" css resource is added from core's Cite
   extension 05cb5cc1, since that's where the responsive css lives.

 * FIXME: This needs tests!

Change-Id: I8f9277b3ecb253e0bee7ee55eef7af4935821527
---
M lib/config/WikiConfig.js
M lib/ext/Cite/index.js
M lib/html2wt/DOMHandlers.js
3 files changed, 41 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/68/377368/1

diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index 2406346..6ecc370 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -210,6 +210,12 @@
// Whether the Linter MediaWiki extension is installed
this.linterEnabled = general.linter !== undefined;
 
+   // FIXME(arlolra): Export $wgCiteResponsiveReferences
+   this.responsiveReferences = {
+   enabled: true,
+   threshold: 10,
+   };
+
// The interwikiMap maps prefixes to the corresponding information
// gathered from the api query (prefix, language, url, local)
this.interwikiMap = new Map();
diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index 4225198..17cb230 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -18,7 +18,6 @@
 var KV = defines.KV;
 var SelfclosingTagTk = defines.SelfclosingTagTk;
 
-
 /**
  * Simple token transform version of the Ref extension tag
  *
@@ -338,6 +337,8 @@
dp.group = refsOpts.group;
ol.setAttribute('data-mw-group', 
refsOpts.group);
}
+   // Pass along the `responsive` paramter
+   dp.tmp.responsive = refsOpts.responsive;
};
cb({
async: false,
@@ -493,6 +494,8 @@
'attrs': {
// Dont emit empty keys
'group': group || undefined,
+   // Rt the `responsive` parameter
+   responsive: dp.tmp.responsive,
},
};
 
@@ -523,6 +526,22 @@
 
// Remove the group from refsData
refsData.removeRefGroup(group);
+
+   // Support the `responsive` parameter
+   var rrOpts = refsData.env.conf.wiki.responsiveReferences;
+   var responsiveWrap = rrOpts.enabled;
+   if (dp.tmp.hasOwnProperty('responsive')) {
+   responsiveWrap = dp.tmp.responsive !== '0';
+   }
+   if (responsiveWrap) {
+   var div = refsNode.ownerDocument.createElement('div');
+   div.classList.add('mw-references-wrap');
+   if (refGroup.refs.length > rrOpts.threshold) {
+   div.classList.add('mw-references-columns');
+   }
+   refsNode.parentNode.insertBefore(div, refsNode);
+   div.appendChild(refsNode);
+   }
 };
 
 // Process s left behind after the DOM is fully processed.
@@ -707,7 +726,10 @@
serialHandler: this.references.serialHandler,
},
],
-   styles: ['ext.cite.style'],
+   styles: [
+   'ext.cite.style',
+   'ext.cite.styles',
+   ],
};
 };
 
diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index 6964097..f7c9fe7 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -1368,6 +1368,17 @@
lastChild: id({ min: 0, max: 1 }),
},
},
+   div: {
+   handle: Promise.method(function(node, state, wrapperUnmodified) 
{
+   if (/\bmw-references-wrap\b/.test(node.classList)) {
+   // Just serialize the children
+   return state.serializeChildren(node);
+   } else {
+   // Fall back to plain HTML serialization
+   return _htmlElementHandler(node, state);
+   }
+   }),
+   },
 });
 
 var parentMap = {

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

[MediaWiki-commits] [Gerrit] mediawiki...minus-x[master]: Fix finding autoloader in minus-x.php

2017-09-11 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377367 )

Change subject: Fix finding autoloader in minus-x.php
..

Fix finding autoloader in minus-x.php

When installed as a package, the autoloader is in a different location
relative to minus-x.php.

Change-Id: I294e39274f7aeaf59f73525f871978a3968533ee
---
M bin/minus-x.php
1 file changed, 19 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/minus-x 
refs/changes/67/377367/1

diff --git a/bin/minus-x.php b/bin/minus-x.php
index 946464e..b5a6fe3 100755
--- a/bin/minus-x.php
+++ b/bin/minus-x.php
@@ -20,7 +20,25 @@
  * @file
  */
 
-require_once __DIR__ . '/../vendor/autoload.php';
+// This file can be located in ./bin/minus-x.php
+// or ./vendor/mediawiki/minus-x/bin/minus-x.php
+$autoload = [
+   __DIR__ . '/../../../../vendor/autoload.php',
+   __DIR__ . '/../vendor/autoload.php',
+];
+$found = false;
+foreach ( $autoload as $file ) {
+   if ( file_exists( $file ) ) {
+   require_once $file;
+   $found = true;
+   break;
+   }
+}
+
+if ( !$found ) {
+   echo "Error, unable to find composer autoloader.\n";
+   die( 1 );
+}
 
 use MediaWiki\MinusX\CheckCommand;
 use MediaWiki\MinusX\FixCommand;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I294e39274f7aeaf59f73525f871978a3968533ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/minus-x
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: elasticsearch: replace validate_bool with validate_legacy

2017-09-11 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377366 )

Change subject: elasticsearch: replace validate_bool with validate_legacy
..

elasticsearch: replace validate_bool with validate_legacy

This is just like Ifbd229304d5526ba7035f5b but in a different
module.

Change-Id: I5cdf10f0b5073b505ca40288c4109e755c3a51a9
---
M modules/elasticsearch/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/377366/1

diff --git a/modules/elasticsearch/manifests/init.pp 
b/modules/elasticsearch/manifests/init.pp
index f215114..4bf404a 100644
--- a/modules/elasticsearch/manifests/init.pp
+++ b/modules/elasticsearch/manifests/init.pp
@@ -132,7 +132,7 @@
 default: { fail("Unsupported elasticsearch version: ${version}") }
 }
 
-validate_bool($gc_log)
+validate_legacy('Optional[Boolean]', 'validate_bool', $gc_log)
 
 if $script_max_compilations_per_minute != undef and 
$script_max_compilations_per_minute < 0 {
 fail('script_max_compilations_per_minute should be > 0')

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...minus-x[master]: Initial commit of tool to identify files that shouldn't be e...

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376572 )

Change subject: Initial commit of tool to identify files that shouldn't be 
executable
..


Initial commit of tool to identify files that shouldn't be executable

Basic usage:

$ ./bin/minus-x.php check .

Auto-fixing:

$ ./bin/minus-x.php fix .

It will automatically ignore anything with "node_modules", "vendor", or
".git" in the path.

Repositories can explicitly whitelist files in .minus-x.json:
{"ignore": ["./bin/executable"]}

The .minus-x.json file needs to be in the path root that is being
checked.

Bug: T168659
Change-Id: Iac6de598bd47e9b12c028d31ee546c61399ba24c
---
A .gitignore
A COPYING
A README.md
A bin/minus-x.php
A composer.json
A phpcs.xml
A src/CheckCommand.php
A src/FixCommand.php
8 files changed, 1,149 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..b47d257
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+/vendor
+/composer.lock
+
+# Editors
+*.kate-swp
+*~
+\#*#
+.#*
+.*.swp
+.project
+.buildpath
+.classpath
+.settings
+cscope.files
+cscope.out
+*.orig
+## NetBeans
+nbproject*
+project.index
+## Sublime
+sublime-*
+sftp-config.json
diff --git a/COPYING b/COPYING
new file mode 100644
index 000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. 
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  

[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: Update Wikimedia-AI's irc config

2017-09-11 Thread Zppix (Code Review)
Zppix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377364 )

Change subject: Update Wikimedia-AI's irc config
..

Update Wikimedia-AI's irc config

Change-Id: I8a1ed479886501fba9371ad6ccec68b4db558f48
---
M gerrit-channels.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 
refs/changes/64/377364/2

diff --git a/gerrit-channels.yaml b/gerrit-channels.yaml
index f6cb4ee..279a383 100644
--- a/gerrit-channels.yaml
+++ b/gerrit-channels.yaml
@@ -60,6 +60,10 @@
 mediawiki/extensions/SolrStore:
 "#wikimedia-ai":
 mediawiki/extensions/ORES:
+mediawiki/services/ores/deploy:
+mediawiki/services/ores:
+mediawiki/services/ores/wikiclass:
+mediawiki/services/ores/editquality:
 "#wikimedia-analytics":
 analytics/.*:
 "#wikimedia-perf-bots":

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a1ed479886501fba9371ad6ccec68b4db558f48
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Zppix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Allow deprecated call through phan for test-only code

2017-09-11 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377363 )

Change subject: Allow deprecated call through phan for test-only code
..

Allow deprecated call through phan for test-only code

Change-Id: If7c015e19016d523466dc99b0964f8567a4f78fe
---
M includes/Api/SuggestIndex.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/63/377363/1

diff --git a/includes/Api/SuggestIndex.php b/includes/Api/SuggestIndex.php
index 31fe236..9484d5b 100644
--- a/includes/Api/SuggestIndex.php
+++ b/includes/Api/SuggestIndex.php
@@ -27,6 +27,7 @@
// and probably should be eventually replaced with something 
more sane.
$updaterScript = 
"extensions/CirrusSearch/maintenance/updateSuggesterIndex.php";
$this->getResult()->addValue( null, 'result',
+   /** @suppress PhanDeprecatedFunction this is a 
test-only api call. */
wfShellExecWithStderr( "unset REQUEST_METHOD; 
/usr/local/bin/mwscript $updaterScript --wiki " . wfWikiID() )
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7c015e19016d523466dc99b0964f8567a4f78fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add configuration for mediawiki/tools/minus-x

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377361 )

Change subject: Add configuration for mediawiki/tools/minus-x
..


Add configuration for mediawiki/tools/minus-x

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index ea29643..a0168eb 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2030,6 +2030,10 @@
 gate-and-submit:
  - php55lint
 
+  - name: mediawiki/tools/minus-x
+template:
+ - name: composer-test-package
+
   - name: mediawiki/tools/mwdumper
 test:
   - mwdumper-maven

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie331410d7be42a1534263bcfba3f3ef5578927b5
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix syntax error

2017-09-11 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377362 )

Change subject: Fix syntax error
..

Fix syntax error

Change-Id: I05ceef22dda18a62104720a92c8dbcdbda7993f0
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 
refs/changes/62/377362/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05ceef22dda18a62104720a92c8dbcdbda7993f0
Gerrit-PatchSet: 1
Gerrit-Project: labs/icinga2
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] labs/icinga2[master]: Fix syntax error

2017-09-11 Thread Paladox (Code Review)
Paladox has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377362 )

Change subject: Fix syntax error
..


Fix syntax error

Change-Id: I05ceef22dda18a62104720a92c8dbcdbda7993f0
---
M templates/hosts.conf.erb
1 file changed, 15 insertions(+), 15 deletions(-)

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



diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb
index 8e0c25d..82176b8 100644
--- a/templates/hosts.conf.erb
+++ b/templates/hosts.conf.erb
@@ -142,22 +142,22 @@
 }
 }
 
-/* can be re enabled once it works with letsencrypt
-object Host "gerrit.git.wmflabs.org" {
- import "generic-host"
- address = "gerrit.git.wmflabs.org"
- vars.os = "Linux OS"
- vars.sla = "24x7"
- vars.load_check = "disable"
- vars.website_name = "gerrit.git.wmflabs.org"
- vars.website_url = "/r/"
- vars.ssh_check = "disable"
+/* can be re enabled once it works with letsencrypt*/
+//object Host "gerrit.git.wmflabs.org" {
+// import "generic-host"
+// address = "gerrit.git.wmflabs.org"
+// vars.os = "Linux OS"
+// vars.sla = "24x7"
+// vars.load_check = "disable"
+// vars.website_name = "gerrit.git.wmflabs.org"
+// vars.website_url = "/r/"
+// vars.ssh_check = "disable"
 
- vars.notification["mail"] = {
-   /* The UserGroup `icingaadmins` is defined in `users.conf`. */
-   groups = [ "icingaadmins" ]
- }
-}*/
+// vars.notification["mail"] = {
+//   /* The UserGroup `icingaadmins` is defined in `users.conf`. */
+//   groups = [ "icingaadmins" ]
+// }
+//}
 
 object Host "gerrit2.git.wmflabs.org" {
  import "generic-host"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05ceef22dda18a62104720a92c8dbcdbda7993f0
Gerrit-PatchSet: 2
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add configuration for mediawiki/tools/minus-x

2017-09-11 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377361 )

Change subject: Add configuration for mediawiki/tools/minus-x
..

Add configuration for mediawiki/tools/minus-x

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/61/377361/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index ea29643..a0168eb 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2030,6 +2030,10 @@
 gate-and-submit:
  - php55lint
 
+  - name: mediawiki/tools/minus-x
+template:
+ - name: composer-test-package
+
   - name: mediawiki/tools/mwdumper
 test:
   - mwdumper-maven

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia-ui-base[master]: Add `box-shadow-card` var

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377033 )

Change subject: Add `box-shadow-card` var
..


Add `box-shadow-card` var

Adding `box-shadow-card`, which is already in use in Content
Translation.

Bug: T175205
Change-Id: Ib32072e8770ccc120f732498ef8e18b6ce2bf8ff
---
M wikimedia-ui-base.css
M wikimedia-ui-base.less
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/wikimedia-ui-base.css b/wikimedia-ui-base.css
index dfd92de..5e9927b 100644
--- a/wikimedia-ui-base.css
+++ b/wikimedia-ui-base.css
@@ -119,6 +119,7 @@
--box-shadow-primary-focus: inset 0 0 0 1px var( --color-primary ), 
inset 0 0 0 2px var( --color-base--inverted );
--box-shadow-inset--inverted:   inset 0 0 0 1px var( 
--color-base--inverted );
--box-shadow-filled--disabled:  inset 0 0 0 1px var( 
--color-filled--disabled );
+   --box-shadow-card:  0 1px 1px rgba( 0, 0, 0, 0.15 );
--box-shadow-dialog:0 2px 2px 0 rgba( 0, 0, 0, 0.25 );
--box-shadow-menu:  var( --box-shadow-dialog );
 
diff --git a/wikimedia-ui-base.less b/wikimedia-ui-base.less
index a96c6fa..1054e19 100644
--- a/wikimedia-ui-base.less
+++ b/wikimedia-ui-base.less
@@ -118,6 +118,7 @@
 @box-shadow-primary--focus:   inset 0 0 0 1px @color-primary, inset 0 0 0 2px 
@color-base--inverted;
 @box-shadow-inset--inverted:  inset 0 0 0 1px @color-base--inverted;
 @box-shadow-filled--disabled: inset 0 0 0 1px @color-filled--disabled;
+@box-shadow-card: 0 1px 1px rgba( 0, 0, 0, 0.15 );
 @box-shadow-dialog:   0 2px 2px 0 rgba( 0, 0, 0, 0.25 );
 @box-shadow-menu: @box-shadow-dialog;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib32072e8770ccc120f732498ef8e18b6ce2bf8ff
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia-ui-base
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Check gerrit2 instead of gerrit for http domain for now

2017-09-11 Thread Paladox (Code Review)
Paladox has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377360 )

Change subject: Check gerrit2 instead of gerrit for http domain for now
..


Check gerrit2 instead of gerrit for http domain for now

This can be reverted when i can get lets encrypt to work with 
gerrit.git.wmflabs.org

Change-Id: I3f8b7010bef7fd496997fb28db28cc724a24f41d
---
M templates/hosts.conf.erb
1 file changed, 18 insertions(+), 1 deletion(-)

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



diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb
index e9ccc0b..8e0c25d 100644
--- a/templates/hosts.conf.erb
+++ b/templates/hosts.conf.erb
@@ -142,6 +142,7 @@
 }
 }
 
+/* can be re enabled once it works with letsencrypt
 object Host "gerrit.git.wmflabs.org" {
  import "generic-host"
  address = "gerrit.git.wmflabs.org"
@@ -156,7 +157,23 @@
/* The UserGroup `icingaadmins` is defined in `users.conf`. */
groups = [ "icingaadmins" ]
  }
- }
+}*/
+
+object Host "gerrit2.git.wmflabs.org" {
+ import "generic-host"
+ address = "gerrit2.git.wmflabs.org"
+ vars.os = "Linux OS"
+ vars.sla = "24x7"
+ vars.load_check = "disable"
+ vars.website_name = "gerrit2.git.wmflabs.org"
+ vars.website_url = "/r/"
+ vars.ssh_check = "disable"
+
+ vars.notification["mail"] = {
+   /* The UserGroup `icingaadmins` is defined in `users.conf`. */
+   groups = [ "icingaadmins" ]
+ }
+}
 
 object Host "gerrit-jenkins.wmflabs.org" {
  import "generic-host"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f8b7010bef7fd496997fb28db28cc724a24f41d
Gerrit-PatchSet: 2
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Check gerrit2 instead of gerrit for http domain for now

2017-09-11 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377360 )

Change subject: Check gerrit2 instead of gerrit for http domain for now
..

Check gerrit2 instead of gerrit for http domain for now

This can be reverted when i can get lets encrypt to work with 
gerrit.git.wmflabs.org

Change-Id: I3f8b7010bef7fd496997fb28db28cc724a24f41d
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 
refs/changes/60/377360/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f8b7010bef7fd496997fb28db28cc724a24f41d
Gerrit-PatchSet: 1
Gerrit-Project: labs/icinga2
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] apps...wikipedia[master]: Fix Chinese summary tags show in English

2017-09-11 Thread Cooltey (Code Review)
Cooltey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377359 )

Change subject: Fix Chinese summary tags show in English
..

Fix Chinese summary tags show in English

In this update:
 - Replace with L10nUtil.setDesiredLocale() to get correct Chinese tags.
 - Change L10nUtil.setDesiredLocale to public

Bug: T174709
Change-Id: I6eeafa835f40a75e22aeeab1ecbd2411f210639e
---
M app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
M app/src/main/java/org/wikipedia/util/L10nUtil.java
2 files changed, 9 insertions(+), 3 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java 
b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
index 9c57d00..6233058 100644
--- a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
+++ b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
@@ -98,7 +98,7 @@
 Configuration config = new 
Configuration(oldResources.getConfiguration());
 Resources tempResources = getResources();
 if (!oldLocale.getLanguage().equals(newLocale.getLanguage()) && 
!newLocale.getLanguage().equals("test")) {
-ConfigurationCompat.setLocale(config, newLocale);
+L10nUtil.setDesiredLocale(config, newLocale);
 tempResources = new Resources(assets, metrics, config);
 }
 
diff --git a/app/src/main/java/org/wikipedia/util/L10nUtil.java 
b/app/src/main/java/org/wikipedia/util/L10nUtil.java
index 9aa538c..445cb3e 100644
--- a/app/src/main/java/org/wikipedia/util/L10nUtil.java
+++ b/app/src/main/java/org/wikipedia/util/L10nUtil.java
@@ -205,7 +205,7 @@
 return getRelativeTimeSpanString(date.getTime(), currentTimeMillis(), 
SECOND_IN_MILLIS, 0).toString();
 }
 
-private static void setDesiredLocale(@NonNull Configuration config, 
@NonNull Locale desiredLocale) {
+public static void setDesiredLocale(@NonNull Configuration config, 
@NonNull Locale desiredLocale) {
 // when loads API in chinese variant, we can get zh-hant, zh-hans and 
zh
 // but if we want to display chinese correctly based on the article 
itself, we have to
 // detect the variant from the API responses; otherwise, we will only 
get english texts.
@@ -217,7 +217,13 @@
 } else if (desiredLocale.getLanguage().equals(CHINESE_LANGUAGE_CODE)) {
 // create a new Locale object to manage only "zh" language code 
based on its app language
 // code. e.g.: search "HK" article in "zh-hant" or "zh-hans" will 
get "zh" language code
-setLocale(config, new 
Locale(WikipediaApp.getInstance().getAppLanguageCode()));
+if 
(WikipediaApp.getInstance().getAppLanguageCode().equals(TRADITIONAL_CHINESE_LANGUAGE_CODE))
 {
+setLocale(config, TRADITIONAL_CHINESE);
+} else if 
(WikipediaApp.getInstance().getAppLanguageCode().equals(SIMPLIFIED_CHINESE_LANGUAGE_CODE))
 {
+setLocale(config, SIMPLIFIED_CHINESE);
+} else {
+setLocale(config, desiredLocale);
+}
 } else {
 setLocale(config, desiredLocale);
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add more wikis to the list of the dumped.

2017-09-11 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377358 )

Change subject: Add more wikis to the list of the dumped.
..

Add more wikis to the list of the dumped.

Added all 1M+ wikis plus ones in group1 and a couple of others
that may be interesting to test.

If that goes well, will publish a call for wiki communities to nominate
their wikis for inclusion.

Bug: T171807
Change-Id: Ie6bd56982136d949c56078591d004de7432be927
---
M dblists/categories-rdf.dblist
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/58/377358/1

diff --git a/dblists/categories-rdf.dblist b/dblists/categories-rdf.dblist
index 286f697..3626987 100644
--- a/dblists/categories-rdf.dblist
+++ b/dblists/categories-rdf.dblist
@@ -1,2 +1,19 @@
 testwiki
 test2wiki
+enwiki
+dewiki
+frwiki
+hewiki
+cawiki
+eswiki
+ruwiki
+itwiki
+zhwiki
+jawiki
+nlwiki
+plwiki
+cebwiki
+svwiki
+viwiki
+warwiki
+mediawikiwiki

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6bd56982136d949c56078591d004de7432be927
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix case of MediaWiki\Auth\AbstractPreAuthenticationProvider

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377281 )

Change subject: Fix case of MediaWiki\Auth\AbstractPreAuthenticationProvider
..


Fix case of MediaWiki\Auth\AbstractPreAuthenticationProvider

This is causing some spam in the logs:

  Class MediaWiki\auth\AbstractPreAuthenticationProvider was loaded using 
incorrect case

Change-Id: I340222e571a816e21f9a4978fe5ff82d3aea0680
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 6feaf4d..ede7c1e 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -371,7 +371,7 @@
'class' => GuanacoProvider::class,
'sort' => 0,
 ];
-class GuanacoProvider extends 
\MediaWiki\auth\AbstractPreAuthenticationProvider {
+class GuanacoProvider extends 
\MediaWiki\Auth\AbstractPreAuthenticationProvider {
const EVILUA = 'Bawolff test';
 
public function testUserForCreation( $user, $autocreate, array $options 
= [] ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I340222e571a816e21f9a4978fe5ff82d3aea0680
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Special:PageLanguage on mul.wikisource

2017-09-11 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377357 )

Change subject: Enable Special:PageLanguage on mul.wikisource
..

Enable Special:PageLanguage on mul.wikisource

Bug: T175622
Change-Id: Ief7b02a5b2237f01ddd6fb5f0b849fad8dadd85a
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/57/377357/1

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 11829da..af37d27 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11979,6 +11979,7 @@
 
 'wgPageLanguageUseDB' => [
'default' => false,
+   'wikisource' => true, // T175622
// overridden to true in CommonSettings for wikis using the Translate 
extension
 ],
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief7b02a5b2237f01ddd6fb5f0b849fad8dadd85a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add some devs with significant contributions to core

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376895 )

Change subject: Add some devs with significant contributions to core
..


Add some devs with significant contributions to core

Change-Id: I2f904c3c6748a4ad42d38dd89166cc5090365f67
---
M includes/specials/SpecialVersion.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  Catrope: Looks good to me, approved
  jenkins-bot: Verified
  Mooeypoo: Looks good to me, but someone else must approve



diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index 3ea1d03..f176b40 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -203,6 +203,7 @@
'Roan Kattouw', 'Trevor Parscal', 'Bryan Tong Minh', 
'Sam Reed',
'Victor Vasiliev', 'Rotem Liss', 'Platonides', 'Antoine 
Musso',
'Timo Tijhof', 'Daniel Kinzler', 'Jeroen De Dauw', 
'Brad Jorsch',
+   'Bartosz Dziewoński', 'Ed Sanders', 'Moriel 
Schottlender',
$othersLink, $translatorsLink
];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f904c3c6748a4ad42d38dd89166cc5090365f67
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add App Shortcuts feature In this update: 1. Add app shortc...

2017-09-11 Thread Cooltey (Code Review)
Cooltey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377356 )

Change subject: Add App Shortcuts feature In this update:  1. Add app shortcuts 
feature for Android 7.1 or higher  2. Created three icons with circled 
background  3. Setup pinned shortcuts feature when open the app, and pinned 
shortcuts will be created dynamically
..

Add App Shortcuts feature
In this update:
 1. Add app shortcuts feature for Android 7.1 or higher
 2. Created three icons with circled background
 3. Setup pinned shortcuts feature when open the app, and pinned shortcuts will 
be created dynamically

Some places might need to be updated in future patches:
 1. App icon image width and height?
 2. Should "Random" get a article from the offline compilation?
 3. Should we show a message when no article has been read?

Bug: T174308
Change-Id: I812843aa1d5796aae6e85e38ca75cf1bbb778b61
---
M app/src/main/java/org/wikipedia/Constants.java
A app/src/main/java/org/wikipedia/appshortcuts/AppShortcuts.java
M app/src/main/java/org/wikipedia/history/HistoryEntry.java
M app/src/main/java/org/wikipedia/main/MainActivity.java
M app/src/main/java/org/wikipedia/main/MainFragment.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/search/SearchInvokeSource.java
A app/src/main/res/drawable/appshortcut_ic_continue_reading.xml
A app/src/main/res/drawable/appshortcut_ic_random.xml
A app/src/main/res/drawable/appshortcut_ic_search.xml
A app/src/main/res/drawable/ic_arrow_forward_accent50_24dp.xml
A app/src/main/res/drawable/ic_casino_accent50_24dp.xml
A app/src/main/res/drawable/ic_search_accent50_24dp.xml
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/dimens.xml
M app/src/main/res/values/strings.xml
16 files changed, 231 insertions(+), 3 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/Constants.java 
b/app/src/main/java/org/wikipedia/Constants.java
index 8428652..622626a 100644
--- a/app/src/main/java/org/wikipedia/Constants.java
+++ b/app/src/main/java/org/wikipedia/Constants.java
@@ -30,6 +30,10 @@
 public static final String INTENT_SEARCH_FROM_WIDGET = "searchFromWidget";
 public static final String INTENT_FEATURED_ARTICLE_FROM_WIDGET = 
"featuredArticleFromWidget";
 
+public static final String INTENT_APPSHORTCUT_SEARCH = "appShortCutSearch";
+public static final String INTENT_APPSHORTCUT_CONTINUE_READING = 
"appShortCutContinueReading";
+public static final String INTENT_APPSHORTCUT_RANDOM = "appShortCutRandom";
+
 public static final String INTENT_EXTRA_REVERT_QNUMBER = "revertQNumber";
 public static final String INTENT_EXTRA_DELETE_READING_LIST = 
"deleteReadingList";
 
diff --git a/app/src/main/java/org/wikipedia/appshortcuts/AppShortcuts.java 
b/app/src/main/java/org/wikipedia/appshortcuts/AppShortcuts.java
new file mode 100644
index 000..af23169
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/appshortcuts/AppShortcuts.java
@@ -0,0 +1,88 @@
+package org.wikipedia.appshortcuts;
+
+import android.annotation.TargetApi;
+import android.content.Intent;
+import android.content.pm.ShortcutInfo;
+import android.content.pm.ShortcutManager;
+import android.graphics.drawable.Icon;
+import android.net.Uri;
+import android.os.Build;
+
+import org.wikipedia.Constants;
+import org.wikipedia.R;
+import org.wikipedia.WikipediaApp;
+import org.wikipedia.main.MainActivity;
+import org.wikipedia.page.PageActivity;
+
+import java.util.Arrays;
+
+public class AppShortcuts {
+
+private WikipediaApp app;
+
+public AppShortcuts() {
+app = WikipediaApp.getInstance();
+}
+
+public void init() {
+if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
+
+ShortcutManager shortcutManager = 
app.getSystemService(ShortcutManager.class);
+if (android.os.Build.VERSION.SDK_INT >= 
android.os.Build.VERSION_CODES.N_MR1) {
+
shortcutManager.setDynamicShortcuts(Arrays.asList(randomShortcut(), 
continueReadingShortcut(), searchShortcut()));
+}
+}
+}
+
+@TargetApi(android.os.Build.VERSION_CODES.N_MR1)
+private ShortcutInfo randomShortcut() {
+
+ShortcutInfo shortcut = new ShortcutInfo.Builder(app, 
app.getString(R.string.app_shortcuts_random))
+.setShortLabel(app.getString(R.string.app_shortcuts_random))
+.setLongLabel(app.getString(R.string.app_shortcuts_random))
+.setIcon(Icon.createWithResource(app, 
R.drawable.appshortcut_ic_random))
+.setIntent(
+new Intent(Intent.ACTION_MAIN, Uri.EMPTY, app, 
PageActivity.class)
+.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+.putExtra(Constants.INTENT_APPSHORTCUT_RANDOM, 
true))
+  

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Remove unused method

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377354 )

Change subject: Hygiene: Remove unused method
..


Hygiene: Remove unused method

Change-Id: If55086ad753585d4ce3f189678d812456319e9de
---
M app/src/main/java/org/wikipedia/settings/Prefs.java
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/settings/Prefs.java 
b/app/src/main/java/org/wikipedia/settings/Prefs.java
index 28f0a5e..3e9928b 100644
--- a/app/src/main/java/org/wikipedia/settings/Prefs.java
+++ b/app/src/main/java/org/wikipedia/settings/Prefs.java
@@ -553,10 +553,6 @@
 setString(R.string.preference_key_compilation_cache, 
GsonMarshaller.marshal(compilations));
 }
 
-public static boolean isOfflineTutorialCardEnabled() {
-return 
getBoolean(R.string.preference_key_offline_onboarding_card_enabled, true);
-}
-
 public static void setOfflineTutorialCardEnabled(boolean enabled) {
 setBoolean(R.string.preference_key_offline_onboarding_card_enabled, 
enabled);
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If55086ad753585d4ce3f189678d812456319e9de
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Cooltey 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Sharvaniharan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia-ui-base[master]: README: Use clearer and more consistent description

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377034 )

Change subject: README: Use clearer and more consistent description
..


README: Use clearer and more consistent description

Change-Id: Ib5688cd56743022a4ac61984ff4429e1a154d693
---
M README.md
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/README.md b/README.md
index fb91c48..9857fcb 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
-# WikimediaUI base stylesheet variables
+# WikimediaUI Base stylesheet variables
 
-WikimediaUI repository provides stylesheets with variables containing
-Wikimedia Foundation wide user interface basic style values.
-In the early draft we are providing
- - `wikimedia-ui-base.css` file containing variables in CSS Custom Properties 
syntax,
+WikimediaUI Base repository provides stylesheets with variables containing
+Wikimedia Foundation basic user interface style values.
+We are providing:
+ - `wikimedia-ui-base.css` file containing the variables in CSS Custom 
Properties syntax,
  preferably used with PostCSS
- - `wikimedia-ui-base.less` file containing variables in Less syntax (exact 
copy from above)
+ - `wikimedia-ui-base.less` file containing the variables in LESS syntax
 
 ## Install
 Clone the repo: `git clone 
https://phabricator.wikimedia.org/diffusion/WMUI/wikimedia-ui.git`.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5688cd56743022a4ac61984ff4429e1a154d693
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia-ui-base
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jdrewniak 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia-ui-base[master]: Add `border-color-wikitable` var

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377036 )

Change subject: Add `border-color-wikitable` var
..


Add `border-color-wikitable` var

Adding `border-color-wikitable` var as follow-up to I4507aae9f445.

Change-Id: I60245a6960a383760acc423f5f5417d507c1efc1
---
M wikimedia-ui-base.css
M wikimedia-ui-base.less
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/wikimedia-ui-base.css b/wikimedia-ui-base.css
index dfd92de..279fec0 100644
--- a/wikimedia-ui-base.css
+++ b/wikimedia-ui-base.css
@@ -109,6 +109,7 @@
--border-color-destructive--active: #b77c79;
--border-color-inset--focus:var( --color-base--inverted );
--border-color-heading: var( --wmui-color-base70 );
+   --border-color-wikitable:   rgba( 84, 89, 93, 0.3 ); /* See T168029 
*/
/* Border Widths */
--border-width-base:1px;
/* Border Radius */
diff --git a/wikimedia-ui-base.less b/wikimedia-ui-base.less
index a96c6fa..74c0dfd 100644
--- a/wikimedia-ui-base.less
+++ b/wikimedia-ui-base.less
@@ -108,6 +108,7 @@
 @border-color-destructive--active: #b77c79;
 @border-color-inset--focus:   @color-base--inverted;
 @border-color-heading:@wmui-color-base70;
+@border-color-wikitable:  rgba( 84, 89, 93, 0.3 ); // See T168029
 // Border Widths
 @border-width-base:   1px;
 // Border Radius

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60245a6960a383760acc423f5f5417d507c1efc1
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia-ui-base
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: stdlib: fix quoting in validate_legacy example

2017-09-11 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377355 )

Change subject: stdlib: fix quoting in validate_legacy example
..

stdlib: fix quoting in validate_legacy example

I used this example code in Ifbd229304d5526b but
jenkins-bot gave me -1 for it, because puppet-lint:

"double quoted string containing no variables"

So i'm fixing the README itself for next time.

Change-Id: I695c3cb0474fad2bc70ea067735a179077043322
---
M modules/stdlib/README.markdown
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/377355/1

diff --git a/modules/stdlib/README.markdown b/modules/stdlib/README.markdown
index a4c30b5..bff1867 100644
--- a/modules/stdlib/README.markdown
+++ b/modules/stdlib/README.markdown
@@ -1500,7 +1500,7 @@
 Example:
 
 ```
-validate_legacy("Optional[String]", "validate_re", "Value to be validated", 
["."])
+validate_legacy('Optional[String]', 'validate_re', 'Value to be validated', 
["."])
 ```
 
 This function supports updating modules from Puppet 3 style argument 
validation (using the stdlib `validate_*` functions) to Puppet 4 data types, 
without breaking functionality for those depending on Puppet 3 style validation.

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Remove unused method

2017-09-11 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377354 )

Change subject: Hygiene: Remove unused method
..

Hygiene: Remove unused method

Change-Id: If55086ad753585d4ce3f189678d812456319e9de
---
M app/src/main/java/org/wikipedia/settings/Prefs.java
1 file changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/settings/Prefs.java 
b/app/src/main/java/org/wikipedia/settings/Prefs.java
index 28f0a5e..3e9928b 100644
--- a/app/src/main/java/org/wikipedia/settings/Prefs.java
+++ b/app/src/main/java/org/wikipedia/settings/Prefs.java
@@ -553,10 +553,6 @@
 setString(R.string.preference_key_compilation_cache, 
GsonMarshaller.marshal(compilations));
 }
 
-public static boolean isOfflineTutorialCardEnabled() {
-return 
getBoolean(R.string.preference_key_offline_onboarding_card_enabled, true);
-}
-
 public static void setOfflineTutorialCardEnabled(boolean enabled) {
 setBoolean(R.string.preference_key_offline_onboarding_card_enabled, 
enabled);
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...AntiSpoof[master]: Sync equivset.in with Equivalence sets page

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377184 )

Change subject: Sync equivset.in with Equivalence sets page
..


Sync equivset.in with Equivalence sets page

equivset.in and Extension:AntiSpoof/Equivalence_sets page was
out of sync.

Change-Id: I07690229ffaef13fad34c0767e9983bee467aac6
---
M maintenance/equivset.in
1 file changed, 73 insertions(+), 73 deletions(-)

Approvals:
  jenkins-bot: Verified
  Kaldari: Looks good to me, approved
  Dbarratt: Looks good to me, but someone else must approve



diff --git a/maintenance/equivset.in b/maintenance/equivset.in
index 9512a2c..b5d5670 100644
--- a/maintenance/equivset.in
+++ b/maintenance/equivset.in
@@ -170,32 +170,32 @@
 17A ź => 5A Z
 17C ż => 5A Z
 17E ž => 5A Z
-180 ƀ => b
+180 ƀ => 62 b
 181 Ɓ => 42 B
-182 Ƃ => b
-183 ƃ => b
-184 Ƅ => b
-185 ƅ => b
+182 Ƃ => 62 b
+183 ƃ => 62 b
+184 Ƅ => 62 b
+185 ƅ => 62 b
 187 Ƈ => 43 C
 188 ƈ => 43 C
 189 Ɖ => 44 D
 18A Ɗ => 44 D
-18B Ƌ => d
-18C ƌ => d
+18B Ƌ => 64 d
+18C ƌ => 64 d
 18F Ə => 1DD ǝ
 190 Ɛ => 45 E
 191 Ƒ => 46 F
-192 ƒ => f
+192 ƒ => 66 f
 193 Ɠ => 47 G
-196 Ɩ => l
-197 Ɨ => l
+196 Ɩ => 6C l
+197 Ɨ => 6C l
 198 Ƙ => 4B K
 199 ƙ => 4B K
-19A ƚ => l
-19D Ɲ => N
+19A ƚ => 6C l
+19D Ɲ => 4E N
 1A1 ơ => 1A0 Ơ
 1A4 Ƥ => 50 P
-1A5 ƥ => p
+1A5 ƥ => 70 p
 1A6 Ʀ => 52 R
 1A7 Ƨ => 32 2
 1A8 ƨ => 32 2
@@ -205,15 +205,15 @@
 1AE Ʈ => 54 T
 1B1 Ʊ => 55 U
 1B2 Ʋ => 55 U
-1B3 Ƴ => Y
-1B4 ƴ => y
+1B3 Ƴ => 59 Y
+1B4 ƴ => 79 y
 1B5 Ƶ => 5A Z
 1B6 ƶ => 5A Z
 1B7 Ʒ => 33 3
 1BC Ƽ => 35 5
 1BD ƽ => 35 5
 1BF ƿ => 50 P
-1C0 ǀ => |
+1C0 ǀ => 7C |
 1C3 ǃ => 49 I
 1C4 DŽ => 1F1 DZ
 1C6 dž => 1F3 dz
@@ -248,7 +248,7 @@
 21C Ȝ => 33 3
 21D ȝ => 33 3
 21E Ȟ => 48 H
-220 Ƞ => n
+220 Ƞ => 6E n
 222 Ȣ => 38 8
 223 ȣ => 38 8
 224 Ȥ => 5A Z
@@ -275,7 +275,7 @@
 269 ɩ => 49 I
 26B ɫ => 49 I
 26D ɭ => 49 I
-26F ɯ => W
+26F ɯ => 57 W
 26F ɯ => 4D M
 271 ɱ => 4D M
 272 ɲ => 4E N
@@ -315,7 +315,7 @@
 399 Ι => 31 1
 39A Κ => 4B K
 39C Μ => 4D M
-39D Ν => N
+39D Ν => 4E N
 39F Ο => 30 0
 3A1 Ρ => 50 P
 3A4 Τ => 54 T
@@ -324,7 +324,7 @@
 3A7 Χ => 58 X
 3AC ά => 41 A
 3AE ή => 48 H
-3B1 α => a
+3B1 α => 61 a
 3B2 β => 42 B
 3B4 δ => 394 Δ
 3B5 ε => 45 E
@@ -347,11 +347,11 @@
 3C6 φ => 278 ɸ
 3C7 χ => 58 X
 3C8 ψ => 3A8 Ψ
-3C9 ω => w
+3C9 ω => 77 w
 3CB ϋ => 59 Y
 3CC ό => 4F O
 3CD ύ => 59 Y
-3D2 ϒ => Y
+3D2 ϒ => 59 Y
 3D3 ϓ => 59 Y
 3D5 ϕ => 278 ɸ
 3DC Ϝ => 46 F
@@ -359,13 +359,13 @@
 3E8 Ϩ => 32 2
 3E9 ϩ => 32 2
 3F2 ϲ => 43 C
-3F3 ϳ => j
+3F3 ϳ => 6A j
 3F4 ϴ => 4F O
 3F9 Ϲ => 43 C
 404 Є => 45 E
 405 Ѕ => 35 5
 406 І => 31 1
-408 Ј => J
+408 Ј => 4A J
 40B Ћ => 48 H
 410 А => 41 A
 411 Б => 36 6
@@ -381,7 +381,7 @@
 420 Р => 50 P
 421 С => 43 C
 422 Т => 54 T
-423 У => y
+423 У => 79 y
 424 Ф => 278 ɸ
 425 Х => 58 X
 427 Ч => 34 4
@@ -427,16 +427,16 @@
 463 ѣ => 42 B
 472 Ѳ => 4F O
 473 ѳ => 4F O
-474 Ѵ => V
-475 ѵ => v
+474 Ѵ => 56 V
+475 ѵ => 76 v
 47D ѽ => 47C Ѽ
 48A Ҋ => 418 И
 48B ҋ => 418 И
-48C Ҍ => b
-48D ҍ => b
+48C Ҍ => 62 b
+48D ҍ => 62 b
 491 ґ => 490 Ґ
-492 Ғ => F
-493 ғ => F
+492 Ғ => 46 F
+493 ғ => 46 F
 496 Җ => 416 Ж
 497 җ => 416 Ж
 498 Ҙ => 33 3
@@ -453,16 +453,16 @@
 4AB ҫ => 43 C
 4AC Ҭ => 54 T
 4AD ҭ => 54 T
-4AE Ү => Y
-4AF ү => Y
-4B0 Ұ => Y
-4B1 ұ => Y
+4AE Ү => 59 Y
+4AF ү => 59 Y
+4B0 Ұ => 59 Y
+4B1 ұ => 59 Y
 4B2 Ҳ => 58 X
 4B3 ҳ => 58 X
-4B6 Ҷ => y
-4B7 ҷ => y
-4BA Һ => h
-4BB һ => h
+4B6 Ҷ => 79 y
+4B7 ҷ => 79 y
+4BA Һ => 68 h
+4BB һ => 68 h
 4BD ҽ => 4BC Ҽ
 4BE Ҿ => 4BC Ҽ
 4BF ҿ => 4BC Ҽ
@@ -474,8 +474,8 @@
 4C8 ӈ => 48 H
 4C9 Ӊ => 48 H
 4CA ӊ => 48 H
-4CB Ӌ => y
-4CC ӌ => y
+4CB Ӌ => 79 y
+4CC ӌ => 79 y
 4CD Ӎ => 4D M
 4CE ӎ => 4D M
 4D4 Ӕ => C6 Æ
@@ -488,16 +488,16 @@
 4E8 Ө => 4F O
 4E9 ө => 4F O
 4EB ӫ => 4F O
-500 Ԁ => d
-501 ԁ => d
+500 Ԁ => 64 d
+501 ԁ => 64 d
 50B ԋ => 48 H
 50C Ԍ => 47 G
 50D ԍ => 47 G
 531 Ա => 561 ա
-531 Ա => U
+531 Ա => 55 U
 532 Բ => 562 բ
 533 Գ => 563 գ
-533 Գ => q
+533 Գ => 71 q
 534 Դ => 564 դ
 535 Ե => 565 ե
 536 Զ => 566 զ
@@ -515,7 +515,7 @@
 542 Ղ => 572 ղ
 543 Ճ => 573 ճ
 544 Մ => 574 մ
-544 Մ => U
+544 Մ => 55 U
 545 Յ => 575 յ
 545 Յ => 33 3
 546 Ն => 576 ն
@@ -537,16 +537,16 @@
 555 Օ => 585 օ
 555 Օ => 30 0
 556 Ֆ => 586 ֆ
-563 գ => q
-566 զ => q
-570 հ => h
-575 յ => j
-578 ո => n
-57C ռ => n
-57D ս => u
-581 ց => g
-584 ք => p
-585 օ => o
+563 գ => 71 q
+566 զ => 71 q
+570 հ => 68 h
+575 յ => 6A j
+578 ո => 6E n
+57C ռ => 6E n
+57D ս => 75 u
+581 ց => 67 g
+584 ք => 70 p
+585 օ => 6F o
 589 ։ => 3A :
 59C ֜ => 301 ́
 5AF ֯ => 30A ̊
@@ -701,44 +701,44 @@
 101D ဝ => 30 0
 1036 ံ => 30A ̊
 1040 ၀ => 30 0
-10E7 ყ => y
+10E7 ყ => 79 y
 10F3 ჳ => 33 3
 13A1 Ꭱ => 52 R
 13A5 Ꭵ => 31 1
-13A9 Ꭹ => Y
+13A9 Ꭹ => 59 Y
 13AA Ꭺ => 41 A
-13AB Ꭻ => J
+13AB Ꭻ => 4A J
 13AC Ꭼ => 45 E
 13B1 Ꮁ => 52 R
-13B3 Ꮃ => W
+13B3 Ꮃ => 57 W
 13B7 Ꮇ => 4D M
 13BB Ꮋ => 48 H
-13BD Ꮍ => y
+13BD Ꮍ => 79 y
 13BE Ꮎ => 4F O
 13C0 Ꮐ => 47 G
-13C2 Ꮒ => h
+13C2 Ꮒ => 68 h
 13C3 Ꮓ => 5A Z
 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalPreferences[master]: Add breadcrumb as subpage subtitle, to go back to Preferences

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376479 )

Change subject: Add breadcrumb as subpage subtitle, to go back to Preferences
..


Add breadcrumb as subpage subtitle, to go back to Preferences

Add a breadcrumb link for navigating back to local Preferences
page to the subpage subtitle area of Special:GlobalPreferences.

Bug: T173873
Change-Id: I1f43643d42e739c190951ef55dc6d596d1a3b31c
---
M includes/SpecialGlobalPreferences.php
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/includes/SpecialGlobalPreferences.php 
b/includes/SpecialGlobalPreferences.php
index 8c41fdf..2daafa4 100644
--- a/includes/SpecialGlobalPreferences.php
+++ b/includes/SpecialGlobalPreferences.php
@@ -30,6 +30,15 @@
$this->setHeaders();
throw new ErrorPageError( 'globalprefs-error-header', 
'globalprefs-notglobal' );
}
+
+   // Add link back to (local) Preferences.
+   $link = $this->getLinkRenderer()->makeKnownLink(
+   static::getSafeTitleFor( 'Preferences' ),
+   $this->msg( 'mypreferences' )->escaped()
+   );
+   // Same left-arrow as used in Skin::subPageSubtitle().
+   $this->getOutput()->addSubtitle( " $link" );
+
// Add module styles and scripts separately
// so non-JS users get the styles quicker and to avoid a FOUC.
$this->getOutput()->addModuleStyles( 
'ext.GlobalPreferences.special.nojs' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f43643d42e739c190951ef55dc6d596d1a3b31c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GlobalPreferences
Gerrit-Branch: master
Gerrit-Owner: Samwilson 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Design tweak: update header edit button tint

2017-09-11 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377353 )

Change subject: Design tweak: update header edit button tint
..

Design tweak: update header edit button tint

Bug: T172157
Change-Id: Id27761669b9aad340b0e83e94d7600cd85dd7d69
---
M app/src/main/res/layout/view_page_header.xml
M app/src/main/res/values/attrs.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
4 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/app/src/main/res/layout/view_page_header.xml 
b/app/src/main/res/layout/view_page_header.xml
index 45a046f..1a0eb99 100644
--- a/app/src/main/res/layout/view_page_header.xml
+++ b/app/src/main/res/layout/view_page_header.xml
@@ -73,7 +73,8 @@
 android:layout_gravity="bottom|end"
 app:srcCompat="@drawable/ic_mode_edit_white_24dp"
 android:scaleType="fitCenter"
-android:tint="?attr/page_description_color"
+android:tint="?android:attr/textColorSecondary"
+android:alpha="?attr/page_header_edit_pencil_alpha"
 android:background="?attr/selectableItemBackgroundBorderless"
 android:contentDescription="@string/article_header_edit_hint" />
 
diff --git a/app/src/main/res/values/attrs.xml 
b/app/src/main/res/values/attrs.xml
index 7334067..45e1c59 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -35,6 +35,7 @@
 
 
 
+
 
 
 
diff --git a/app/src/main/res/values/styles_dark.xml 
b/app/src/main/res/values/styles_dark.xml
index c92bd78..aa6976c 100644
--- a/app/src/main/res/values/styles_dark.xml
+++ b/app/src/main/res/values/styles_dark.xml
@@ -58,6 +58,7 @@
 @color/link_preview_offline_text_dark
 @color/list_item_text_primary_dark
 @color/list_item_text_secondary_dark
+1.0
 
 @color/offline_library_background_color_dark
 
diff --git a/app/src/main/res/values/styles_light.xml 
b/app/src/main/res/values/styles_light.xml
index 56c14a9..17d63d2 100644
--- a/app/src/main/res/values/styles_light.xml
+++ b/app/src/main/res/values/styles_light.xml
@@ -58,6 +58,7 @@
 @color/link_preview_offline_text_light
 @color/list_item_text_primary_light
 @color/list_item_text_secondary_light
+0.55
 
 @color/offline_library_background_color_light
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Fix word jumping (option+arrow key) for Mac

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377302 )

Change subject: Fix word jumping (option+arrow key) for Mac
..


Fix word jumping (option+arrow key) for Mac

Bug: T175378
Bug: T174055
Change-Id: I7f648691ec3b36f9abe1c5c7fbe5c97e142f500e
---
M resources/ext.CodeMirror.js
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index 7a253e7..1ebd32c 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -17,6 +17,10 @@
// This can be the string "0" if the user disabled the 
preference - Bug T54542#555387
mw.user.options.get( 'usebetatoolbar' ) > 0;
 
+   // T174055: Do not redefine the browser history navigation keys 
(T175378: for PC only)
+   CodeMirror.keyMap.pcDefault[ 'Alt-Left' ] = false;
+   CodeMirror.keyMap.pcDefault[ 'Alt-Right' ] = false;
+
// function for a textselection function for CodeMirror
function cmTextSelection( command, options ) {
var fn, retval;
@@ -370,10 +374,7 @@
Tab: false,
// T174514: Move the cursor at the 
beginning/end of the current wrapped line
Home: 'goLineLeft',
-   End: 'goLineRight',
-   // T174055: Do not redefine the browser 
history navigation keys
-   'Alt-Left': false,
-   'Alt-Right': false
+   End: 'goLineRight'
},
viewportMargin: Infinity
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f648691ec3b36f9abe1c5c7fbe5c97e142f500e
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Fetch Hadoop NameNode fsimage backups daily and also save th...

2017-09-11 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377352 )

Change subject: Fetch Hadoop NameNode fsimage backups daily and also save them 
in bacula
..

Fetch Hadoop NameNode fsimage backups daily and also save them in bacula

Change-Id: I5d8b772c8501e914858cac16aaa6d3c9f3a3c028
Needs: https://gerrit.wikimedia.org/r/#/c/377350/
---
M modules/cdh
M modules/profile/manifests/backup/director.pp
A modules/role/manifests/analytics_cluster/backup.pp
M modules/role/manifests/analytics_cluster/database/meta/backup_dest.pp
M modules/role/manifests/analytics_cluster/hadoop/standby.pp
5 files changed, 45 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/377352/1

diff --git a/modules/cdh b/modules/cdh
index 1d5b40f..d96a904 16
--- a/modules/cdh
+++ b/modules/cdh
@@ -1 +1 @@
-Subproject commit 1d5b40f8adf3e9e9698494d32c610bae2952734b
+Subproject commit d96a9040669178f034c9489d7e48d3060441bfdb
diff --git a/modules/profile/manifests/backup/director.pp 
b/modules/profile/manifests/backup/director.pp
index d55e62f..c034fe1 100644
--- a/modules/profile/manifests/backup/director.pp
+++ b/modules/profile/manifests/backup/director.pp
@@ -233,6 +233,10 @@
 includes => [ '/var/lib/rancid' ]
 }
 
+bacula::director::fileset { 'hadoop-namenode-backup':
+includes => [ '/srv/backup/hadoop/namenode' ]
+}
+
 # The console should be on the director
 class { 'bacula::console':
 director   => $::fqdn,
diff --git a/modules/role/manifests/analytics_cluster/backup.pp 
b/modules/role/manifests/analytics_cluster/backup.pp
new file mode 100644
index 000..b3bc9a1
--- /dev/null
+++ b/modules/role/manifests/analytics_cluster/backup.pp
@@ -0,0 +1,10 @@
+# == Class role::analytics_cluster::backup
+# Simple wrapper class to create and manage /srv/backup
+class role::analytics_cluster::backup {
+file { '/srv/backup':
+ensure => 'directory',
+owner  => 'root',
+group  => 'analytics-admins',
+mode   => '0750',
+}
+}
diff --git 
a/modules/role/manifests/analytics_cluster/database/meta/backup_dest.pp 
b/modules/role/manifests/analytics_cluster/database/meta/backup_dest.pp
index c85f0a1..fd691d6 100644
--- a/modules/role/manifests/analytics_cluster/database/meta/backup_dest.pp
+++ b/modules/role/manifests/analytics_cluster/database/meta/backup_dest.pp
@@ -1,8 +1,10 @@
 # == Class role::analytics_cluster::database::meta::backup_dest
 #
 class role::analytics_cluster::database::meta::backup_dest {
+# Ensure /srv/backup exists
+include ::role::analytics_cluster::backup
+
 file { [
-'/srv/backup',
 '/srv/backup/mysql',
 '/srv/backup/mysql/analytics-meta',
 ]:
diff --git a/modules/role/manifests/analytics_cluster/hadoop/standby.pp 
b/modules/role/manifests/analytics_cluster/hadoop/standby.pp
index 61a63f8..70152d3 100644
--- a/modules/role/manifests/analytics_cluster/hadoop/standby.pp
+++ b/modules/role/manifests/analytics_cluster/hadoop/standby.pp
@@ -53,6 +53,33 @@
 }
 }
 
+if $::realm == 'production' {
+include ::role::analytics_cluster::backup
+
+file { [
+'/srv/backup/hadoop',
+'/srv/backup/hadoop/namenode',
+]:
+ensure => 'directory',
+owner  => 'hdfs',
+group  => 'analytics-admins',
+mode   => '0750',
+}
+
+# Use this standby name node to also take daily fsimage namenode
+# metadata backups, backed up with bacula.
+class { '::cdh::hadoop::namenode::backup':
+destination=> '/srv/backup/hadoop/namenode',
+# Delete fsimages older than $retention_days
+retention_days => 30,
+hour   => 0
+}
+
+class { 'backup::host':
+   sets => ['hadoop-namenode-backup', ]
+}
+}
+
 # Firewall
 include ::role::analytics_cluster::hadoop::ferm::namenode
 

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: SelectWidget: Ignore keypresses with modifiers in type-to-se...

2017-09-11 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377351 )

Change subject: SelectWidget: Ignore keypresses with modifiers in type-to-search
..

SelectWidget: Ignore keypresses with modifiers in type-to-search

This is more complicated than it sounds because we still want to allow
the user to type 'A' (Shift+A) or 'ą' (AltGr+A on Polish keyboard).
Introduce a helper function to check for these.

Bug: T174133
Change-Id: If314d088b3ec9e07086207b67aaeaf541b1223f0
---
M src/core.js
M src/widgets/SelectWidget.js
M tests/core.test.js
3 files changed, 49 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/51/377351/1

diff --git a/src/core.js b/src/core.js
index 1073da9..5f16d59 100644
--- a/src/core.js
+++ b/src/core.js
@@ -190,6 +190,22 @@
 };
 
 /**
+ * Check whether a jQuery event represents a plain key press, without 
modifiers commonly used for
+ * keyboard shortcuts, like Ctrl or Command.
+ *
+ * Note that modifiers required to input text are allowed, including Shift and 
Alt+Ctrl (AltGr).
+ *
+ * For example, this function will return true for 'A', 'Shift+A' or 
'Alt+Ctrl+A' ('AltGr+A'),
+ * but false for 'Alt+A', 'Ctrl+A' or 'Command+A'.
+ *
+ * @param {jQuery.Event} e The jQuery event object
+ * @return {boolean} Whether it was a plain key press
+ */
+OO.ui.isPlainKeyPress = function ( e ) {
+   return !e.metaKey && ( ( !e.altKey && !e.ctrlKey ) || ( e.altKey && 
e.ctrlKey ) );
+};
+
+/**
  * Check if a node is contained within another node
  *
  * Similar to jQuery#contains except a list of containers can be supplied
diff --git a/src/widgets/SelectWidget.js b/src/widgets/SelectWidget.js
index fc5040a..814258c 100644
--- a/src/widgets/SelectWidget.js
+++ b/src/widgets/SelectWidget.js
@@ -390,6 +390,9 @@
 OO.ui.SelectWidget.prototype.onKeyPress = function ( e ) {
var c, filter, item;
 
+   if ( !OO.ui.isPlainKeyPress( e ) ) {
+   return;
+   }
if ( !e.charCode ) {
if ( e.keyCode === OO.ui.Keys.BACKSPACE && this.keyPressBuffer 
!== '' ) {
this.keyPressBuffer = this.keyPressBuffer.substr( 0, 
this.keyPressBuffer.length - 1 );
diff --git a/tests/core.test.js b/tests/core.test.js
index a758e65..cc7bbc0 100644
--- a/tests/core.test.js
+++ b/tests/core.test.js
@@ -1,5 +1,35 @@
 QUnit.module( 'core' );
 
+QUnit.test( 'isPlainKeyPress', function ( assert ) {
+   var cases, i, event, expected, result;
+   // Every possible combination of Alt, Ctrl, Shift, Command
+   cases = [
+   [ { altKey: 0, ctrlKey: 0, shiftKey: 0, metaKey: 0 }, true ],
+   [ { altKey: 0, ctrlKey: 0, shiftKey: 0, metaKey: 1 }, false ],
+   [ { altKey: 0, ctrlKey: 0, shiftKey: 1, metaKey: 0 }, true ],
+   [ { altKey: 0, ctrlKey: 0, shiftKey: 1, metaKey: 1 }, false ],
+   [ { altKey: 0, ctrlKey: 1, shiftKey: 0, metaKey: 0 }, false ],
+   [ { altKey: 0, ctrlKey: 1, shiftKey: 0, metaKey: 1 }, false ],
+   [ { altKey: 0, ctrlKey: 1, shiftKey: 1, metaKey: 0 }, false ],
+   [ { altKey: 0, ctrlKey: 1, shiftKey: 1, metaKey: 1 }, false ],
+   [ { altKey: 1, ctrlKey: 0, shiftKey: 0, metaKey: 0 }, false ],
+   [ { altKey: 1, ctrlKey: 0, shiftKey: 0, metaKey: 1 }, false ],
+   [ { altKey: 1, ctrlKey: 0, shiftKey: 1, metaKey: 0 }, false ],
+   [ { altKey: 1, ctrlKey: 0, shiftKey: 1, metaKey: 1 }, false ],
+   [ { altKey: 1, ctrlKey: 1, shiftKey: 0, metaKey: 0 }, true ],
+   [ { altKey: 1, ctrlKey: 1, shiftKey: 0, metaKey: 1 }, false ],
+   [ { altKey: 1, ctrlKey: 1, shiftKey: 1, metaKey: 0 }, true ],
+   [ { altKey: 1, ctrlKey: 1, shiftKey: 1, metaKey: 1 }, false ]
+   ];
+
+   for ( i = 0; i < cases.length; i++ ) {
+   event = cases[ i ][ 0 ];
+   expected = cases[ i ][ 1 ];
+   result = OO.ui.isPlainKeyPress( event );
+   assert.strictEqual( result, expected );
+   }
+} );
+
 /**
  * @note: Keep tests in sync with phpunit/TagTest.php
  */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If314d088b3ec9e07086207b67aaeaf541b1223f0
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] operations...cdh[master]: Add class to periodically run dfsadmin -fetchImage

2017-09-11 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377350 )

Change subject: Add class to periodically run dfsadmin -fetchImage
..

Add class to periodically run dfsadmin -fetchImage

This will be used for Hadoop NameNode metadata backups

Change-Id: I00062ac74c8640e21545ad8b5aa2a46ac9a6f83a
---
A manifests/hadoop/namenode/backup.pp
1 file changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/cdh 
refs/changes/50/377350/1

diff --git a/manifests/hadoop/namenode/backup.pp 
b/manifests/hadoop/namenode/backup.pp
new file mode 100644
index 000..936ffab
--- /dev/null
+++ b/manifests/hadoop/namenode/backup.pp
@@ -0,0 +1,37 @@
+# == Class cdh::hadoop::namenode::backup
+#
+# Installs a cron to periodically run hdfs dfsadmin -fetchImage $destination,
+# and another one to only remove any fetched images in $destination older than
+# $retention_days.
+#
+# $destination should be an existent directory; this class does not manage it.
+#
+class cdh::hadoop::namenode::backup(
+$destination,
+$retention_days = 30,
+$hour   = undef,
+$minute = undef,
+$month  = undef,
+$monthday   = undef,
+) {
+Class['cdh::hadoop'] -> Class['cdh::hadoop::namenode::backup']
+
+cron { 'hadoop-namenode-backup-fetchimage':
+command  => "/usr/bin/hdfs dfsadmin -fetchImage ${destination}",
+user => 'hdfs',
+hour => $hour,
+minute   => $minute,
+month=> $month,
+monthday => $monthday,
+}
+
+# Delete files older than $retention_days.
+cron { 'hadoop-namenode-backup-prune':
+command => "/usr/bin/find ${destination} -mtime +${retension_days} 
-delete",
+user => 'hdfs',
+hour => $hour,
+minute   => $minute,
+month=> $month,
+monthday => $monthday,
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00062ac74c8640e21545ad8b5aa2a46ac9a6f83a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/cdh
Gerrit-Branch: master
Gerrit-Owner: Ottomata 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: prefer equal to deepEqual in sectioning tests

2017-09-11 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377348 )

Change subject: Hygiene: prefer equal to deepEqual in sectioning tests
..

Hygiene: prefer equal to deepEqual in sectioning tests

Change-Id: I7debf9572afd73e0457d3b1c355ecc22d5638943
---
M test/lib/parsoid/parsoid-sections-test.js
1 file changed, 18 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/48/377348/1

diff --git a/test/lib/parsoid/parsoid-sections-test.js 
b/test/lib/parsoid/parsoid-sections-test.js
index bf1a655..4b65a81 100644
--- a/test/lib/parsoid/parsoid-sections-test.js
+++ b/test/lib/parsoid/parsoid-sections-test.js
@@ -9,24 +9,24 @@
 this.timeout(2); // eslint-disable-line no-invalid-this
 
 function assertSection0(sections) {
-assert.deepEqual(sections[0].id, 0);
-assert.deepEqual(sections[0].text, 'text0', 
JSON.stringify(sections[0], null, 2));
+assert.equal(sections[0].id, 0);
+assert.equal(sections[0].text, 'text0', JSON.stringify(sections[0], 
null, 2));
 }
 
 function assertSection1(sections, extraText = '') {
-assert.deepEqual(sections[1].id, 1);
-assert.deepEqual(sections[1].toclevel, 1);
-assert.deepEqual(sections[1].line, 'foo');
-assert.deepEqual(sections[1].anchor, 'foo');
-assert.deepEqual(sections[1].text, `text1${extraText}`);
+assert.equal(sections[1].id, 1);
+assert.equal(sections[1].toclevel, 1);
+assert.equal(sections[1].line, 'foo');
+assert.equal(sections[1].anchor, 'foo');
+assert.equal(sections[1].text, `text1${extraText}`);
 }
 
 function assertSection2(sections) {
-assert.deepEqual(sections[2].id, 2);
-assert.deepEqual(sections[2].toclevel, 2);
-// assert.deepEqual(sections[2].line, 'Funny section !@#$');
-assert.deepEqual(sections[2].anchor, 'Funny_section_.21.40.23.24');
-assert.deepEqual(sections[2].text, 'text2');
+assert.equal(sections[2].id, 2);
+assert.equal(sections[2].toclevel, 2);
+// assert.equal(sections[2].line, 'Funny section !@#$');
+assert.equal(sections[2].anchor, 'Funny_section_.21.40.23.24');
+assert.equal(sections[2].text, 'text2');
 }
 
 
@@ -34,16 +34,16 @@
 const doc = domino.createDocument('');
 parsoid.addSectionDivs(doc);
 const sections = parsoid.getSectionsText(doc);
-assert.deepEqual(sections.length, 1);
-assert.deepEqual(sections[0].id, 0);
-assert.deepEqual(sections[0].text, '');
+assert.equal(sections.length, 1);
+assert.equal(sections[0].id, 0);
+assert.equal(sections[0].text, '');
 });
 
 it('getSectionsText() with just text should produce a lead section', () => 
{
 const doc = domino.createDocument('text0');
 parsoid.addSectionDivs(doc);
 const sections = parsoid.getSectionsText(doc);
-assert.deepEqual(sections.length, 1);
+assert.equal(sections.length, 1);
 assertSection0(sections);
 });
 
@@ -51,7 +51,7 @@
 const doc = domino.createDocument('text0footext1');
 parsoid.addSectionDivs(doc);
 const sections = parsoid.getSectionsText(doc);
-assert.deepEqual(sections.length, 2);
+assert.equal(sections.length, 2);
 assertSection0(sections);
 assertSection1(sections);
 });
@@ -63,7 +63,7 @@
 '');
 parsoid.addSectionDivs(doc);
 const sections = parsoid.getSectionsText(doc);
-assert.deepEqual(sections.length, 3);
+assert.equal(sections.length, 3);
 assertSection0(sections);
 assertSection1(sections);
 assertSection2(sections);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7debf9572afd73e0457d3b1c355ecc22d5638943
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Refactor sectioning tests

2017-09-11 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377347 )

Change subject: Hygiene: Refactor sectioning tests
..

Hygiene: Refactor sectioning tests

Change-Id: I2c818450432681318f546dc37cbc09db0c47817e
---
M test/lib/parsoid/parsoid-sections-test.js
1 file changed, 6 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/47/377347/1

diff --git a/test/lib/parsoid/parsoid-sections-test.js 
b/test/lib/parsoid/parsoid-sections-test.js
index 9ec100d..bf1a655 100644
--- a/test/lib/parsoid/parsoid-sections-test.js
+++ b/test/lib/parsoid/parsoid-sections-test.js
@@ -4,11 +4,6 @@
 const domino = require('domino');
 const parsoid = require('../../../lib/parsoidSections');
 
-const html = 'text0' +
-'footext1' +
-'Funny section !@#$%^&*()text2' +
-'';
-
 describe('lib:parsoid-sections', function() {
 
 this.timeout(2); // eslint-disable-line no-invalid-this
@@ -18,12 +13,12 @@
 assert.deepEqual(sections[0].text, 'text0', 
JSON.stringify(sections[0], null, 2));
 }
 
-function assertSection1(sections) {
+function assertSection1(sections, extraText = '') {
 assert.deepEqual(sections[1].id, 1);
 assert.deepEqual(sections[1].toclevel, 1);
 assert.deepEqual(sections[1].line, 'foo');
 assert.deepEqual(sections[1].anchor, 'foo');
-assert.deepEqual(sections[1].text, 'text1');
+assert.deepEqual(sections[1].text, `text1${extraText}`);
 }
 
 function assertSection2(sections) {
@@ -62,7 +57,10 @@
 });
 
 it('getSectionsText() with one h2 and h3 should produce three sections', 
() => {
-const doc = domino.createDocument(html);
+const doc = domino.createDocument('text0' +
+'footext1' +
+'Funny section 
!@#$%^&*()text2' +
+'');
 parsoid.addSectionDivs(doc);
 const sections = parsoid.getSectionsText(doc);
 assert.deepEqual(sections.length, 3);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c818450432681318f546dc37cbc09db0c47817e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Bring back old section handling code

2017-09-11 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377349 )

Change subject: Bring back old section handling code
..

Bring back old section handling code

The new section handling code via the  tags from
parsoid-dom-util caused some issues with some pages that have heading
tags wrapped inside  tags.

This brings back the old behavior. A drawback of this is that the new
read-*html endpoints don't use  tags anymore; this is until
Parsoid implements and deploys T114072 or this code is changed again.

Changes:
* Moved parsoidSections to parsoidSectionsFromTags.
* parsoidSection now delegates to the proper implementation, either
using div or section tags.
* Brought back parsoidSectionsFromDivs.getSectionsText (from 590ef514
parsoid-access) since that is now needed for mobile-sections.
* Added more unit tests.
* Renamed addSectionDivs to addSectionTags in
parsoidSectionsFromSectionTags

Bug: T175305
Change-Id: I1a469995c1aca38ec662c989d023ca64e5a21b02
---
M lib/parsoidSections.js
M lib/parsoidSectionsFromDivs.js
A lib/parsoidSectionsFromSectionTags.js
M test/features/read-html/pagecontent-base.js
M test/features/read-html/pagecontent.js
M test/lib/parsoid/parsoid-sections-test.js
6 files changed, 151 insertions(+), 63 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/49/377349/1

diff --git a/lib/parsoidSections.js b/lib/parsoidSections.js
index 031a245..0027077 100644
--- a/lib/parsoidSections.js
+++ b/lib/parsoidSections.js
@@ -1,6 +1,7 @@
 'use strict';
 
-const parsoidDomUtils = require('parsoid-dom-utils');
+const parsoidSectionsFromDivs = require('./parsoidSectionsFromDivs');
+const parsoidSectionsFromSectionTags = 
require('./parsoidSectionsFromSectionTags');
 
 /**
  * New sectioning code: wraps sections in  tags. Will likely
@@ -8,36 +9,10 @@
  * @param {!document} doc the parsed DOM Document of the Parsoid output
  */
 function addSectionDivs(doc) {
-// in case this is already handled by Parsoid don't try again
+// in case this is already handled by Parsoid (T114072) don't try again
 if (!doc.querySelector('section')) {
-parsoidDomUtils.sections.wrap(doc);
+parsoidSectionsFromDivs.addSectionDivs(doc);
 }
-}
-
-/**
- * Parse the next wiki section. A wiki section is contained inside a  
tag.
- * If there is a nested sub section it ends right before that next sub 
section's
- *  tag starts.
- * @param {!Node} startingNode the DOM node to start parsing
- * @return {string} the HTML text of the next wiki section
- */
-function parseNextSection(startingNode) {
-let sectionText = '';
-let node = startingNode;
-
-while (node) {
-if (node.tagName !== 'SECTION') {
-if (node.outerHTML) {
-sectionText += node.outerHTML;
-} else if (node.nodeType === 3) {
-sectionText += node.textContent;
-}
-node = node.nextSibling;
-} else {
-return sectionText;
-}
-}
-return sectionText;
 }
 
 /**
@@ -47,38 +22,14 @@
  * @return {!sections[]} an array of section JSON elements
  */
 function getSectionsText(doc) {
-const sections = [];
-const sectionElements = doc.querySelectorAll('section');
-
-const currentSectionElement = sectionElements[0];
-const currentSection = {};
-currentSection.id = 0;
-currentSection.text = currentSectionElement ? 
currentSectionElement.innerHTML : '';
-sections.push(currentSection);
-
-for (let i = 1; i < sectionElements.length; i++) {
-const currentSection = {};
-const currentSectionElement = sectionElements[i];
-currentSection.id = i;
-const childEl = currentSectionElement.firstChild;
-
-if (childEl && /^H[1-6]$/.test(childEl.tagName)) {
-currentSection.text = parseNextSection(childEl.nextSibling); // 
text starts after H[1-6]
-currentSection.toclevel = parseInt(childEl.tagName.charAt(1), 10) 
- 1;
-currentSection.line = childEl.innerHTML.trim();
-currentSection.anchor = childEl.getAttribute('id');
-}
-
-sections.push(currentSection);
+if (!doc.querySelector('section')) {
+return parsoidSectionsFromDivs.getSectionsText(doc);
+} else {
+return parsoidSectionsFromSectionTags.getSectionsText(doc);
 }
-
-return sections;
 }
 
 module.exports = {
 addSectionDivs,
-getSectionsText,
-testing: {
-parseNextSection
-}
+getSectionsText
 };
diff --git a/lib/parsoidSectionsFromDivs.js b/lib/parsoidSectionsFromDivs.js
index e278ee4..700c716 100644
--- a/lib/parsoidSectionsFromDivs.js
+++ b/lib/parsoidSectionsFromDivs.js
@@ -30,7 +30,7 @@
 }
 
 /**
- * @deprecated Old sectioning code: wraps wiki sections in  elements.
+ * Old sectioning code: wraps wiki sections in  elements.
  * Just kept for the definitions 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Don't deploy Timeless on fr.wiktionary for now"

2017-09-11 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377346 )

Change subject: Revert "Don't deploy Timeless on fr.wiktionary for now"
..

Revert "Don't deploy Timeless on fr.wiktionary for now"

Wordmark can be configured on wiki, so it's not a blocker to deploy this.

This reverts commit df3ee8e44c2dcd6f15ed2cc6f2e63fc388b49042.

Change-Id: I04c12400fd49fb3918428186165bfe10fcfa059b
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/46/377346/1

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 11829da..472a36e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19471,6 +19471,7 @@
'frwikinews' => true, // T154371
'frwikisource' => true,
'frwikiversity' => true,
+   'frwiktionary' => true,
 ],
 
 ];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04c12400fd49fb3918428186165bfe10fcfa059b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: site_detect.py: Raise ServerError for 502 response status

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377282 )

Change subject: site_detect.py: Raise ServerError for 502 response status
..


site_detect.py: Raise ServerError for 502 response status

Bug: T175584
Change-Id: I1f2d5cb701f37c5e7e40db81b0849d9989485c2c
---
M pywikibot/site_detect.py
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py
index 347bd63..60048a6 100644
--- a/pywikibot/site_detect.py
+++ b/pywikibot/site_detect.py
@@ -305,6 +305,8 @@
 """Raise ServerError if the response indicates a server error."""
 if response.status == 503:
 raise ServerError('Service Unavailable')
+elif response.status == 502:
+raise ServerError('Bad Gateway')
 elif response.status == 500:
 raise ServerError('Internal Server Error')
 elif response.status == 200 and SERVER_DB_ERROR_MSG in response.content:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f2d5cb701f37c5e7e40db81b0849d9989485c2c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
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] mediawiki...deploy[master]: Include new cluster as deployment targets

2017-09-11 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377345 )

Change subject: Include new cluster as deployment targets
..

Include new cluster as deployment targets

Change-Id: I3381da534d08a00807ee3ee45d2b619145f02bb2
---
A scap/ores-cluster
M scap/scap.cfg
2 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy 
refs/changes/45/377345/1

diff --git a/scap/ores-cluster b/scap/ores-cluster
new file mode 100644
index 000..e989b70
--- /dev/null
+++ b/scap/ores-cluster
@@ -0,0 +1,9 @@
+ores1001.eqiad.wmnet
+ores1002.eqiad.wmnet
+ores1003.eqiad.wmnet
+ores1004.eqiad.wmnet
+ores1005.eqiad.wmnet
+ores1006.eqiad.wmnet
+ores1007.eqiad.wmnet
+ores1008.eqiad.wmnet
+ores1009.eqiad.wmnet
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 50d128a..41ddfd5 100755
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -3,7 +3,7 @@
 git_deploy_dir: /srv/deployment
 git_rev: origin/master
 ssh_user: deploy-service
-server_groups: canary, worker, default
+server_groups: canary, worker, cluster, default
 dsh_targets: ores
 worker_dsh_targets: ores-worker
 git_submodules: True

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3381da534d08a00807ee3ee45d2b619145f02bb2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ores/deploy
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Added "leaflet" input type - based on patch by Peter Grassbe...

2017-09-11 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377330 )

Change subject: Added "leaflet" input type - based on patch by Peter Grassberger
..


Added "leaflet" input type - based on patch by Peter Grassberger

Change-Id: I2b5422d2d2379a37c1e70e7729d7516a0916d689
---
M Gruntfile.js
M PageForms.php
M extension.json
M includes/PF_FormPrinter.php
A includes/forminputs/PF_LeafletInput.php
M libs/PF_maps.js
M libs/PF_maps.offline.js
7 files changed, 208 insertions(+), 26 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index 25a977d..b09780a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -15,8 +15,7 @@
'!libs/jquery.browser.js',
'!libs/jquery.dynatree.js',
'!libs/jquery.fancybox.js',
-   '!libs/select2.js',
-   '!libs/PF_maps.js'
+   '!libs/select2.js'
]
},
banana: {
diff --git a/PageForms.php b/PageForms.php
index 3b2a06e..9d12d22 100644
--- a/PageForms.php
+++ b/PageForms.php
@@ -220,6 +220,7 @@
 $GLOBALS['wgAutoloadClasses']['PFTokensInput'] = __DIR__ . 
'/includes/forminputs/PF_TokensInput.php';
 $GLOBALS['wgAutoloadClasses']['PFGoogleMapsInput'] = __DIR__ . 
'/includes/forminputs/PF_GoogleMapsInput.php';
 $GLOBALS['wgAutoloadClasses']['PFOpenLayersInput'] = __DIR__ . 
'/includes/forminputs/PF_OpenLayersInput.php';
+$GLOBALS['wgAutoloadClasses']['PFLeafletInput'] = __DIR__ . 
'/includes/forminputs/PF_LeafletInput.php';
 $GLOBALS['wgAutoloadClasses']['PFRegExpInput'] = __DIR__ . 
'/includes/forminputs/PF_RegExpInput.php';
 $GLOBALS['wgAutoloadClasses']['PFRatingInput'] = __DIR__ . 
'/includes/forminputs/PF_RatingInput.php';
 
diff --git a/extension.json b/extension.json
index bb65ea4..3f2355d 100644
--- a/extension.json
+++ b/extension.json
@@ -138,6 +138,7 @@
"PFTokensInput": "includes/forminputs/PF_TokensInput.php",
"PFGoogleMapsInput": 
"includes/forminputs/PF_GoogleMapsInput.php",
"PFOpenLayersInput": 
"includes/forminputs/PF_OpenLayersInput.php",
+   "PFLeafletInput": "includes/forminputs/PF_LeafletInput.php",
"PFRegExpInput": "includes/forminputs/PF_RegExpInput.php",
"PFRatingInput": "includes/forminputs/PF_RatingInput.php",
"PFWikiPage": "includes/wikipage/PF_WikiPage.php",
diff --git a/includes/PF_FormPrinter.php b/includes/PF_FormPrinter.php
index 7b4db18..3319d3e 100644
--- a/includes/PF_FormPrinter.php
+++ b/includes/PF_FormPrinter.php
@@ -65,6 +65,7 @@
$this->registerInputType( 'PFGoogleMapsInput' );
}
$this->registerInputType( 'PFOpenLayersInput' );
+   $this->registerInputType( 'PFLeafletInput' );
}
 
// All-purpose setup hook.
diff --git a/includes/forminputs/PF_LeafletInput.php 
b/includes/forminputs/PF_LeafletInput.php
new file mode 100644
index 000..fd64fe5
--- /dev/null
+++ b/includes/forminputs/PF_LeafletInput.php
@@ -0,0 +1,88 @@
+https://unpkg.com/leaflet@1.1.0/dist/leaflet.js;
+   );
+   $styles = array(
+   "https://unpkg.com/leaflet@1.1.0/dist/leaflet.css;
+   );
+   $scriptsHTML = '';
+   $stylesHTML = '';
+   foreach ( $scripts as $script ) {
+   $scriptsHTML .= Html::linkedScript( $script );
+   }
+   foreach ( $styles as $style ) {
+   $stylesHTML .= Html::linkedStyle( $style );
+   }
+   $wgOut->addHeadItem( $scriptsHTML, $scriptsHTML );
+   $wgOut->addHeadItem( $stylesHTML, $stylesHTML );
+   $wgOut->addModules( 'ext.pageforms.maps' );
+
+   $coordsInputAttrs = array(
+   'type' => 'text',
+   'tabindex' => $wgPageFormsTabIndex,
+   'class' => 'pfCoordsInput',
+   'name' => $input_name,
+   'value' => PFOpenLayersInput::parseCoordinatesString( 
$cur_value ),
+   'size' => 40
+   );
+   $coordsInput = Html::element( 'input', $coordsInputAttrs );
+   //$wgPageFormsTabIndex++;
+   $height = self::getHeight( $other_args );
+   $width = self::getWidth( $other_args );
+   $mapCanvas = Html::element( 'div', array( 'class' => 
'pfMapCanvas', 'style' => "height: $height; width: $width;" ), 'Map goes 
here...' );
+
+   $fullInputHTML = <<
+$coordsInput
+
+$mapCanvas
+
+END;
+   $text = 

[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Allow selecting exact number of trees for training

2017-09-11 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377343 )

Change subject: Allow selecting exact number of trees for training
..

Allow selecting exact number of trees for training

The idea to base the number of trees off node evaluations, rather
than some explicit number of trees, seems to abstract. Lets just
allow explicitly setting the exact number of trees to use.

Change-Id: Ie5a50865244af91e082d8acb04596d12dfbe3f0a
---
M mjolnir/cli/training_pipeline.py
M mjolnir/training/xgboost.py
2 files changed, 28 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/43/377343/1

diff --git a/mjolnir/cli/training_pipeline.py b/mjolnir/cli/training_pipeline.py
index 32d25cd..7425e87 100644
--- a/mjolnir/cli/training_pipeline.py
+++ b/mjolnir/cli/training_pipeline.py
@@ -20,7 +20,7 @@
 from pyspark.sql import functions as F
 
 
-def main(sc, sqlContext, input_dir, output_dir, wikis, target_node_evaluations,
+def main(sc, sqlContext, input_dir, output_dir, wikis, initial_num_trees, 
final_num_trees,
  num_workers, num_cv_jobs, num_folds, test_dir, zero_features):
 
 if os.path.exists(output_dir):
@@ -48,12 +48,11 @@
 df_hits_with_features = mjolnir.feature_engineering.zero_features(
 df_hits_with_features, zero_features)
 
-# Explore a hyperparameter space. Skip the most expensive part of 
tuning,
-# increasing the # of trees, with target_node_evaluations=None
 tune_results = mjolnir.training.xgboost.tune(
 df_hits_with_features, num_folds=num_folds,
 num_cv_jobs=num_cv_jobs, num_workers=num_workers,
-target_node_evaluations=target_node_evaluations)
+initial_num_trees=initial_num_trees,
+final_num_trees=final_num_trees)
 
 print 'CV  test-ndcg@10: %.4f' % (tune_results['metrics']['cv-test'])
 print 'CV train-ndcg@10: %.4f' % (tune_results['metrics']['cv-train'])
@@ -131,11 +130,12 @@
 '-f', '--folds', dest='num_folds', default=5, type=int,
 help='Number of cross validation folds to use. (Default: 5)')
 parser.add_argument(
-'-n', '--node-evaluations', dest='target_node_evaluations', type=int, 
default=None,
-help='Approximate number of node evaluations per predication that '
- + 'the final result will require. This controls the number of '
- + 'trees used in the final result. Default uses 100 trees rather '
- + 'than dynamically choosing based on max_depth. (Default: None)')
+'--initial-trees', dest='initial_num_trees', default=100, type=int,
+help='Number of trees to perform hyperparamter tuning with.  (Default: 
100)')
+parser.add_argument(
+'--final-trees', dest='final_num_trees', default=None, type=int,
+help='Number of trees in the final ensemble. If not provided the value 
from '
+ + '--initial-trees will be used.  (Default: None)')
 parser.add_argument(
 '-t', '--test-path', dest='test_dir', type=str, required=False, 
default=None,
 help='A holdout test set to evaluate the final model against')
diff --git a/mjolnir/training/xgboost.py b/mjolnir/training/xgboost.py
index dd20135..c010fb0 100644
--- a/mjolnir/training/xgboost.py
+++ b/mjolnir/training/xgboost.py
@@ -403,7 +403,7 @@
 return eta_pred[idx]
 
 
-def tune(df, num_folds=5, num_cv_jobs=5, num_workers=5, 
target_node_evaluations=5000):
+def tune(df, num_folds=5, num_cv_jobs=5, num_workers=5, initial_num_trees=100, 
final_num_trees=500):
 """Find appropriate hyperparameters for training df
 
 This is far from perfect, hyperparameter tuning is a bit of a black art
@@ -432,13 +432,14 @@
 number of executors used will be (num_cv_jobs * num_workers). Generally
 prefer executors with more cpu's over a higher number of workers where
 possible. (Default: 5)
-target_node_evaluations : int, optional
-The approximate number of node evaluations per prediction that the
-final result will require. This controls the number of trees used in
-the final result. The number of trees will be (target_node_evaluations
-/ optimal_max_depth). This is by far the most expensive part to tune,
-setting to None skips this and uses a constant 100 trees.
-(Default: 5000)
+initial_num_trees: int, optional
+The number of trees to do most of the hyperparameter tuning with. This
+should be large enough to be resonably representative of the final
+training size. (Default: 100)
+final_num_trees: int, optional
+The number of trees to do the final eta optimization with. If set to
+None the final eta optimization will be skipped and initial_n_tree will
+be kept.
 
 Returns
 ---
@@ -482,7 +483,7 @@
 

[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Setup tuning profiles for different size datasets

2017-09-11 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377344 )

Change subject: Setup tuning profiles for different size datasets
..

Setup tuning profiles for different size datasets

The appropriate hyperparameter space to search depends both
on the distribution of data in the dataset being trained against,
as well as the size of the dataset itself. For example a depth of 10
makes no sense when training a model with only 200k observations.

Setup some profiles based on size and set their parameters based on
the recent round of training models for 20 different wikis.

Change-Id: I1f2fe53f1080a6af1c7d71cb1d6d27693bd131a4
---
M mjolnir/training/xgboost.py
1 file changed, 87 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/44/377344/1

diff --git a/mjolnir/training/xgboost.py b/mjolnir/training/xgboost.py
index c010fb0..b1a799c 100644
--- a/mjolnir/training/xgboost.py
+++ b/mjolnir/training/xgboost.py
@@ -478,26 +478,96 @@
 print 'best %s: %f' % (k, best[k])
 return best, trials
 
+num_obs = df.count()
+
+if num_obs > 800:
+dataset_size = 'xlarge'
+elif num_obs > 100:
+dataset_size = 'large'
+elif num_obs > 50:
+dataset_size = 'med'
+else:
+dataset_size = 'small'
+
+# Setup different tuning profiles for different sizes of datasets.
+tune_space = {
+'xlarge': {
+# This is intentionally a numpy space for grid search, as xlarge
+# datasets get slightly different handling here.
+'eta': np.linspace(0.3, 0.8, 30),
+# Have seen values of 7 and 10 as best on roughly same size
+# datasets from different wikis. It really just depends.
+'max_depth': hyperopt.hp.quniform('max_depth', 6, 11, 1),
+'min_child_weight': hyperopt.hp.qloguniform(
+'min_child_weight', np.log(10), np.log(500), 10),
+},
+'large': {
+'eta': hyperopt.hp.uniform('eta', 0.3, 0.6),
+'max_depth': hyperopt.hp.quniform('max_depth', 5, 9, 1),
+'min_child_weight': hyperopt.hp.qloguniform(
+'min_child_weight', np.log(10), np.log(300), 10),
+},
+'med': {
+'eta': hyperopt.hp.uniform('eta', 0.1, 0.6),
+'max_depth': hyperopt.hp.quniform('max_depth', 4, 7, 1),
+'min_child_weight': hyperopt.hp.qloguniform(
+'min_child_weight', np.log(10), np.log(300), 10),
+},
+'small': {
+'eta': hyperopt.hp.uniform('eta', 0.1, 0.4),
+'max_depth': hyperopt.hp.quniform('max_depth', 3, 6, 1),
+'min_child_weight': hyperopt.hp.qloguniform(
+'min_child_weight', np.log(10), np.log(100), 10),
+}
+}
+
 # Baseline parameters to start with. Roughly tuned by what has worked in
-# the past. These vary though depending on number of training samples
+# the past. These vary though depending on number of training samples. 
These
+# defaults are for the smallest of wikis, which are then overridden for 
larger
+# wikis
 space = {
 'objective': 'rank:ndcg',
 'eval_metric': 'ndcg@10',
 'num_rounds': initial_num_trees,
 'min_child_weight': 200,
-'max_depth': 6,
+'max_depth': 4,
 'gamma': 0,
 'subsample': 1.0,
 'colsample_bytree': 0.8,
 }
 
+# Overrides for the first round of training when tuning eta.
+space_overrides = {
+'xlarge': {
+'max_depth': 7,
+},
+'large': {
+'max_depth': 6,
+},
+'med': {
+'max_depth': 5,
+},
+'small': {}
+}
+
+for k, v in space_overrides[dataset_size].items():
+space[k] = v
+
 # Find an eta that gives good results with only 100 trees. This is done
 # so most of the tuning is relatively quick. A final step will re-tune
 # eta with more trees.
-etas = np.linspace(0.3, 0.7, 30)
-space['eta'] = hyperopt.hp.choice('eta', etas)
-best_eta, trials_eta = eval_space_grid(space)
-space['eta'] = _estimate_best_eta(trials_eta, etas)
+# This estimate only seems to work well for xlarge datasets. On smaller
+# datasets the shape of the graph is much less consistent and doesn't
+# match the builtin expectation of an L shaped graph.
+if dataset_size == 'xlarge':
+etas = tune_space[dataset_size]['eta']
+space['eta'] = hyperopt.hp.choice('eta', etas)
+best_eta, trials_eta = eval_space_grid(space)
+space['eta'] = _estimate_best_eta(trials_eta, etas)
+else:
+space['eta'] = tune_space[dataset_size]['eta']
+best_eta, trials_eta = eval_space(space, 50)
+space['eta'] = best_eta['eta']
 pprint.pprint(space)
 
 # 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Dev: Add setting to suppress notification polling

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377324 )

Change subject: Dev: Add setting to suppress notification polling
..


Dev: Add setting to suppress notification polling

Useful for reducing noise when debugging network requests

Change-Id: If590383ec543dd869fe5cb692aaf077205dfc163
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/res/values/preference_keys.xml
M app/src/main/res/xml/developer_preferences.xml
4 files changed, 13 insertions(+), 1 deletion(-)

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



diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index 2c181e3..197a50f 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -480,7 +480,9 @@
 }
 
 public void listenForNotifications() {
-notificationReceiver.startPollTask(this);
+if (!Prefs.suppressNotificationPolling()) {
+notificationReceiver.startPollTask(this);
+}
 }
 
 private void initAppLang() {
diff --git a/app/src/main/java/org/wikipedia/settings/Prefs.java 
b/app/src/main/java/org/wikipedia/settings/Prefs.java
index 9995ef1..28f0a5e 100644
--- a/app/src/main/java/org/wikipedia/settings/Prefs.java
+++ b/app/src/main/java/org/wikipedia/settings/Prefs.java
@@ -577,5 +577,9 @@
 setBoolean(R.string.preference_key_dim_dark_mode_images, enabled);
 }
 
+public static boolean suppressNotificationPolling() {
+return 
getBoolean(R.string.preference_key_suppress_notification_polling, false);
+}
+
 private Prefs() { }
 }
diff --git a/app/src/main/res/values/preference_keys.xml 
b/app/src/main/res/values/preference_keys.xml
index 235f132..6bef172 100644
--- a/app/src/main/res/values/preference_keys.xml
+++ b/app/src/main/res/values/preference_keys.xml
@@ -62,4 +62,5 @@
 offlineOnboardingCardEnabled
 offlineOnboardingEnabled
 dimDarkModeImages
+suppressNotificationPolling
 
diff --git a/app/src/main/res/xml/developer_preferences.xml 
b/app/src/main/res/xml/developer_preferences.xml
index ef6eaed..88af7e3 100644
--- a/app/src/main/res/xml/developer_preferences.xml
+++ b/app/src/main/res/xml/developer_preferences.xml
@@ -79,6 +79,11 @@
 
 
 
+
+
 https://gerrit.wikimedia.org/r/377324
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If590383ec543dd869fe5cb692aaf077205dfc163
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Cooltey 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Sharvaniharan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix interpretation of 'prioritized'

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376644 )

Change subject: Fix interpretation of 'prioritized'
..


Fix interpretation of 'prioritized'

Docs (especially in EventPresentationModel.php) say true means outside
the menu, false inside.

However, it was interpreting any non-undefined value as true.

Change-Id: Icb438538e5c588c1ac7d4bbac0b762dd07057199
---
M modules/ui/mw.echo.ui.NotificationItemWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)

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

Objections:
  Mattflaschen: There's a problem with this change, please improve



diff --git a/modules/ui/mw.echo.ui.NotificationItemWidget.js 
b/modules/ui/mw.echo.ui.NotificationItemWidget.js
index 475b695..9dbebae 100644
--- a/modules/ui/mw.echo.ui.NotificationItemWidget.js
+++ b/modules/ui/mw.echo.ui.NotificationItemWidget.js
@@ -130,7 +130,7 @@
// prioritized explicitly, *except* for items inside a 
bundle
// (where all actions are inside the menu) or there are 
more than
// two prioritized actions (all others go into the menu)
-   isOutsideMenu = !this.bundle && urlObj.prioritized !== 
undefined && outsideMenuItemCounter < mw.echo.config.maxPrioritizedActions;
+   isOutsideMenu = !this.bundle && urlObj.prioritized && 
outsideMenuItemCounter < mw.echo.config.maxPrioritizedActions;
 
linkButton = new mw.echo.ui.MenuItemWidget( {
type: urlObj.type,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb438538e5c588c1ac7d4bbac0b762dd07057199
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Avoid using deprecated ParserCache::singleton()

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376856 )

Change subject: Avoid using deprecated ParserCache::singleton()
..


Avoid using deprecated ParserCache::singleton()

It was deprecated in 1.30.

Change-Id: I5bdb91e4f4fa57369177ffe61d9a8743e1d81346
---
M ApiVisualEditor.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index f508f10..1fee911 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -480,7 +480,7 @@
if ( $params['paction'] !== 'wikitext' ) {
$wikipage = WikiPage::factory( $title );
$popts = $wikipage->makeParserOptions( 
'canonical' );
-   $cached = 
ParserCache::singleton()->get( $article, $popts, true );
+   $cached = 
MediaWikiServices::getInstance()->getParserCache()->get( $article, $popts, true 
);
$links = [
// Array of linked pages that 
are missing
'missing' => [],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bdb91e4f4fa57369177ffe61d9a8743e1d81346
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] operations/puppet[production]: adding documentation on renaming users

2017-09-11 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/377342 )

Change subject: adding documentation on renaming users
..


adding documentation on renaming users

renaming users is possible, but has some steps, detailing them in the
readme so they are followed.

Change-Id: I2c64faeff9bf56e4cc6ad619dabcc9e894fb8f72
---
M modules/admin/README
1 file changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/modules/admin/README b/modules/admin/README
index e05515b..89388c9 100644
--- a/modules/admin/README
+++ b/modules/admin/README
@@ -205,6 +205,23 @@
 #* Groups with no members get root by default
 #* admin::user and admin::group are not dependent on yaml
 
+Renaming Users:
+
+https://wikitech.wikimedia.org/wiki/Ops_Clinic_Duty#Renaming_shell_users
+
+Sometimes we have to rename a shell user.  This is typically when their shell 
name doesn't
+match their login name, and they have issues logging into items requiring LDAP 
credentials
+
+Private data that isn't allowed to be copied off the cluster should not be 
backed up to 
+laptops.  So we need to move user home data for the user.
+
+* Patchset is prepared, but not merged.
+* All affected hosts have puppet halted.
+* Affected hosts should have the user (to be replaced) deleted.  
+** DO NOT DELETE THE USER'S HOME DIRECTORY.
+* Merge patchset with username change (UID remains the same).
+* Run puppet on affected hosts, and they will create the new user (using the 
same UID.)
+* Batch move the contents of the old user home into the new user home.
 
 Rarely used feature (USE WITH CARE AND CAUTION):
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c64faeff9bf56e4cc6ad619dabcc9e894fb8f72
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Take out gray background behind indenting bullet in syntax h...

2017-09-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/353507 )

Change subject: Take out gray background behind indenting bullet in syntax 
highlighting
..


Take out gray background behind indenting bullet in syntax highlighting

Bug: T165001
Change-Id: I51576f46a8d204784755ef645bb5daf1930fe74e
---
M resources/mode/mediawiki/mediawiki.css
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/mode/mediawiki/mediawiki.css 
b/resources/mode/mediawiki/mediawiki.css
index 2d5ae47..49d8016 100644
--- a/resources/mode/mediawiki/mediawiki.css
+++ b/resources/mode/mediawiki/mediawiki.css
@@ -9,7 +9,7 @@
 .cm-mw-skipformatting { background-color: #adf; }
 .cm-mw-list { color: #08f; font-weight: bold; }
 .cm-mw-signature, .cm-mw-hr { color: #08f; font-weight: bold; 
background-color: #eee; }
-.cm-mw-indenting { color: #08f; font-weight: bold; background-color: #ddd; }
+.cm-mw-indenting { color: #08f; font-weight: bold; }
 .cm-mw-mnemonic { color: #290; }
 .cm-mw-comment { color: #aaa; font-weight: normal; }
 .cm-mw-apostrophes-bold, .cm-mw-apostrophes-italic { color: #08f; }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51576f46a8d204784755ef645bb5daf1930fe74e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: adding documentation on renaming users

2017-09-11 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377342 )

Change subject: adding documentation on renaming users
..

adding documentation on renaming users

renaming users is possible, but has some steps, detailing them in the
readme so they are followed.

Change-Id: I2c64faeff9bf56e4cc6ad619dabcc9e894fb8f72
---
M modules/admin/README
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/377342/1

diff --git a/modules/admin/README b/modules/admin/README
index e05515b..89388c9 100644
--- a/modules/admin/README
+++ b/modules/admin/README
@@ -205,6 +205,23 @@
 #* Groups with no members get root by default
 #* admin::user and admin::group are not dependent on yaml
 
+Renaming Users:
+
+https://wikitech.wikimedia.org/wiki/Ops_Clinic_Duty#Renaming_shell_users
+
+Sometimes we have to rename a shell user.  This is typically when their shell 
name doesn't
+match their login name, and they have issues logging into items requiring LDAP 
credentials
+
+Private data that isn't allowed to be copied off the cluster should not be 
backed up to 
+laptops.  So we need to move user home data for the user.
+
+* Patchset is prepared, but not merged.
+* All affected hosts have puppet halted.
+* Affected hosts should have the user (to be replaced) deleted.  
+** DO NOT DELETE THE USER'S HOME DIRECTORY.
+* Merge patchset with username change (UID remains the same).
+* Run puppet on affected hosts, and they will create the new user (using the 
same UID.)
+* Batch move the contents of the old user home into the new user home.
 
 Rarely used feature (USE WITH CARE AND CAUTION):
 

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

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

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


  1   2   3   4   5   >