[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add tabindex to Special:Upload in mw-editTools

2017-12-07 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395999 )

Change subject: Add tabindex to Special:Upload in mw-editTools
..

Add tabindex to Special:Upload in mw-editTools

Bug: T25238
Change-Id: I2b581667aaf0f95c9c0f189f5bf5e852c12fd3cd
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
1 file changed, 36 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/395999/1

diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 0ddf7fe..f487976 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -612,4 +612,40 @@
allowCloseWindow.release();
} );
} );
+
+   // Add tabindex to mw-editTools
+   $( function () {
+   // Function to change tabindex for all links within mw-editTools
+   function setEditTabindex( $val ) {
+   $( '.mw-editTools' ).find( 'a' ).each( function () {
+   $( this ).attr( 'tabindex', $val );
+   } );
+   }
+
+   // Change tabindex to 0 if user pressed spaced or enter while 
focused
+   $( '.mw-editTools' ).on( 'keypress', function (e) {
+   // Don't continue if pressed key was not enter or 
spacebar
+   if ( e.which !== 13 && e.which !== 32 )
+   return;
+
+   // Change tabindex only when element has focus
+   if ( $( this ).focus )
+   setEditTabindex( '0' );
+   } );
+
+   // Reset tabindex for elements when user focused out 
mw-editTools
+   $( '.mw-editTools' ).on( 'focusout', function (e) {
+   // Check if user lost target focus
+   if ( e.relatedTarget === null )
+   setEditTabindex( '-1' );
+
+   // Check if relatedTarget is not inside mw-editTools
+   else if ( $( e.relatedTarget ).closest( '.mw-editTools' 
).length === 0)
+   setEditTabindex( '-1' );
+   } );
+
+   // Set initial tabindex for mw-editTools to 0 and to -1 for all 
links
+   $( '.mw-editTools' ).attr( 'tabindex', '0' );
+   setEditTabindex( '-1' );
+   } );
 }( mediaWiki, jQuery ) );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Replace instances of rawParams() to plaintextParams()

2017-12-08 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396548 )

Change subject: Replace instances of rawParams() to plaintextParams()
..

Replace instances of rawParams() to plaintextParams()

Bug: T180987
Change-Id: Ia646e1d051fb4f778cb27083e5e165bb76e21b58
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/48/396548/1

diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 1fce661..21d6bdf 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -149,7 +149,7 @@
Title::makeTitleSafe( NS_NEWSLETTER, 
$this->newsletter->getName() ),
$this->getName()
) . ' ' . $this->msg( 'parentheses' )
-   ->rawParams( $this->getLanguage()->pipeList( $links ) )
+   ->plaintextParams( $this->getLanguage()->pipeList( 
$links ) )
->text();
 
return $this->getLanguage()->pipeList( [ $listLink, 
$newsletterLinks ] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia646e1d051fb4f778cb27083e5e165bb76e21b58
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Replace assertRaises with assertRaisesRegex in category_test...

2017-12-09 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396576 )

Change subject: Replace assertRaises with assertRaisesRegex in category_tests.py
..

Replace assertRaises with assertRaisesRegex in category_tests.py

assertRaises is not as good of a test as asserRaisesRegex.
The latter has an extra parameter to match the exception message,
allowing more more precision when checking an error.

Bug: T154281
Change-Id: Ia941decd329640a4e043208b52e5ce581b2bf0c0
---
M tests/category_tests.py
1 file changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/76/396576/1

diff --git a/tests/category_tests.py b/tests/category_tests.py
index e4b4ba1..d9bb18c 100644
--- a/tests/category_tests.py
+++ b/tests/category_tests.py
@@ -17,6 +17,9 @@
 
 """Test Category object."""
 
+NOCATEGORYNAMESPACE_RE = '\'(.*?)\' is not in the category namespace!'
+NOREDIRECTPAGE_RE = 'Page \[\[(.*?)\]\] is not a redirect page.'
+
 family = 'wikipedia'
 code = 'en'
 
@@ -25,7 +28,8 @@
 def test_init(self):
 """Test the category's __init__ for one condition that can't be dry."""
 site = self.get_site()
-self.assertRaises(ValueError, pywikibot.Category, site, 
'Wikipedia:Test')
+self.assertRaisesRegex(ValueError, self.NOCATEGORYNAMESPACE_RE,
+pywikibot.Category, site, 'Wikipedia:Test')
 
 def test_is_empty(self):
 """Test if category is empty or not."""
@@ -146,13 +150,15 @@
 self.assertEqual(tgt, cat2)
 
 # Raise exception if target is fetched for non Category redirects.
-self.assertRaises(pywikibot.IsNotRedirectPage,
-  cat2.getCategoryRedirectTarget)
+self.assertRaisesRegex(pywikibot.IsNotRedirectPage,
+self.NOREDIRECTPAGE_RE, cat2.getCategoryRedirectTarget)
 
 
 class TestCategoryDryObject(TestCase):
 
 """Test the category object with dry tests."""
+
+NOCATEGORYNAMESPACE_RE = '\'(.*?)\' is not in the category namespace!'
 
 family = 'wikipedia'
 code = 'en'
@@ -178,7 +184,8 @@
 self.assertTrue(cat_dup_ns.title(withNamespace=False), 'Page:Foo')
 self.assertTrue(cat_dup_ns.namespace(), 14)
 
-self.assertRaises(ValueError, pywikibot.Category, site, 'Talk:Foo')
+self.assertRaisesRegex(ValueError, self.NOCATEGORYNAMESPACE_RE,
+pywikibot.Category, site, 'Talk:Foo')
 
 def test_section(self):
 """Test the section method."""

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Replace assertRaises with assertRaisesRegex in namespace_tes...

2017-12-09 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396589 )

Change subject: Replace assertRaises with assertRaisesRegex in 
namespace_tests.py
..

Replace assertRaises with assertRaisesRegex in namespace_tests.py

assertRaises is not as good of a test as asserRaisesRegex.
The latter has an extra parameter to match the exception message,
allowing more more precision when checking an error.

Bug: T154281
Change-Id: Ie6d334b2225cde1b2c4380b5e62b9860ba42a2fc
---
M tests/namespace_tests.py
1 file changed, 38 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/89/396589/1

diff --git a/tests/namespace_tests.py b/tests/namespace_tests.py
index 9897f03..0a293ad 100644
--- a/tests/namespace_tests.py
+++ b/tests/namespace_tests.py
@@ -229,6 +229,10 @@
 
 """Test static/classmethods in Namespace replaced by NamespacesDict."""
 
+CONTAINSINAPPROPRIATE_RE = 'identifiers contains inappropriate types: 
(.*?)'
+INTARGNOTSTRINGORNUMBER_RE = 'int\(\) argument must be a string or a 
number, not \'(.*?)\''
+NAMESPACEIDNOTRECOGNISED_RE = 'Namespace identifier\(s\) not recognised: 
(.*?)'
+
 net = False
 
 def test_resolve_equal(self):
@@ -269,26 +273,33 @@
 
 def test_resolve_exceptions(self):
 """Test Namespace.resolve failure."""
-self.assertRaises(TypeError, Namespace.resolve, [True])
-self.assertRaises(TypeError, Namespace.resolve, [False])
-self.assertRaises(TypeError, Namespace.resolve, [None])
-self.assertRaises(TypeError, Namespace.resolve, True)
-self.assertRaises(TypeError, Namespace.resolve, False)
-self.assertRaises(TypeError, Namespace.resolve, None)
+self.assertRaisesRegex(TypeError, self.CONTAINSINAPPROPRIATE_RE,
+   Namespace.resolve, [True])
+self.assertRaisesRegex(TypeError, self.CONTAINSINAPPROPRIATE_RE,
+   Namespace.resolve, [False])
+self.assertRaisesRegex(TypeError, self.INTARGNOTSTRINGORNUMBER_RE,
+   Namespace.resolve, [None])
+self.assertRaisesRegex(TypeError, self.CONTAINSINAPPROPRIATE_RE,
+   Namespace.resolve, True)
+self.assertRaisesRegex(TypeError, self.CONTAINSINAPPROPRIATE_RE,
+   Namespace.resolve, False)
+self.assertRaisesRegex(TypeError, self.INTARGNOTSTRINGORNUMBER_RE,
+   Namespace.resolve, None)
 
-self.assertRaises(KeyError, Namespace.resolve, -10)
-self.assertRaises(KeyError, Namespace.resolve, '-10')
-self.assertRaises(KeyError, Namespace.resolve, 'foo')
-self.assertRaises(KeyError, Namespace.resolve, ['foo'])
+self.assertRaisesRegex(KeyError, self.NAMESPACEIDNOTRECOGNISED_RE,
+   Namespace.resolve, -10)
+self.assertRaisesRegex(KeyError, self.NAMESPACEIDNOTRECOGNISED_RE,
+   Namespace.resolve, '-10')
+self.assertRaisesRegex(KeyError, self.NAMESPACEIDNOTRECOGNISED_RE,
+   Namespace.resolve, 'foo')
+self.assertRaisesRegex(KeyError, self.NAMESPACEIDNOTRECOGNISED_RE,
+   Namespace.resolve, ['foo'])
 
-self.assertRaisesRegex(KeyError,
-   r'Namespace identifier\(s\) not recognised: 
-10',
+self.assertRaisesRegex(KeyError, self.NAMESPACEIDNOTRECOGNISED_RE,
Namespace.resolve, [-10, 0])
-self.assertRaisesRegex(KeyError,
-   r'Namespace identifier\(s\) not recognised: 
foo',
+self.assertRaisesRegex(KeyError, self.NAMESPACEIDNOTRECOGNISED_RE,
Namespace.resolve, [0, 'foo'])
-self.assertRaisesRegex(KeyError,
-   r'Namespace identifier\(s\) not recognised: 
-10,-11',
+self.assertRaisesRegex(KeyError, self.NAMESPACEIDNOTRECOGNISED_RE,
Namespace.resolve, [-10, 0, -11])
 
 def test_lookup_name(self):
@@ -366,6 +377,9 @@
 
 """Test NamespacesDict.__getitem__."""
 
+VALIDNUMBER_RE = '-?(0|[1-9]\d*)'
+EMPTYTEXT_RE = '\s*'
+
 net = False
 
 def test_ids(self):
@@ -385,8 +399,10 @@
 namespaces = builtin_NamespacesDict()
 lower = min(namespaces.keys()) - 1
 higher = max(namespaces.keys()) + 1
-self.assertRaises(KeyError, namespaces.__getitem__, lower)
-self.assertRaises(KeyError, namespaces.__getitem__, higher)
+self.assertRaisesRegex(KeyError, self.VALIDNUMBER_RE,
+   namespaces.__getitem__, lower)
+self.assertRaisesRegex(KeyError, self.VALIDNUMBER_RE,
+   namespaces.__getitem__, higher)
 
 def test_canonical_name(self):

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix regex in namespace_tests.py for py3.4+

2017-12-10 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396930 )

Change subject: Fix regex in namespace_tests.py for py3.4+
..

Fix regex in namespace_tests.py for py3.4+

Bug: T182527
Change-Id: I1187bdb8ad396d97b07e84458828c3287f523764
---
M tests/namespace_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/30/396930/1

diff --git a/tests/namespace_tests.py b/tests/namespace_tests.py
index d88bf5f..23a71e0 100644
--- a/tests/namespace_tests.py
+++ b/tests/namespace_tests.py
@@ -233,7 +233,7 @@
 r'identifiers contains inappropriate types: (.*?)'
 )
 INTARGNOTSTRINGORNUMBER_RE = (
-r"int\(\) argument must be a string or a number, not '(.*?)'"
+r"int\(\) argument must be a string(, a bytes-like object)? or a 
number, not '(.*?)'"
 )
 NAMESPACEIDNOTRECOGNISED_RE = (
 r'Namespace identifier\(s\) not recognised: (.*?)'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MassAction[master]: Internationalize hardcoded strings from New Task

2017-12-11 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/397595 )

Change subject: Internationalize hardcoded strings from New Task
..

Internationalize hardcoded strings from New Task

Bug: T96418
Change-Id: I40c42f76f8f4060be1d974a3586301bec94b9b63
---
M i18n/en.json
M i18n/qqq.json
M src/MassActionSpecialPage.php
3 files changed, 18 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassAction 
refs/changes/95/397595/1

diff --git a/i18n/en.json b/i18n/en.json
index 1d7a682..38cb06c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,7 +1,8 @@
 {
"@metadata": {
"authors": [
-   "Addshore"
+   "Addshore",
+   "Divadsn"
]
},
"massaction": "Mass action interface",
@@ -11,6 +12,7 @@
"massaction-newtask": "New task",
"massaction-viewtask": "View task",
"massaction-registeredtask": "Task registered and job queued!",
+   "massaction-title": "Mass Action",
"massactionsavechange": "Save change",
"specialpages-group-MassAction": "MassAction",
"log-name-massaction": "MassAction",
@@ -45,5 +47,8 @@
"massaction-view-task-target-identifier": "Identifier",
"massaction-view-task-target-name": "Name",
"massaction-view-task-target-state": "State",
-   "massaction-view-task-target-save": "Save"
+   "massaction-view-task-target-save": "Save",
+   "massaction-new-task-title": "New $1 task",
+   "massaction-new-task-select-title": "New Task - Select Target",
+   "massaction-new-task-submit-title": "New Task - Submit"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 04810a4..58d622a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -3,7 +3,8 @@
"authors": [
"Liuxinyu970226",
"Robby",
-   "Umherirrender"
+   "Umherirrender",
+   "Divadsn"
]
},
"massaction": "Main special page title",
@@ -13,6 +14,7 @@
"massaction-newtask": "New Task special page title",
"massaction-viewtask": "View Task special page title",
"massaction-registeredtask": "Message for when a task has been 
registered and the corresponding job has been added to the queue for later 
completion",
+   "massaction-title": "Title for default page",
"massactionsavechange": "Save Change special page 
title\n{{Identical|Save changes}}",
"specialpages-group-MassAction": "MassAction special page 
group\n{{doc-special-group}}",
"log-name-massaction": "Name for the MassAction log type",
@@ -47,5 +49,8 @@
"massaction-view-task-target-identifier": "Text that shows in table 
heading for target identifier",
"massaction-view-task-target-name": "Text that shows in table heading 
for target name\n{{Identical|Name}}",
"massaction-view-task-target-state": "Text that shows in table heading 
for target state",
-   "massaction-view-task-target-save": "Text that shows in submit button 
for saving target changes\n{{Identical|Save}}"
+   "massaction-view-task-target-save": "Text that shows in submit button 
for saving target changes\n{{Identical|Save}}",
+   "massaction-new-task-title": "Title for page to create a new task. 
Parameters:\n* $1 - task target",
+   "massaction-new-task-select-title": "Title for page to select task 
target",
+   "massaction-new-task-submit-title": "Title for page to submit new task"
 }
diff --git a/src/MassActionSpecialPage.php b/src/MassActionSpecialPage.php
index 51e650d..f33b2a2 100644
--- a/src/MassActionSpecialPage.php
+++ b/src/MassActionSpecialPage.php
@@ -75,7 +75,7 @@
}
 
private function executeDefault() {
-   $this->getOutput()->setPageTitle( 'Mass Action' );
+   $this->getOutput()->setPageTitle( wfMessage( 'massaction-title' 
) );
$html = '';
$html .= Linker::specialLink( 'MassAction/New', 
'massaction-newtask' );
$html .= Html::element( 'br' );
@@ -306,7 +306,7 @@
}
 
private function executeSelectTargetForm() {
-   $this->getOutput()->setPageTitle( 'New Task - Select Target' );
+   $this->getOutput()->setPageTitle( wfMessage( 
'massaction-new-task-select-title' ) );
 
$html = '';
$html .= Html::openElement( 'ul' );
@@ -331,7 +331,7 @@
 * @throws Exception
 */
private function executeTaskOptionsForm( $target ) {
-   $this->getOutput()->setPageTitle( 'New ' . $target . ' Task' );
+   $this->getOutput()->setPageTitle( wfMessage( 
'massaction-new-task-title', $target ) );
$this->getOutput()->addModules( 
'ext.MassAction.SpecialMassAction.Ne

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Fix inconsistent descriptions in interface for creating and ...

2017-12-01 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394635 )

Change subject: Fix inconsistent descriptions in interface for creating and 
unsubscribing
..

Fix inconsistent descriptions in interface for creating and unsubscribing

The description of what users are looking at was inconsistent.
We should use the former "page", as it's more common of a word and sounds
less technical than "interface", which was suggested by Ckoerner.

Bug: T180987
Change-Id: I29371c7e828d3335581f3922383afb55d7cabf9a
---
M i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/35/394635/1

diff --git a/i18n/en.json b/i18n/en.json
index fbd57e8..35df6a4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -76,13 +76,13 @@
"newsletter-delete-failure": "\"$1\" newsletter could not be deleted. 
Please try again.",
"newsletter-delete-log": "Newsletter \"$1\" has been deleted.",
"newsletter-subscribe": "Newsletter subscription management",
-   "newsletter-subscribe-text": "This interface allows you to subscribe to 
\"$1\" newsletter. If you subscribe, you will receive notifications when new 
issues of this newsletter are announced.",
+   "newsletter-subscribe-text": "This page allows you to subscribe to 
\"$1\" newsletter. If you subscribe, you will receive notifications when new 
issues of this newsletter are announced.",
"newsletter-do-subscribe": "Subscribe to this newsletter",
"newsletter-subscribe-success": "You have subscribed to \"$1\".",
"newsletter-subscribe-fail": "Could not subscribe to \"$1\" newsletter 
as you are already subscribed to this newsletter.",
"newsletter-subscribe-error": "Error in subscribing to newsletter.",
"newsletter-subscribe-ip-notallowed": "Please login to subscribe to a 
newsletter.",
-   "newsletter-unsubscribe-text": "This interface allows you to 
unsubscribe from \"$1\" newsletter. If you unsubscribe, you will stop receiving 
notifications when new issues of this newsletter are announced.",
+   "newsletter-unsubscribe-text": "This page allows you to unsubscribe 
from \"$1\" newsletter. If you unsubscribe, you will stop receiving 
notifications when new issues of this newsletter are announced.",
"newsletter-do-unsubscribe": "Unsubscribe from this newsletter",
"newsletter-unsubscribe-success": "You are no longer a subscriber of 
\"$1\".",
"newsletter-unsubscribe-fail": "Could not unsubscribe from \"$1\" 
newsletter as you are not currently subscribed to this newsletter.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29371c7e828d3335581f3922383afb55d7cabf9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...translators[master]: Update translators to upstream HEAD 092c7bc

2017-12-01 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394730 )

Change subject: Update translators to upstream HEAD 092c7bc
..

Update translators to upstream HEAD 092c7bc

Bug: T178596
Change-Id: I2e9ebe7d461f4d61a4dcc8cb4c9d69a29d24946e
---
M ACM Digital Library.js
M AMS MathSciNet.js
M Alexander Street Press.js
A Antikvarium.hu.js
M Atypon Journals.js
M Bibliotheque et Archives Nationale du Quebec (Pistard).js
M Bibliotheque et Archives Nationales du Quebec.js
M CSV.js
M Cairn.info.js
M Eastview.js
M Embedded Metadata.js
M Evernote.js
A FAO Publications.js
M FAZ.NET.js
M Fachportal Padagogik.js
M Gemeinsamer Bibliotheksverbund ISBN.js
M Google Scholar.js
M Hathi Trust.js
M IEEE Xplore.js
M Inter-Research Science Center.js
M JSTOR.js
M Jahrbuch.js
M KitapYurdu.com.js
M Library Catalog (Encore).js
M Library Catalog (InnoPAC).js
M MARC.js
M MIT Press Journals.js
A Milli Kutuphane.js
M NYTimes.com.js
M National Archive of the UK.js
A Oxford Reference.js
A ProQuest Ebook Central.js
M Project MUSE.js
M PubMed Central.js
M RDF.js
M RIS.js
A ResearchGate.js
M ScienceDirect.js
M Springer Link.js
M TEI.js
M TV by the Numbers.js
M The Economist.js
M The New Yorker.js
A University of Wisconsin-Madison Libraries Catalog.js
M Unqualified Dublin Core RDF.js
M Wikipedia Citation Templates.js
M Zotero RDF.js
M zotero.org.js
48 files changed, 4,227 insertions(+), 1,655 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/zotero/translators 
refs/changes/30/394730/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e9ebe7d461f4d61a4dcc8cb4c9d69a29d24946e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/zotero/translators
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

___
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 converted copyright svg images as png files

2017-12-02 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394820 )

Change subject: Add converted copyright svg images as png files
..

Add converted copyright svg images as png files

This patch is necessary to fix wordmark support in IE8.

Bug: T166684
Change-Id: I5d4f34df0511ab5682fec3b4d792de7179b74768
---
A static/images/mobile/copyright/commons-wordmark-en.png
A static/images/mobile/copyright/wikipedia-wordmark-ar.png
A static/images/mobile/copyright/wikipedia-wordmark-atj.png
A static/images/mobile/copyright/wikipedia-wordmark-bn.png
A static/images/mobile/copyright/wikipedia-wordmark-ca.png
A static/images/mobile/copyright/wikipedia-wordmark-cy.png
A static/images/mobile/copyright/wikipedia-wordmark-en.png
A static/images/mobile/copyright/wikipedia-wordmark-fr.png
A static/images/mobile/copyright/wikipedia-wordmark-he.png
A static/images/mobile/copyright/wikipedia-wordmark-hi.png
A static/images/mobile/copyright/wikipedia-wordmark-ja.png
A static/images/mobile/copyright/wikipedia-wordmark-ru.png
A static/images/mobile/copyright/wikipedia-wordmark-sr.png
A static/images/mobile/copyright/wikipedia-wordmark-ur.png
A static/images/mobile/copyright/wikipedia-wordmark-zh-c.png
A static/images/mobile/copyright/wikitionary-wordmark-en.png
A static/images/mobile/copyright/wikivoyage-wordmark-en.png
17 files changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/static/images/mobile/copyright/commons-wordmark-en.png 
b/static/images/mobile/copyright/commons-wordmark-en.png
new file mode 100644
index 000..c76ce9e
--- /dev/null
+++ b/static/images/mobile/copyright/commons-wordmark-en.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-ar.png 
b/static/images/mobile/copyright/wikipedia-wordmark-ar.png
new file mode 100644
index 000..2dca169
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-ar.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-atj.png 
b/static/images/mobile/copyright/wikipedia-wordmark-atj.png
new file mode 100644
index 000..cbfc089
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-atj.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-bn.png 
b/static/images/mobile/copyright/wikipedia-wordmark-bn.png
new file mode 100644
index 000..6d7b114
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-bn.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-ca.png 
b/static/images/mobile/copyright/wikipedia-wordmark-ca.png
new file mode 100644
index 000..1d30259
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-ca.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-cy.png 
b/static/images/mobile/copyright/wikipedia-wordmark-cy.png
new file mode 100644
index 000..882905e
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-cy.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-en.png 
b/static/images/mobile/copyright/wikipedia-wordmark-en.png
new file mode 100644
index 000..e2f332a
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-en.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-fr.png 
b/static/images/mobile/copyright/wikipedia-wordmark-fr.png
new file mode 100644
index 000..431b5a0
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-fr.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-he.png 
b/static/images/mobile/copyright/wikipedia-wordmark-he.png
new file mode 100644
index 000..0b41fb6
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-he.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-hi.png 
b/static/images/mobile/copyright/wikipedia-wordmark-hi.png
new file mode 100644
index 000..b9cf93c
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-hi.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-ja.png 
b/static/images/mobile/copyright/wikipedia-wordmark-ja.png
new file mode 100644
index 000..1a67c67
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-ja.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-ru.png 
b/static/images/mobile/copyright/wikipedia-wordmark-ru.png
new file mode 100644
index 000..5320393
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-ru.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-sr.png 
b/static/images/mobile/copyright/wikipedia-wordmark-sr.png
new file mode 100644
index 000..d2337ac
--- /dev/null
++

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Use png as fallback when svg fails to load

2017-12-03 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394845 )

Change subject: Use png as fallback when svg fails to load
..

Use png as fallback when svg fails to load

This patch will add a error handler when the original copyright logo a svg 
image is.
Should fix the bug after merging change 394820.

Bug: T166684
Change-Id: I2337b750c80e79c816dc817dfe230e063eed0345
---
M includes/skins/SkinMinerva.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/45/394845/1

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 659ed5e..68d48a9 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -51,6 +51,9 @@
'src' => $customLogos['copyright'],
'alt' => $footerSitename,
];
+   if ( strtolower( pathinfo( $customLogos['copyright'], 
PATHINFO_EXTENSION ) ) === "svg" ) {
+   $attributes['onerror'] = 
"this.src=this.src.replace( '.svg', '.png' ); this.onerror=null;";
+   }
if ( isset( $customLogos['copyright-height'] ) ) {
$attributes['height'] = 
$customLogos['copyright-height'];
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2337b750c80e79c816dc817dfe230e063eed0345
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Update comment text color CSS

2017-12-04 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395146 )

Change subject: Update comment text color CSS
..

Update comment text color CSS

This patch changes the comment text color to #84A0A0,
as suggested by Kaldari in T170067#3440124.

Bug: T170067
Change-Id: I016b8ce360a06f14b02cee13b629fa578c889347
---
M resources/mode/mediawiki/mediawiki.css
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/mode/mediawiki/mediawiki.css 
b/resources/mode/mediawiki/mediawiki.css
index fea9d70..3b71a2a 100644
--- a/resources/mode/mediawiki/mediawiki.css
+++ b/resources/mode/mediawiki/mediawiki.css
@@ -11,7 +11,7 @@
 .cm-mw-doubleUnderscore, .cm-mw-signature, .cm-mw-hr { color: #08f; 
font-weight: bold; background-color: #eee; }
 .cm-mw-indenting { color: #08f; font-weight: bold; }
 .cm-mw-mnemonic { color: #290; }
-.cm-mw-comment { color: #aaa; font-weight: normal; }
+.cm-mw-comment { color: #84a0a0; font-weight: normal; }
 .cm-mw-apostrophes-bold, .cm-mw-apostrophes-italic { color: #08f; }
 
 pre.cm-mw-section-1 { font-size: 1.8em; line-height: 1.2em; }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Use preg_replace instead of str_replace for replacing extension

2017-12-06 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395888 )

Change subject: Use preg_replace instead of str_replace for replacing extension
..

Use preg_replace instead of str_replace for replacing extension

Bug: T166684
Change-Id: I233be410486276f30b08034180eb54cb08e04076
---
M includes/skins/SkinMinerva.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/88/395888/1

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 62cd5be..ea4625b 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -56,7 +56,7 @@
if ( isset( $customLogos['copyright-fallback'] 
) ) {
$attributes['src'] = 
$customLogos['copyright-fallback'];
} else {
-   $attributes['src'] = str_replace( 
'.svg', '.png', $customLogos['copyright'] );
+   $attributes['src'] = preg_replace( 
'"\.svg$"', '.png', $customLogos['copyright'] );
}
}
if ( isset( $customLogos['copyright-height'] ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I233be410486276f30b08034180eb54cb08e04076
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix tooltip accessibility for screen readers

2017-12-15 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398611 )

Change subject: Fix tooltip accessibility for screen readers
..

Fix tooltip accessibility for screen readers

By replacing original-title attribute with aria-label,
we can ensure that every tooltip will be accessible
for accessibility tools like screen readers.

Works with Echo extension, but I am not sure if there
are extensions who are using the original-title attribute.

Tested with ChromeVox on Chrome 62.0.3202.94.

Bug: T54711
Change-Id: I19500c4e8ccbdcb8288b9c2299a29b3f8a31639d
---
M resources/src/jquery.tipsy/jquery.tipsy.js
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/398611/1

diff --git a/resources/src/jquery.tipsy/jquery.tipsy.js 
b/resources/src/jquery.tipsy/jquery.tipsy.js
index ddda432..dc719cf 100644
--- a/resources/src/jquery.tipsy/jquery.tipsy.js
+++ b/resources/src/jquery.tipsy/jquery.tipsy.js
@@ -111,8 +111,8 @@
 
 fixTitle: function() {
 var $e = this.$element;
-if ($e.attr('title') || typeof($e.attr('original-title')) != 
'string') {
-$e.attr('original-title', $e.attr('title') || 
'').removeAttr('title');
+if ($e.attr('title') || typeof($e.attr('aria-label')) != 'string') 
{
+$e.attr('aria-label', $e.attr('title') || 
'').removeAttr('title');
 }
 },
 
@@ -120,7 +120,7 @@
 var title, $e = this.$element, o = this.options;
 this.fixTitle();
 if (typeof o.title == 'string') {
-title = $e.attr(o.title == 'title' ? 'original-title' : 
o.title);
+title = $e.attr(o.title == 'title' ? 'aria-label' : o.title);
 } else if (typeof o.title == 'function') {
 title = o.title.call($e[0]);
 }
@@ -257,7 +257,7 @@
  * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer
  *if there are no viewable region edges effecting the tooltip's
  *gravity. It will try to vary from this minimally, for example,
- *if 'sw' is preferred and an element is near the right viewable 
+ *if 'sw' is preferred and an element is near the right viewable
  *region edge, but not the top edge, it will set the gravity for
  *that element's tooltip to be 'se', preserving the southern
  *component.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix gap between header and content

2017-12-17 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398691 )

Change subject: Fix gap between header and content
..

Fix gap between header and content

After a long analysis on IRC I've found out that the cause isn't
the fieldset as described in the bug report,
but a margin-top rule which had a wrong value.

Bug: T174139
Change-Id: Ifde1a944ca19e424ff5499c5f2cd1c362dc6e23b
---
M modules/ui/legacy/styles/mw.cx.ui.Columns.less
M modules/ui/styles/mw.cx.ui.Columns.less
M modules/widgets/common/ext.cx.column.less
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/91/398691/1

diff --git a/modules/ui/legacy/styles/mw.cx.ui.Columns.less 
b/modules/ui/legacy/styles/mw.cx.ui.Columns.less
index 960286e..1435014 100644
--- a/modules/ui/legacy/styles/mw.cx.ui.Columns.less
+++ b/modules/ui/legacy/styles/mw.cx.ui.Columns.less
@@ -2,7 +2,7 @@
 @import '../../../widgets/common/ext.cx.common.less';
 
 .cx-widget__columns {
-   margin-top: 100px;
+   margin-top: 80px;
min-height: 100vh;
 
&.disabled {
diff --git a/modules/ui/styles/mw.cx.ui.Columns.less 
b/modules/ui/styles/mw.cx.ui.Columns.less
index b83874f..8900364 100644
--- a/modules/ui/styles/mw.cx.ui.Columns.less
+++ b/modules/ui/styles/mw.cx.ui.Columns.less
@@ -2,7 +2,7 @@
 @import '../../widgets/common/ext.cx.common.less';
 
 .cx-widget__columns {
-   margin-top: 100px;
+   margin-top: 80px;
min-height: 100vh;
 
&.disabled {
diff --git a/modules/widgets/common/ext.cx.column.less 
b/modules/widgets/common/ext.cx.column.less
index 634caf7..d3b18fc 100644
--- a/modules/widgets/common/ext.cx.column.less
+++ b/modules/widgets/common/ext.cx.column.less
@@ -2,7 +2,7 @@
 @import 'ext.cx.common.less';
 
 .cx-widget__columns {
-   margin-top: 100px;
+   margin-top: 80px;
min-height: 100vh;
 
&.disabled {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifde1a944ca19e424ff5499c5f2cd1c362dc6e23b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add help link to special pages

2017-12-19 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399150 )

Change subject: Add help link to special pages
..

Add help link to special pages

Bug: T180980
Change-Id: I53c7ea7c817a1622f85066aecec582ed1dd188c6
---
M includes/specials/SpecialNewsletter.php
M includes/specials/SpecialNewsletterCreate.php
M includes/specials/SpecialNewsletters.php
3 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/50/399150/1

diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 62bb077..23d1795 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -50,6 +50,8 @@
$out = $this->getOutput();
$this->newsletter = Newsletter::newFromID( (int)$id );
 
+   $this->addHelpLink( 'Help:Extension:Newsletter' );
+
if ( $this->newsletter ) {
// Newsletter exists for the given subpage id - let's 
check what they want to do
switch ( $action ) {
diff --git a/includes/specials/SpecialNewsletterCreate.php 
b/includes/specials/SpecialNewsletterCreate.php
index e9cfc72..e025cff 100644
--- a/includes/specials/SpecialNewsletterCreate.php
+++ b/includes/specials/SpecialNewsletterCreate.php
@@ -26,6 +26,7 @@
$this->msg( 'newsletter-subtitlelinks-list' 
)->text()
)
);
+   $this->addHelpLink( 'Help:Extension:Newsletter' );
}
 
/**
diff --git a/includes/specials/SpecialNewsletters.php 
b/includes/specials/SpecialNewsletters.php
index 353830a..07bbe96 100644
--- a/includes/specials/SpecialNewsletters.php
+++ b/includes/specials/SpecialNewsletters.php
@@ -24,6 +24,8 @@
$out->addModuleStyles( 'ext.newsletter.newsletters.styles' );
$user = $this->getUser();
 
+   $this->addHelpLink( 'Help:Extension:Newsletter' );
+
if ( $user->isAllowed( 'newsletter-create' ) ) {
$createLink = $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'NewsletterCreate' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53c7ea7c817a1622f85066aecec582ed1dd188c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Replace deprecated tt tags with samp tag

2017-12-19 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399171 )

Change subject: Replace deprecated tt tags with samp tag
..

Replace deprecated tt tags with samp tag

According to w3schools.com the tt tag can be replaced
with samp tag for computer ouput messages.

Bug: T182968
Change-Id: Ib1a3adb348f73a4bde350254e095cd75adca449f
---
M Timeline.body.php
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/timeline 
refs/changes/71/399171/1

diff --git a/Timeline.body.php b/Timeline.body.php
index b6c3926..a7d9cb8 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -152,19 +152,19 @@
}
if ( !$backend->doQuickOperations( $ops 
)->isOK() ) {
// FIXME Hard coded english text
-   return "Timeline error. "
-   . "Could not store output 
files";
+   return "Timeline error. "
+   . "Could not store output 
files";
}
} else {
// FIXME Hard coded english text
-   return "Timeline error. "
-   . "Could not create temp 
file";
+   return "Timeline error. "
+   . "Could not create temp 
file";
}
 
if ( $ret == "" || $retVal > 0 ) {
// Message not localized, only relevant during 
install
-   return "Timeline error. "
-   . "Command line was: " . 
htmlspecialchars( $cmdline ) . "";
+   return "Timeline error. "
+   . "Command line was: " . 
htmlspecialchars( $cmdline ) . "";
}
}
 
@@ -184,7 +184,7 @@
 
// Now convert back to HTML again
$encErr = nl2br( htmlspecialchars( $err ) );
-   $txt = "$encErr";
+   $txt = "$encErr";
} else {
$map = $backend->getFileContents( [ 'src' => 
"{$fname}.map" ] );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1a3adb348f73a4bde350254e095cd75adca449f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/timeline
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


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

2017-12-21 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399591 )

Change subject: Add minus-x to composer.json
..

Add minus-x to composer.json

Bug: T175794
Change-Id: I6ee0cc24316260762bb074aa801e4463db399198
---
M composer.json
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Nostalgia 
refs/changes/91/399591/1

diff --git a/composer.json b/composer.json
index 32efa41..d711279 100644
--- a/composer.json
+++ b/composer.json
@@ -2,13 +2,18 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "14.1.0"
+   "mediawiki/mediawiki-codesniffer": "14.1.0",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
-   "fix": "phpcbf",
+   "fix": [
+   "phpcbf",
+   "minus-x fix ."
+   ],
"test": [
"parallel-lint . --exclude node_modules --exclude 
vendor",
-   "phpcs -p -s"
+   "phpcs -p -s",
+   "minus-x check ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ee0cc24316260762bb074aa801e4463db399198
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Nostalgia
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


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

2017-12-21 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399593 )

Change subject: Add minus-x to composer.json
..

Add minus-x to composer.json

Bug: T175794
Change-Id: Ib16de27e9403fe1544b30250ee059d8e0c223b21
---
M composer.json
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Refreshed 
refs/changes/93/399593/1

diff --git a/composer.json b/composer.json
index 8f67131..4e56772 100644
--- a/composer.json
+++ b/composer.json
@@ -8,8 +8,10 @@
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
+   "fix": "minus-x fix .",
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib16de27e9403fe1544b30250ee059d8e0c223b21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Refreshed
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Fix infobox styles to work well with multiple column infobox...

2017-12-22 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399866 )

Change subject: Fix infobox styles to work well with multiple column infobox 
rows
..

Fix infobox styles to work well with multiple column infobox rows

I used the fix provided by TheDJ and tested out locally
on Firefox 57 and Chrome latest, but I couldn't test out
any grade C browser as on Linux it's really hard to find
such an outdated browser like Internet Explorer on Windows.

Also, I am unsure whether it will work in production
with the example article from the task, wasn't able
to recreate the article fully on my local devwiki.

Bug: T168716
Change-Id: Ied7c15f7a254228c23111df79da44d6167f1baac
---
M resources/skins.minerva.content.styles/hacks.less
M resources/skins.minerva.tablet.styles/hacks.less
2 files changed, 22 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/66/399866/1

diff --git a/resources/skins.minerva.content.styles/hacks.less 
b/resources/skins.minerva.content.styles/hacks.less
index ce7b225..4f41f65 100644
--- a/resources/skins.minerva.content.styles/hacks.less
+++ b/resources/skins.minerva.content.styles/hacks.less
@@ -43,29 +43,31 @@
margin-right: 0 !important;
 
&.infobox {
-   font-size: 90%;
-   position: relative;
-   border: 1px solid @colorGray14;
-   margin-bottom: 2em;
-   text-align: left;
-   background-color: @colorGray15;
+display: flex;
+flex: 1 1 100%;
+flex-flow: column nowrap;
 
-   th, td {
-   vertical-align: top;
-   border: 0;
-   border-bottom: 1px solid @colorGray14;
-   padding: 7px 10px;
-   }
+   td:only-child,
+   th:only-child {
+   width: 100%;
+   }
+}
 
-   td {
-   width: 100%;
-   }
+&.infobox > tbody {
+display: flex;
+flex-flow: column nowrap;
+}
 
-   tr:last-child th,
-   tr:last-child td {
-   border: 0;
-   }
-   }
+&.infobox > tbody > tr {
+min-width: 100%;
+display:flex;
+flex-flow: row nowrap;
+}
+
+&.infobox > tbody >tr > td,
+&.infobox > tbody >tr > th {
+flex: 1 0;
+}
}
 }
 
diff --git a/resources/skins.minerva.tablet.styles/hacks.less 
b/resources/skins.minerva.tablet.styles/hacks.less
index c833a7b..102189a 100644
--- a/resources/skins.minerva.tablet.styles/hacks.less
+++ b/resources/skins.minerva.tablet.styles/hacks.less
@@ -22,11 +22,6 @@
width: auto !important;
float: right !important;
clear: right !important;
-
-   td {
-   width: auto;
-   }
-
}
// banners inserted by other extensions, i.e. Zero
#mw-mf-page-center .mw-mf-banner {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied7c15f7a254228c23111df79da44d6167f1baac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Replace deprecated tag with custom styled tag in ...

2017-12-24 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400108 )

Change subject: Replace deprecated  tag with custom styled  tag in 
error output
..

Replace deprecated  tag with custom styled  tag in error output

Bug: T182968
Change-Id: Ie8f45d26eb3831793a988bcc1c91da3c2239d832
---
M Timeline.body.php
1 file changed, 11 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/timeline 
refs/changes/08/400108/1

diff --git a/Timeline.body.php b/Timeline.body.php
index b6c3926..4b433e6 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -152,19 +152,22 @@
}
if ( !$backend->doQuickOperations( $ops 
)->isOK() ) {
// FIXME Hard coded english text
-   return "Timeline error. "
-   . "Could not store output 
files";
+   return ""
+   . "Timeline error. "
+   . "Could not store output 
files";
}
} else {
// FIXME Hard coded english text
-   return "Timeline error. "
-   . "Could not create temp 
file";
+   return ""
+   . "Timeline error. "
+   . "Could not create temp 
file";
}
 
if ( $ret == "" || $retVal > 0 ) {
// Message not localized, only relevant during 
install
-   return "Timeline error. "
-   . "Command line was: " . 
htmlspecialchars( $cmdline ) . "";
+   return ""
+   . "Timeline error. "
+   . "Command line was: " . 
htmlspecialchars( $cmdline ) . "";
}
}
 
@@ -184,7 +187,8 @@
 
// Now convert back to HTML again
$encErr = nl2br( htmlspecialchars( $err ) );
-   $txt = "$encErr";
+   $txt = ""
+   . "$encErr";
} else {
$map = $backend->getFileContents( [ 'src' => 
"{$fname}.map" ] );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8f45d26eb3831793a988bcc1c91da3c2239d832
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/timeline
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Always define wgRestrictionEdit as an empty array for pages

2017-12-24 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400134 )

Change subject: Always define wgRestrictionEdit as an empty array for pages
..

Always define wgRestrictionEdit as an empty array for pages

Bug: T133289
Change-Id: I4b769058feb7e91352170ba1ba08df5c2082ba24
---
M includes/OutputPage.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/400134/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 92963fd..8838ca4 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3218,6 +3218,7 @@
'wgRelevantPageName' => 
$relevantTitle->getPrefixedDBkey(),
'wgRelevantArticleId' => $relevantTitle->getArticleID(),
'wgRequestId' => WebRequest::getRequestId(),
+   'wgRestrictionEdit' => [],
];
 
if ( $user->isLoggedIn() ) {

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Use symlink instead of copyfile in download_dump.py

2017-12-25 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400195 )

Change subject: Use symlink instead of copyfile in download_dump.py
..

Use symlink instead of copyfile in download_dump.py

Bug: T183668
Change-Id: I6491aed72e292260e0c464d3e7eb87e739402878
---
M scripts/maintenance/download_dump.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/95/400195/1

diff --git a/scripts/maintenance/download_dump.py 
b/scripts/maintenance/download_dump.py
index 9793255..20b0d7e 100644
--- a/scripts/maintenance/download_dump.py
+++ b/scripts/maintenance/download_dump.py
@@ -22,7 +22,8 @@
 import os.path
 import sys
 
-from shutil import copyfile, copyfileobj
+from shutil import copyfileobj
+from os import symlink
 
 import pywikibot
 
@@ -72,7 +73,7 @@
 self.getOption('wikiname'), self.getOption('filename'))
 if toolforge_dump_filepath:
 pywikibot.output('Copying file from ' + toolforge_dump_filepath)
-copyfile(toolforge_dump_filepath, file_storepath)
+symlink(toolforge_dump_filepath, file_storepath)
 else:
 url = 'https://dumps.wikimedia.org/' + \
 os.path.join(self.getOption('wikiname'),

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Unit test NewsletterDb::updateDescription

2017-12-27 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400459 )

Change subject: Unit test NewsletterDb::updateDescription
..

Unit test NewsletterDb::updateDescription

Bug: T183618
Change-Id: I295674754581bea963973083092d8d00c332e77d
---
M tests/NewsletterDbTest.php
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/59/400459/1

diff --git a/tests/NewsletterDbTest.php b/tests/NewsletterDbTest.php
index 7c996aa..78c80a6 100644
--- a/tests/NewsletterDbTest.php
+++ b/tests/NewsletterDbTest.php
@@ -191,6 +191,29 @@
}
 
/**
+* @covers NewsletterDb::updateDescription
+*/
+   public function testUpdateDescription() {
+   $mockWriteDb = $this->getMockIDatabase();
+   $newsletter = $this->getTestNewsletter();
+   $newsletterId = $newsletter->getId();
+
+   $newDescription = 'Lorem ipsum dolor sit amet, consectetur 
adipiscing elit,'
+   . 'sed do eiusmod tempor incididunt ut labore 
et dolore magna aliqua.';
+
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'update' )
+   ->with(
+   'nl_newsletters',
+   [ 'nl_desc' => $newDescription ], [ 'nl_id' => 
$newsletterId ]
+   );
+
+   $table = new NewsletterDb( $this->getMockLoadBalancer( 
$mockWriteDb ) );
+   $table->updateDescription( $newsletterId, $newDescription );
+   }
+
+   /**
 * @covers NewsletterDb::deleteNewsletter
 */
public function testDeleteNewsletter() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I295674754581bea963973083092d8d00c332e77d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


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

2018-01-09 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403320 )

Change subject: Add minus-x to composer.json
..

Add minus-x to composer.json

Bug: T175794
Change-Id: If650a30daeabf09d13a734cd143337625efa1e20
---
M composer.json
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceInterWikiLinks 
refs/changes/20/403320/1

diff --git a/composer.json b/composer.json
index f0bb5f6..071c0dd 100644
--- a/composer.json
+++ b/composer.json
@@ -12,11 +12,14 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
+   "fix": "minus-x fix .",
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If650a30daeabf09d13a734cd143337625efa1e20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceInterWikiLinks
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


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

2018-01-09 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403321 )

Change subject: Add minus-x to composer.json
..

Add minus-x to composer.json

Bug: T175794
Change-Id: I9245ecc850e930a80c5c64d123a52ab3e7b54e8e
---
M composer.json
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceNamespaceManager 
refs/changes/21/403321/1

diff --git a/composer.json b/composer.json
index 938247c..192f429 100644
--- a/composer.json
+++ b/composer.json
@@ -13,11 +13,14 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
+   "fix": "minus-x fix .",
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9245ecc850e930a80c5c64d123a52ab3e7b54e8e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceNamespaceManager
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


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

2018-01-10 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403363 )

Change subject: Add minus-x to composer.json
..

Add minus-x to composer.json

Bug: T175794
Change-Id: Ifeba8b52453ea591713ec1779ec7e230f6ad6ced
---
M composer.json
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/composer.json b/composer.json
index a153136..b94add8 100644
--- a/composer.json
+++ b/composer.json
@@ -12,11 +12,14 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
+   "fix": "minus-x fix .",
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifeba8b52453ea591713ec1779ec7e230f6ad6ced
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpicePermissionManager
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


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

2018-01-10 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403364 )

Change subject: Add minus-x to composer.json
..

Add minus-x to composer.json

Bug: T175794
Change-Id: Ie0d6037892757f6ad4de4ec28f86368082938bc7
---
M composer.json
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceReaders 
refs/changes/64/403364/1

diff --git a/composer.json b/composer.json
index 63e0b2c..cb4629c 100644
--- a/composer.json
+++ b/composer.json
@@ -13,11 +13,14 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
+   "fix": "minus-x fix .",
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0d6037892757f6ad4de4ec28f86368082938bc7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceReaders
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Replace assertRaises with assertRaisesRegex in isbn_tests.py

2018-01-13 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404085 )

Change subject: Replace assertRaises with assertRaisesRegex in isbn_tests.py
..

Replace assertRaises with assertRaisesRegex in isbn_tests.py

assertRaises is not as good of a test as asserRaisesRegex.
The latter has an extra parameter to match the exception message,
allowing more more precision when checking an error.

Bug: T154281
Change-Id: Iaab3472bbae926caf5d68239b3828b5691ee38b9
---
M tests/isbn_tests.py
1 file changed, 54 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/85/404085/1

diff --git a/tests/isbn_tests.py b/tests/isbn_tests.py
index df00417..216a1f8 100644
--- a/tests/isbn_tests.py
+++ b/tests/isbn_tests.py
@@ -39,6 +39,19 @@
 
 """Test CosmeticChanges ISBN fix."""
 
+ISBNINVALIDCHECKSUM_RE = (
+r"ISBN-13: The ISBN ([A-Z0-9]*) is not 13 digits long\. / "
+r"ISBN-10: The ISBN checksum of ([A-Z0-9]*) is incorrect\."
+)
+ISBNINVALIDLENGTH_RE = (
+r"ISBN-13: The ISBN ([A-Z0-9]*) is not 13 digits long\. / "
+r"ISBN-10: The ISBN ([A-Z0-9]*) is not 10 digits long\."
+)
+ISBNXINTHEMIDDLE_RE = (
+r"ISBN-13: The ISBN ([A-Z0-9]*) contains invalid characters\. / "
+r"ISBN-10: The ISBN ([A-Z0-9]*) is not 10 digits long\."
+)
+
 def test_valid_isbn(self):
 """Test ISBN."""
 cc = CosmeticChangesToolkit(self.site, namespace=0)
@@ -54,17 +67,17 @@
 cc = CosmeticChangesToolkit(self.site, namespace=0)
 
 # Invalid characters
-self.assertRaises(AnyIsbnValidationException,
-  cc.fix_ISBN, 'ISBN 0975229LOL')
+self.assertRaisesRegex(AnyIsbnValidationException, 
self.ISBNINVALIDLENGTH_RE,
+   cc.fix_ISBN, 'ISBN 0975229LOL')
 # Invalid checksum
-self.assertRaises(AnyIsbnValidationException,
-  cc.fix_ISBN, 'ISBN 0975229801')
+self.assertRaisesRegex(AnyIsbnValidationException, 
self.ISBNINVALIDCHECKSUM_RE,
+   cc.fix_ISBN, 'ISBN 0975229801')
 # Invalid length
-self.assertRaises(AnyIsbnValidationException,
-  cc.fix_ISBN, 'ISBN 09752298')
+self.assertRaisesRegex(AnyIsbnValidationException, 
self.ISBNINVALIDLENGTH_RE,
+   cc.fix_ISBN, 'ISBN 09752298')
 # X in the middle
-self.assertRaises(AnyIsbnValidationException,
-  cc.fix_ISBN, 'ISBN 09752X9801')
+self.assertRaisesRegex(AnyIsbnValidationException, 
self.ISBNXINTHEMIDDLE_RE,
+   cc.fix_ISBN, 'ISBN 09752X9801')
 
 def test_ignore_invalid_isbn(self):
 """Test fixing ISBN numbers with an invalid ISBN."""
@@ -77,6 +90,23 @@
 class TestIsbn(TestCase):
 
 """Test ISBN-related classes and helper functions."""
+
+ISBNINVALIDCHARACTERS_RE = (
+r"The ISBN ([A-Z0-9]*) contains invalid characters"
+)
+ISBNINVALIDCHECKSUM_RE = (
+r"The ISBN checksum of ([A-Z0-9]*) is incorrect"
+)
+ISBNINVALIDLENGTH_RE = (
+r"The ISBN ([A-Z0-9]*) is not (10|13) digits long"
+)
+ISBNBOTHINVALIDLENGTH_RE = (
+r"ISBN-13: The ISBN ([A-Z0-9]*) is not 13 digits long\. / "
+r"ISBN-10: The ISBN ([A-Z0-9]*) is not 10 digits long\."
+)
+ISBNXINTHEMIDDLE_RE = (
+r"ISBN ([A-Z0-9]*): X is only allowed at the end of the ISBN"
+)
 
 net = False
 
@@ -94,10 +124,14 @@
 self.assertEqual(isbn13.code, '978-0-9752298-0-4')
 
 # Errors
-self.assertRaises(IsbnExc, ISBN10, '0975229LOL')  # Invalid characters
-self.assertRaises(IsbnExc, ISBN10, '0975229801')  # Invalid checksum
-self.assertRaises(IsbnExc, ISBN10, '09752298')  # Invalid length
-self.assertRaises(IsbnExc, ISBN10, '09752X9801')  # X in the middle
+self.assertRaisesRegex(IsbnExc, self.ISBNINVALIDCHARACTERS_RE,
+   ISBN10, '0975229LOL')  # Invalid characters
+self.assertRaisesRegex(IsbnExc, self.ISBNINVALIDCHECKSUM_RE,
+   ISBN10, '0975229801')  # Invalid checksum
+self.assertRaisesRegex(IsbnExc, self.ISBNINVALIDLENGTH_RE,
+   ISBN10, '09752298')  # Invalid length
+self.assertRaisesRegex(IsbnExc, self.ISBNXINTHEMIDDLE_RE,
+   ISBN10, '09752X9801')  # X in the middle
 
 def test_isbn13(self):
 """Test ISBN13."""
@@ -111,19 +145,20 @@
 self.assertEqual(isbn.code, '9788090273412')
 
 # Errors
-self.assertRaises(IsbnExc, ISBN13, '9783161484LOL')  # Invalid chars
-self.assertRaises(IsbnExc, ISBN13, '9783161484105')  # Invalid checksum
-self.assertRaises(IsbnExc, ISBN13, '9783161484')  # Invalid length
+ 

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Fix infobox styles to work well with multiple column infobox...

2018-01-13 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404094 )

Change subject: Fix infobox styles to work well with multiple column infobox 
rows
..

Fix infobox styles to work well with multiple column infobox rows

I used the fix provided by TheDJ and tested out locally
on Firefox 57 and Chrome latest, but I couldn't test out
any grade C browser as on Linux it's really hard to find
such an outdated browser like Internet Explorer on Windows.

Bug: T168716
Change-Id: I8e03610e4eb3c93b80bb757592c2fb3079a68412
---
M resources/skins.minerva.content.styles/hacks.less
M resources/skins.minerva.tablet.styles/hacks.less
2 files changed, 21 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/94/404094/1

diff --git a/resources/skins.minerva.content.styles/hacks.less 
b/resources/skins.minerva.content.styles/hacks.less
index ce7b225..bf4d098 100644
--- a/resources/skins.minerva.content.styles/hacks.less
+++ b/resources/skins.minerva.content.styles/hacks.less
@@ -43,28 +43,37 @@
margin-right: 0 !important;
 
&.infobox {
-   font-size: 90%;
position: relative;
+   font-size: 90%;
border: 1px solid @colorGray14;
margin-bottom: 2em;
text-align: left;
background-color: @colorGray15;
 
-   th, td {
-   vertical-align: top;
-   border: 0;
-   border-bottom: 1px solid @colorGray14;
-   padding: 7px 10px;
-   }
+   display: flex;
+   flex: 1 1 100%;
+   flex-flow: column nowrap;
 
-   td {
+   td:only-child,
+   th:only-child {
width: 100%;
}
+   }
 
-   tr:last-child th,
-   tr:last-child td {
-   border: 0;
-   }
+   &.infobox > tbody {
+   display: flex;
+   flex-flow: column nowrap;
+   }
+
+   &.infobox > tbody > tr {
+   min-width: 100%;
+   display:flex;
+   flex-flow: row nowrap;
+   }
+
+   &.infobox > tbody >tr > td,
+   &.infobox > tbody >tr > th {
+   flex: 1 0;
}
}
 }
diff --git a/resources/skins.minerva.tablet.styles/hacks.less 
b/resources/skins.minerva.tablet.styles/hacks.less
index c833a7b..102189a 100644
--- a/resources/skins.minerva.tablet.styles/hacks.less
+++ b/resources/skins.minerva.tablet.styles/hacks.less
@@ -22,11 +22,6 @@
width: auto !important;
float: right !important;
clear: right !important;
-
-   td {
-   width: auto;
-   }
-
}
// banners inserted by other extensions, i.e. Zero
#mw-mf-page-center .mw-mf-banner {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e03610e4eb3c93b80bb757592c2fb3079a68412
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Unit test NewsletterDb::updateMainPage

2017-12-28 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400600 )

Change subject: Unit test NewsletterDb::updateMainPage
..

Unit test NewsletterDb::updateMainPage

Bug: T183620
Change-Id: Ie61771764df56edfefde746e6b77de1cd2420591
---
M tests/NewsletterDbTest.php
1 file changed, 22 insertions(+), 0 deletions(-)


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

diff --git a/tests/NewsletterDbTest.php b/tests/NewsletterDbTest.php
index 78c80a6..d3821ca 100644
--- a/tests/NewsletterDbTest.php
+++ b/tests/NewsletterDbTest.php
@@ -214,6 +214,28 @@
}
 
/**
+* @covers NewsletterDb::updateMainPage
+*/
+   public function testUpdateMainPage() {
+   $mockWriteDb = $this->getMockIDatabase();
+   $newsletter = $this->getTestNewsletter();
+   $newsletterId = $newsletter->getId();
+
+   $newMainPage = 1;
+
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'update' )
+   ->with(
+   'nl_newsletters',
+   [ 'nl_main_page_id' => $newMainPage ], [ 
'nl_id' => $newsletterId ]
+   );
+
+   $table = new NewsletterDb( $this->getMockLoadBalancer( 
$mockWriteDb ) );
+   $table->updateMainPage( $newsletterId, $newDescription );
+   }
+
+   /**
 * @covers NewsletterDb::deleteNewsletter
 */
public function testDeleteNewsletter() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie61771764df56edfefde746e6b77de1cd2420591
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: [WIP] Generalize wording of audio formats in Score.php

2017-12-30 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401113 )

Change subject: [WIP] Generalize wording of audio formats in Score.php
..

[WIP] Generalize wording of audio formats in Score.php

Bug: T183753
Change-Id: Iba98dd7281e3910f4dcde1d40b4361fc372f8c1f
---
M i18n/en.json
M i18n/qqq.json
M includes/Score.php
3 files changed, 37 insertions(+), 37 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index b42c585..326a26d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,7 +15,7 @@
"score-error-category-desc": "There was an error while rendering the 
score.",
"score-getcwderr": "Unable to obtain current working directory",
"score-invalidlang": "Invalid score language 
lang=\"$1\". Currently recognized languages are 
lang=\"lilypond\" (the default) and lang=\"ABC\".",
-   "score-invalidoggoverride": "The file \"$1\" you 
specified with override_ogg is invalid. Please specify the file name only, omit 
[[…]] and the \"{{ns:file}}:\" prefix.",
+   "score-invalidaudiooverride": "The file \"$1\" you 
specified with override_audio is invalid. Please specify the file name only, 
omit [[…]] and the \"{{ns:file}}:\" prefix.",
"score-midioverridenotfound": "The file \"$1\" you 
specified with override_midi could not be found. Please specify the file name 
only, omit [[…]] and the \"{{ns:file}}:\" prefix.",
"score-noabcinput": "ABC source file $1 could not be created.",
"score-noimages": "No score images were generated. Please check your 
score code.",
@@ -26,7 +26,7 @@
"score-notexecutable": "Could not execute LilyPond: $1 is not an 
executable file. Make sure $wgScoreLilyPond is set correctly.",
"score-nocontent": "Could not load file $1 from server.",
"score-oggconversionerr": "Unable to convert MIDI to Ogg/Vorbis:\n$1",
-   "score-oggoverridenotfound": "The file \"$1\" you 
specified with override_ogg does not exist.",
+   "score-audiooverridenotfound": "The file \"$1\" you 
specified with override_audio does not exist.",
"score-page": "Page $1",
"score-pregreplaceerr": "PCRE regular expression replacement failed",
"score-readerr": "Unable to read file $1.",
@@ -49,5 +49,5 @@
"score-visualeditor-mwscoreinspector-raw": "This is a complete LilyPond 
file",
"score-visualeditor-mwscoreinspector-title": "Musical notation",
"score-visualeditor-mwscoreinspector-vorbis": "Include an audio file 
(auto-generated by default)",
-   "score-vorbisoverrideogg": "You cannot request Ogg/Vorbis rendering and 
specify override_ogg at the same time."
+   "score-vorbisoverrideaudio": "You cannot request Ogg/Vorbis rendering 
and specify override_audio at the same time."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7fb2a39..4b647ec 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -21,7 +21,7 @@
"score-error-category-desc": "Description on 
[[Special:TrackingCategories]] for the {{msg-mw|score-error-category}} tracking 
category.",
"score-getcwderr": "Displayed if the extension cannot obtain the 
current working directory.",
"score-invalidlang": "Displayed if the lang=\"…\" attribute contains an 
unrecognized score language. $1 is the unrecognized language.",
-   "score-invalidoggoverride": "Displayed if the file specified with the 
override_ogg=\"…\" attribute is invalid. $1 is the value of the override_ogg 
attribute.",
+   "score-invalidaudiooverride": "Displayed if the file specified with the 
override_audio=\"…\" attribute is invalid. $1 is the value of the 
override_audio attribute.",
"score-midioverridenotfound": "Displayed if the file specified with the 
override_midi=\"…\" attribute could not be found. $1 is the value of the 
override_midi attribute.",
"score-noabcinput": "Displayed if an ABC source file could not be 
created for lang=\"ABC\". $1 is the path to the file that could not be 
created.",
"score-noimages": "Displayed if no score images were rendered.",
@@ -32,7 +32,7 @@
"score-notexecutable": "Displayed if LilyPond binary cannot be 
executed. $1 is the path to the LilyPond binary.",
"score-nocontent": "Parameters:\n* $1 - filename",
"score-oggconversionerr": "Displayed if the MIDI to Ogg/Vorbis 
conversion failed. $1 is the error (generally big block of text in a pre tag)",
-   "score-oggoverridenotfound": "Displayed if the file specified with the 
override_ogg=\"…\" attribute could not be found. $1 is the value of the 
override_ogg attribute.",
+   "score-audiooverridenotfound": "Displayed if the file specified with 
the override_audio=\"…\" attribute could not be found. $1 is the value of the 
override_ogg attribute.",
"score-page": "The word \"Page\" as used in pagination.

[MediaWiki-commits] [Gerrit] integration/config[master]: Add BlueSpicePageAccess extension to zuul/layout.yaml

2018-01-02 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401627 )

Change subject: Add BlueSpicePageAccess extension to zuul/layout.yaml
..

Add BlueSpicePageAccess extension to zuul/layout.yaml

Bug: T183674
Change-Id: I5fb3b7dc5cdd7d68a865178c00642b11808b78ca
---
M zuul/layout.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/27/401627/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d300494..79fc616 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4403,6 +4403,11 @@
   - name: extension-unittests-composer
   - name: mwgate-npm
 
+  - name: mediawiki/extensions/BlueSpicePageAccess
+template:
+  - name: extension-unittests-composer
+  - name: mwgate-npm
+
   - name: mediawiki/extensions/BlueSpicePageAssignments
 template:
   - name: extension-unittests-composer

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add BlueSpiceNamespaceCSS extension to zuul/layout.yaml

2018-01-02 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401628 )

Change subject: Add BlueSpiceNamespaceCSS extension to zuul/layout.yaml
..

Add BlueSpiceNamespaceCSS extension to zuul/layout.yaml

Bug: T183674
Change-Id: Icf72680d8ee174fee751d605b4372586ee42b635
---
M zuul/layout.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/28/401628/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d300494..e6d4669 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4403,6 +4403,11 @@
   - name: extension-unittests-composer
   - name: mwgate-npm
 
+  - name: mediawiki/extensions/BlueSpiceNamespaceCSS
+template:
+  - name: extension-unittests-composer
+  - name: mwgate-npm
+
   - name: mediawiki/extensions/BlueSpicePageAssignments
 template:
   - name: extension-unittests-composer

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Migrate TiMidity++ to fluidsynth

2018-01-04 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402148 )

Change subject: Migrate TiMidity++ to fluidsynth
..

Migrate TiMidity++ to fluidsynth

Bug: T181897
Change-Id: Idaf062f060cca823bdf11b6b0e846540eb588945
---
M README
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/Score.php
5 files changed, 23 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score 
refs/changes/48/402148/1

diff --git a/README b/README
index d3eae4c..c734e0c 100644
--- a/README
+++ b/README
@@ -41,8 +41,9 @@
$wgScoreLilyPond = '/path/to/your/lilypond/executable'; /* required */
$wgScoreAbc2Ly = '/path/to/your/abc2ly/executable'; /* if you want ABC to
   LilyPond conversion 
*/
-   $wgScoreTimidty = '/path/to/your/timidty/executable'; /* if you want MIDI to
-Vorbis conversion 
*/
+   $wgScoreFluidsynth = '/path/to/your/fluidsynth/executable'; /* if you want 
MIDI to
+  Vorbis 
conversion */
+   $wgScoreSoundfont = '/path/to/your/soundfont/file'; /* required for 
Fluidsynth */
$wgScoreTrim = true; /* Set to false if you don't want score trimming */
$wgScoreSafeMode = false; /* Set to true if the Lilypond executable is
 running in a Firejail or equivalent */
diff --git a/extension.json b/extension.json
index 11e1080..ad22b85 100644
--- a/extension.json
+++ b/extension.json
@@ -87,7 +87,8 @@
"ScoreTrim": null,
"ScoreLilyPond": "/usr/bin/lilypond",
"ScoreAbc2Ly": "/usr/bin/abc2ly",
-   "ScoreTimidity": "/usr/bin/timidity",
+   "ScoreFluidsynth": "/usr/bin/fluidsynth",
+   "ScoreSoundfont": "/usr/share/sounds/sf2/FluidR3_GM.sf2",
"ScoreSafeMode": true,
"ScorePath": false,
"ScoreDirectory": false,
diff --git a/i18n/en.json b/i18n/en.json
index 7c31ccc..91c7feb 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -32,7 +32,8 @@
"score-page": "Page $1",
"score-pregreplaceerr": "PCRE regular expression replacement failed",
"score-readerr": "Unable to read file $1.",
-   "score-timiditynotexecutable": "TiMidity++ could not be executed: $1 is 
not an executable file. Make sure $wgScoreTimidity is set 
correctly.",
+   "score-fluidsynthnotexecutable": "Fluidsynth could not be executed: $1 
is not an executable file. Make sure $wgScoreFluidsynth is set 
correctly.",
+   "score-soundfontnotexists": "Soundfont could not be found: $1 does not 
exists. Make sure $wgScoreSoundfont is set correctly.",
"score-renameerr": "Error moving score files to upload directory.",
"score-trimerr": "Image could not be trimmed:\n$1\nSet 
$wgScoreTrim=false if this problem persists.",
"score-versionerr": "Unable to obtain LilyPond version:\n$1",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7072caf..3cd7303 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -38,7 +38,8 @@
"score-page": "The word \"Page\" as used in pagination. Parameters:\n* 
$1 - the page number\n{{Identical|Page}}",
"score-pregreplaceerr": "Displayed if a PCRE regular expression 
replacement failed.",
"score-readerr": "Displayed if the extension could not read a file. $1 
is the path to the file that could not be read.",
-   "score-timiditynotexecutable": "Displayed if TiMidity++ could not be 
executed. $1 is the path to the TiMidity++ binary.",
+   "score-fluidsynthnotexecutable": "Displayed if Fluidsynth could not be 
executed. $1 is the path to the Fluidsynth binary.",
+   "score-soundfontnotexists": "Displayed if soundfont could not be found. 
$1 is the path to the soundfont file.",
"score-renameerr": "Displayed if moving the resultant files from the 
working environment to the upload directory fails.",
"score-trimerr": "Displayed if the extension failed to trim an output 
image. $1 is the error (generally big block of text in a pre tag)",
"score-versionerr": "Displayed if the extension failed to obtain the 
version string of LilyPond. $1 is the LilyPond stdout output generated by the 
attempt.",
diff --git a/includes/Score.php b/includes/Score.php
index 9010605..fed7677 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -798,7 +798,7 @@
}
 
/**
-* Generates an Ogg/Vorbis file from a MIDI file using timidity.
+* Generates an Ogg/Vorbis file from a MIDI file using fluidsynth.
 *
 * @param string $sourceFile The local filename of the MIDI file
 * @param array $options array of rendering options.
@@ -808,10 +808,15 @@
 * @throws ScoreException if an error occurs.
 */
private static func

[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Use MP3 with LAME instead of OGG for MIDI conversion

2018-01-06 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402590 )

Change subject: Use MP3 with LAME instead of OGG for MIDI conversion
..

Use MP3 with LAME instead of OGG for MIDI conversion

Bug: T181875
Change-Id: I4b87d0bb665e824fe934d714bf2e282b1bbe8318
---
M includes/Score.php
1 file changed, 10 insertions(+), 10 deletions(-)


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

diff --git a/includes/Score.php b/includes/Score.php
index dc90818..34b7a54 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -432,24 +432,24 @@
$existingFiles += self::generatePngAndMidi( 
$code, $options, $metaData );
}
 
-   /* Generate Ogg/Vorbis file if necessary */
-   if ( $options['generate_ogg'] ) {
+   /* Generate MP3 file if necessary */
+   if ( $options['generate_mp3'] ) {
if ( $options['override_midi'] ) {
-   $oggUrl = $options['audio_url'];
-   $oggPath = 
$options['audio_storage_path'];
+   $mp3Url = $options['audio_url'];
+   $mp3Path = 
$options['audio_storage_path'];
$exists = $backend->fileExists( [ 'src' 
=> $options['audio_storage_path'] ] );
if ( !$exists ) {
$backend->prepare( [ 'dir' => 
$options['audio_storage_dir'] ] );
$sourcePath = 
$options['midi_file']->getLocalRefPath();
-   self::generateOgg( $sourcePath, 
$options, $oggPath, $metaData );
+   self::generateMp3( $sourcePath, 
$options, $mp3Path, $metaData );
}
} else {
-   $oggFileName = 
"{$options['file_name_prefix']}.ogg";
-   $oggUrl = 
"{$options['dest_url']}/$oggFileName";
-   $oggPath = 
"{$options['dest_storage_path']}/$oggFileName";
+   $mp3FileName = 
"{$options['file_name_prefix']}.mp3";
+   $mp3Url = 
"{$options['dest_url']}/$mp3FileName";
+   $mp3Path = 
"{$options['dest_storage_path']}/$mp3FileName";
if (
-   !isset( 
$existingFiles[$oggFileName] ) ||
-   !isset( 
$metaData[$oggFileName]['length'] )
+   !isset( 
$existingFiles[$mp3FileName] ) ||
+   !isset( 
$metaData[$mp3FileName]['length'] )
) {
// Maybe we just generated it
$sourcePath = 
"{$options['factory_directory']}/file.midi";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b87d0bb665e824fe934d714bf2e282b1bbe8318
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Remove /* @noflip */ Leaflet's CSS fixes

2016-12-29 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329605 )

Change subject: Remove /* @noflip */ Leaflet's CSS fixes
..

Remove /* @noflip */ Leaflet's CSS fixes

Bug: T148695
Change-Id: I398ba8b294423d39b8ee94f4cc7c0b6ea140e461
---
M extension.json
M lib/mapbox-style-fixes.css
2 files changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/05/329605/1

diff --git a/extension.json b/extension.json
index 73935eb..5b48886 100644
--- a/extension.json
+++ b/extension.json
@@ -97,7 +97,8 @@
"targets": [
"mobile",
"desktop"
-   ]
+   ],
+   "noflip": true
},
"leaflet.draw": {
"dependencies": [
diff --git a/lib/mapbox-style-fixes.css b/lib/mapbox-style-fixes.css
index 19e3b78..a0af80c 100644
--- a/lib/mapbox-style-fixes.css
+++ b/lib/mapbox-style-fixes.css
@@ -1,8 +1,3 @@
-/**
- * Fix unwanted flipping of styles by CSS Janus (T127137)
- */
-
-/* @noflip */
 body.rtl .leaflet-map-pane,
 body.rtl .leaflet-tile,
 body.rtl .leaflet-marker-icon,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I398ba8b294423d39b8ee94f4cc7c0b6ea140e461
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...QuizGame[master]: Replace Linker::link() with LinkRenderer

2016-12-31 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329763 )

Change subject: Replace Linker::link() with LinkRenderer
..

Replace Linker::link() with LinkRenderer

Bug: T149346
Change-Id: I1c9b0d8982378a547f0873e0a8d6d0ac2297d4a8
---
M QuestionGameHome.body.php
M QuizLeaderboard.php
M ViewQuizzes.php
3 files changed, 13 insertions(+), 12 deletions(-)


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

diff --git a/QuestionGameHome.body.php b/QuestionGameHome.body.php
index bdca885..876d5ff 100644
--- a/QuestionGameHome.body.php
+++ b/QuestionGameHome.body.php
@@ -351,7 +351,7 @@
}
 
$key = md5( $this->SALT . $row->q_id );
-   $buttons = Linker::link(
+   $buttons = $this->getLinkRenderer()->makeLink(
$this->getPageTitle(),
$this->msg( 'quizgame-edit' )->text(),
array(),
@@ -966,7 +966,7 @@

";
 
-   $editLinks = Linker::link(
+   $editLinks = $this->getLinkRenderer()->makeLink(
$this->getPageTitle(),
$this->msg( 'quizgame-admin-panel-title' 
)->text(),
array(),
diff --git a/QuizLeaderboard.php b/QuizLeaderboard.php
index bbb4ea7..d800c6e 100644
--- a/QuizLeaderboard.php
+++ b/QuizLeaderboard.php
@@ -128,7 +128,7 @@
$output .= '';
 
$output .= '' .
-   Linker::link(
+   $this->getLinkRenderer()->makeLink(
$quizgame_title,
$this->msg( 'quizgame-admin-back' )->text(),
array(),
@@ -171,4 +171,4 @@
 
$out->addHTML( $output );
}
-}
\ No newline at end of file
+}
diff --git a/ViewQuizzes.php b/ViewQuizzes.php
index 35d3fbe..979da48 100644
--- a/ViewQuizzes.php
+++ b/ViewQuizzes.php
@@ -48,15 +48,16 @@
$limitvalue = $page * $limit - ( $limit );
}
 
+   $linkRenderer = $this->getLinkRenderer();
$quizGameHome = SpecialPage::getTitleFor( 'QuizGameHome' );
$output = '' .
-   Linker::link(
+   $linkRenderer->makeLink(
$quizGameHome,
$this->msg( 'quizgame-playneverending' 
)->text(),
array(),
array( 'questionGameAction' => 'launchGame' )
) . ' - ' .
-   Linker::link(
+   $linkRenderer->makeLink(
$quizGameHome,
$this->msg( 'quizgame-viewquizzes-create' 
)->text(),
array(),
@@ -83,7 +84,7 @@
if( $type == 'newest' ) {
$linkQueryParameters['type'] = 'most';
$output .= '' . $this->msg( 'quizgame-newest' 
)->text() . '
-   ' . Linker::link(
+   ' . $linkRenderer->makeLink(
$title,
$this->msg( 'quizgame-popular' 
)->text(),
array(),
@@ -91,7 +92,7 @@
) . '';
} else {
$linkQueryParameters['type'] = 'newest';
-   $output .= '' . Linker::link(
+   $output .= '' . $linkRenderer->makeLink(
$title,
$this->msg( 'quizgame-newest' )->text(),
array(),
@@ -185,7 +186,7 @@
if( $page > 1 ) {
$linkQueryParameters['type'] = 'most';
$linkQueryParameters['page'] = ( $page - 1 );
-   $output .= Linker::link(
+   $output .= $linkRenderer->makeLink(
$title,
$this->msg( 'quizgame-prev' )->text(),
array(),
@@ -209,7 +210,7 @@
} else {
$linkQueryParameters['type'] = 'most';
$linkQueryParameters['page'] = $i;
-   $output .= Linker::link(
+   $output .= $linkRenderer->makeLink(
$title,
  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Removed deprecated functions in includes/Revision.php

2016-12-31 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329766 )

Change subject: Removed deprecated functions in includes/Revision.php
..

Removed deprecated functions in includes/Revision.php

Bug: T61113
Change-Id: Id196de6e50b6db29bef3cb303afa9be6324cda8e
---
M RELEASE-NOTES-1.29
M includes/Revision.php
2 files changed, 10 insertions(+), 118 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/329766/1

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 774254c..2277861 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -147,6 +147,16 @@
 * User::getTemporaryPassword() (deprecated in 1.27) was removed.
 * User::isPasswordReminderThrottled() (deprecated in 1.27) was removed.
 * FSRepo (deprecated in 1.19) was removed.
+* Revision::fetchRevision() (deprecated in 1.28) was removed.
+* Revision::getRawUser() (deprecated in 1.25) was removed.
+  Use getUser( Revision::RAW ) instead.
+* Revision::getRawUserText() (deprecated in 1.25) was removed.
+  Use getUserText( Revision::RAW ) instead.
+* Revision::getRawComment() (deprecated in 1.25) was removed.
+  Use getComment( Revision::RAW ) instead.
+* Revision::getText() (deprecated in 1.21) was removed.
+  Use getContent() instead.
+* Revision::userWasLastToEdit() (deprecated in 1.24) was removed.
 
 == Compatibility ==
 
diff --git a/includes/Revision.php b/includes/Revision.php
index aea8488..40878e2 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -364,28 +364,6 @@
}
 
/**
-* Return a wrapper for a series of database rows to
-* fetch all of a given page's revisions in turn.
-* Each row can be fed to the constructor to get objects.
-*
-* @param LinkTarget $title
-* @return ResultWrapper
-* @deprecated Since 1.28
-*/
-   public static function fetchRevision( LinkTarget $title ) {
-   $row = self::fetchFromConds(
-   wfGetDB( DB_REPLICA ),
-   [
-   'rev_id=page_latest',
-   'page_namespace' => $title->getNamespace(),
-   'page_title' => $title->getDBkey()
-   ]
-   );
-
-   return new FakeResultWrapper( $row ? [ $row ] : [] );
-   }
-
-   /**
 * Given a set of conditions, return a ResultWrapper
 * which will return matching database rows with the
 * fields necessary to build Revision objects.
@@ -872,17 +850,6 @@
}
 
/**
-* Fetch revision's user id without regard for the current user's 
permissions
-*
-* @return int
-* @deprecated since 1.25, use getUser( Revision::RAW )
-*/
-   public function getRawUser() {
-   wfDeprecated( __METHOD__, '1.25' );
-   return $this->getUser( self::RAW );
-   }
-
-   /**
 * Fetch revision's username if it's available to the specified 
audience.
 * If the specified audience does not have access to the username, an
 * empty string will be returned.
@@ -916,17 +883,6 @@
}
 
/**
-* Fetch revision's username without regard for view restrictions
-*
-* @return string
-* @deprecated since 1.25, use getUserText( Revision::RAW )
-*/
-   public function getRawUserText() {
-   wfDeprecated( __METHOD__, '1.25' );
-   return $this->getUserText( self::RAW );
-   }
-
-   /**
 * Fetch revision comment if it's available to the specified audience.
 * If the specified audience does not have access to the comment, an
 * empty string will be returned.
@@ -947,17 +903,6 @@
} else {
return $this->mComment;
}
-   }
-
-   /**
-* Fetch revision comment without regard for the current user's 
permissions
-*
-* @return string
-* @deprecated since 1.25, use getComment( Revision::RAW )
-*/
-   public function getRawComment() {
-   wfDeprecated( __METHOD__, '1.25' );
-   return $this->getComment( self::RAW );
}
 
/**
@@ -1033,28 +978,6 @@
$this->loadMutableFields();
 
return (int)$this->mDeleted;
-   }
-
-   /**
-* Fetch revision text if it's available to the specified audience.
-* If the specified audience does not have the ability to view this
-* revision, an empty string will be returned.
-*
-* @param int $audience One of:
-*   Revision::FOR_PUBLIC   to be displayed to all users
-*   Revision::FOR_THIS_USERto be displayed to the given user
-*   Revision::RAW  get the text regardless of permissions
-* @p

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Removed deprecated class ImageGallery

2016-12-31 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329773 )

Change subject: Removed deprecated class ImageGallery
..

Removed deprecated class ImageGallery

Bug: T61113
Change-Id: If315002ef7d1a3937f150d0dda930976c1d95f57
---
M RELEASE-NOTES-1.29
M includes/gallery/TraditionalImageGallery.php
2 files changed, 2 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/329773/1

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 774254c..c519c32 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -147,6 +147,8 @@
 * User::getTemporaryPassword() (deprecated in 1.27) was removed.
 * User::isPasswordReminderThrottled() (deprecated in 1.27) was removed.
 * FSRepo (deprecated in 1.19) was removed.
+* Class ImageGallery (deprecated in 1.22) was removed.
+  Use ImageGalleryBase::factory instead.
 
 == Compatibility ==
 
diff --git a/includes/gallery/TraditionalImageGallery.php 
b/includes/gallery/TraditionalImageGallery.php
index 0f889da..1fd7b0a 100644
--- a/includes/gallery/TraditionalImageGallery.php
+++ b/includes/gallery/TraditionalImageGallery.php
@@ -348,17 +348,3 @@
protected function adjustImageParameters( $thumb, &$imageParameters ) {
}
 }
-
-/**
- * Backwards compatibility. This always uses traditional mode
- * if called the old way, for extensions that may expect traditional
- * mode.
- *
- * @deprecated since 1.22 Use ImageGalleryBase::factory instead.
- */
-class ImageGallery extends TraditionalImageGallery {
-   function __construct( $mode = 'traditional' ) {
-   wfDeprecated( __METHOD__, '1.22' );
-   parent::__construct( $mode );
-   }
-}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix wrong class names in comments

2016-12-31 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329776 )

Change subject: Fix wrong class names in comments
..

Fix wrong class names in comments

Change-Id: I2766e2ff3e64a84f52a5d7fa065bbc38280866c1
---
M includes/CategoryViewer.php
M includes/specials/pagers/NewFilesPager.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/329776/1

diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 4c4b8bb..facf847 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -67,7 +67,7 @@
/** @var Collation */
public $collation;
 
-   /** @var ImageGallery */
+   /** @var ImageGalleryBase */
public $gallery;
 
/** @var Category Category object for this page. */
diff --git a/includes/specials/pagers/NewFilesPager.php 
b/includes/specials/pagers/NewFilesPager.php
index 9f6c58c..e22b939 100644
--- a/includes/specials/pagers/NewFilesPager.php
+++ b/includes/specials/pagers/NewFilesPager.php
@@ -27,7 +27,7 @@
 class NewFilesPager extends ReverseChronologicalPager {
 
/**
-* @var ImageGallery
+* @var ImageGalleryBase
 */
protected $gallery;
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...intersection[master]: Remove deprecated usages of ImageGallery

2016-12-31 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329777 )

Change subject: Remove deprecated usages of ImageGallery
..

Remove deprecated usages of ImageGallery

This change is part of change 329773.

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


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

diff --git a/DynamicPageList.hooks.php b/DynamicPageList.hooks.php
index 85904b1..50e4788 100644
--- a/DynamicPageList.hooks.php
+++ b/DynamicPageList.hooks.php
@@ -142,7 +142,7 @@
switch ( $arg ) {
case 'gallery':
$useGallery = true;
-   $gallery = 
ImageGallery::factory();
+   $gallery = 
ImageGalleryBase::factory();
$gallery->setParser( 
$mwParser );
$startList = '';
$endList = '';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f9c01c1a253809d7270831674269df361366d35
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/intersection
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...MultiUpload[master]: Remove deprecated usages of ImageGallery

2016-12-31 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329778 )

Change subject: Remove deprecated usages of ImageGallery
..

Remove deprecated usages of ImageGallery

This change is part of change 329773.

Change-Id: I90a5beb7c7e7ac8889e5f226c5a3bb17a416ba14
---
M SpecialUpload.1.21.3.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/SpecialUpload.1.21.3.php b/SpecialUpload.1.21.3.php
index 2a3ff91..3bf6f0b 100644
--- a/SpecialUpload.1.21.3.php
+++ b/SpecialUpload.1.21.3.php
@@ -826,7 +826,7 @@
return '';
}
 
-   $gallery = new ImageGallery;
+   $gallery = new ImageGalleryBase::factory();
$gallery->setShowBytes( false );
foreach ( $dupes as $file ) {
$gallery->add( $file->getTitle() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90a5beb7c7e7ac8889e5f226c5a3bb17a416ba14
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultiUpload
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...SmoothGallery[master]: Remove deprecated usages of ImageGallery

2016-12-31 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329779 )

Change subject: Remove deprecated usages of ImageGallery
..

Remove deprecated usages of ImageGallery

This change is part of change 329773.

Change-Id: I063a211ba8860cfdf80672095afe6933ec1aab7f
---
M SmoothGalleryClass.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/SmoothGalleryClass.php b/SmoothGalleryClass.php
index 939ae42..4bc3df5 100644
--- a/SmoothGalleryClass.php
+++ b/SmoothGalleryClass.php
@@ -185,7 +185,7 @@
// Wrapper div for plain old gallery, to be shown per default, 
if JS is off.
$output = '';
 
-   $plain_gallery = new ImageGallery();
+   $plain_gallery = ImageGalleryBase::factory();
 
$i = 0;
foreach ( $galleryArray["images"] as $image ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I063a211ba8860cfdf80672095afe6933ec1aab7f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SmoothGallery
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Video[master]: Remove deprecated usages of ImageGallery

2016-12-31 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329781 )

Change subject: Remove deprecated usages of ImageGallery
..

Remove deprecated usages of ImageGallery

This change is part of change 329773.

Change-Id: I8d30486c550ac436057d04fa6a6832aee9d4fc9a
---
M VideoPage.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Video 
refs/changes/81/329781/1

diff --git a/VideoPage.php b/VideoPage.php
index e588755..dfe4d47 100644
--- a/VideoPage.php
+++ b/VideoPage.php
@@ -294,7 +294,7 @@
$this->children = array();
$this->children_start_char = array();
if ( $this->showGallery ) {
-   $this->gallery = new ImageGallery();
+   $this->gallery = ImageGalleryBase::factory();
}
#if ( $this->showVideoGallery ) {
$this->videogallery = new VideoGallery();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d30486c550ac436057d04fa6a6832aee9d4fc9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Video
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Update Maintenance scripts to use $this->requireExtension()

2017-01-01 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330060 )

Change subject: Update Maintenance scripts to use $this->requireExtension()
..

Update Maintenance scripts to use $this->requireExtension()

Bug: T152139
Change-Id: I987c75233c8c1d02b240c1f2644aacd43dfff252
---
M maintenance/GenerateFancyCaptchas.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/60/330060/1

diff --git a/maintenance/GenerateFancyCaptchas.php 
b/maintenance/GenerateFancyCaptchas.php
old mode 100644
new mode 100755
index 2ef07f2..44b11f2
--- a/maintenance/GenerateFancyCaptchas.php
+++ b/maintenance/GenerateFancyCaptchas.php
@@ -50,6 +50,8 @@
);
$this->addOption( "delete", "Delete the old captches" );
$this->mDescription = "Generate new captchas and move them into 
storage";
+
+   $this->requireExtension( "ConfirmEdit" );
}
 
public function execute() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I987c75233c8c1d02b240c1f2644aacd43dfff252
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Update Maintenance scripts to use $this->requireExtension()

2017-01-01 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330062 )

Change subject: Update Maintenance scripts to use $this->requireExtension()
..

Update Maintenance scripts to use $this->requireExtension()

Bug: T152139
Change-Id: Id350ea5d8919d792b6dfa78bd6a9718faa6cd06c
---
M maintenance/importCentralWikiLogs.php
M maintenance/migrateCentralWiki.php
M maintenance/testOAuthConsumer.php
3 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/62/330062/1

diff --git a/maintenance/importCentralWikiLogs.php 
b/maintenance/importCentralWikiLogs.php
index 30b1d96..8f38893 100644
--- a/maintenance/importCentralWikiLogs.php
+++ b/maintenance/importCentralWikiLogs.php
@@ -22,6 +22,7 @@
$this->mDescription = "Import central wiki logs to this wiki";
$this->addOption( 'old', 'Previous central wiki', true, true );
$this->setBatchSize( 200 );
+   $this->requireExtension( "OAuth" );
}
 
public function execute() {
diff --git a/maintenance/migrateCentralWiki.php 
b/maintenance/migrateCentralWiki.php
index 4cc237b..2b9ddfa 100644
--- a/maintenance/migrateCentralWiki.php
+++ b/maintenance/migrateCentralWiki.php
@@ -33,6 +33,7 @@
$this->addOption( 'target', 'New central wiki', true, true );
$this->addOption( 'table', 'Table name 
(oauth_registered_consumer or oauth_accepted_consumer)', true, true );
$this->setBatchSize( 200 );
+   $this->requireExtension( "OAuth" );
}
 
public function execute() {
diff --git a/maintenance/testOAuthConsumer.php 
b/maintenance/testOAuthConsumer.php
index 76c891f..8374d3d 100644
--- a/maintenance/testOAuthConsumer.php
+++ b/maintenance/testOAuthConsumer.php
@@ -25,6 +25,7 @@
);
$this->addOption( 'useSSL', 'Use SSL' );
$this->addOption( 'verbose', 'Verbose output (e.g. HTTP 
request/response headers)' );
+   $this->requireExtension( "OAuth" );
}
 
public function execute() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id350ea5d8919d792b6dfa78bd6a9718faa6cd06c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...TorBlock[master]: Update Maintenance scripts to use $this->requireExtension()

2017-01-01 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330063 )

Change subject: Update Maintenance scripts to use $this->requireExtension()
..

Update Maintenance scripts to use $this->requireExtension()

Bug: T152139
Change-Id: I1c0495a4dd581a7c3cf6bef61075cd653ed95733
---
M loadExitNodes.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/loadExitNodes.php b/loadExitNodes.php
index 959eb96..5ef8d3c 100644
--- a/loadExitNodes.php
+++ b/loadExitNodes.php
@@ -37,6 +37,7 @@
parent::__construct();
$this->mDescription = "Load the list of Tor exit nodes.";
$this->addOption( 'force', 'Force loading of exit nodes from 
the server rather than cache.' );
+   $this->requireExtension( "TorBlock" );
}
 
public function execute() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c0495a4dd581a7c3cf6bef61075cd653ed95733
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TorBlock
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Ids[master]: Add ability to configure the web service endpoint in the IDS...

2017-01-02 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330184 )

Change subject: Add ability to configure the web service endpoint in the IDS 
extension
..

Add ability to configure the web service endpoint in the IDS extension

Bug: T154043
Change-Id: I4b47c87465c5aef5a88ce73113cd687247caa4b9
---
M extension.json
M ids_body.php
2 files changed, 12 insertions(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index dc6ffa2..c48b8b4 100644
--- a/extension.json
+++ b/extension.json
@@ -20,5 +20,9 @@
"i18n"
]
},
+   "config": {
+   "@doc": "https://www.mediawiki.org/wiki/Extension:Ids";,
+   "IdsEndpoint": "https://tools.wmflabs.org/idsgen/";
+   },
"manifest_version": 1
 }
diff --git a/ids_body.php b/ids_body.php
index 76b5268..33931c0 100644
--- a/ids_body.php
+++ b/ids_body.php
@@ -1,4 +1,7 @@
 https://www.mediawiki.org/wiki/Manual:Tag_extensions
 */
static function idsRender( $input, array $args, Parser $parser, PPFrame 
$frame ) {
+   // Add ability to configure the web service endpoint in the IDS 
extension (T154043)
+   $config = MediaWikiServices::getInstance()->getConfigFactory()
+   ->makeConfig( 'ids' );
+
// Support for Simplified "體" (font)
$font = isset($args['font']) ? strtr($args['font'] , '体', '體') 
: '宋體';
-   $src = 'https://tools.wmflabs.org/idsgen/' . 
rawurlencode($input) . '.svg?字體=' . rawurlencode($font);
+   $src = $config->get( 'IdsEndpoint' ) . rawurlencode($input) . 
'.svg?字體=' . rawurlencode($font);
 
return Html::element('img', [
'align' => 'middle',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b47c87465c5aef5a88ce73113cd687247caa4b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ids
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add explanatory tooltips for Graph display icons

2017-01-03 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330259 )

Change subject: Add explanatory tooltips for Graph display icons
..

Add explanatory tooltips for Graph display icons

The buttons display now tooltips with text explaining what they do.
Also, the following new i18n messages has been added:
* wdqs-app-button-clear-title
* wdqs-app-button-display-title
* wdqs-app-button-download-title
* wdqs-app-button-link-title

Bug: T137319
Change-Id: Idf3c53ba2e7b7516863907a8b599c8ddd8d837a7
---
M i18n/en.json
M i18n/qqq.json
M index.html
M wikibase/queryService/ui/App.js
4 files changed, 45 insertions(+), 29 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 368e925..5d17bf6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -13,9 +13,13 @@
 "wdqs-app-button-run": "Run",
 "wdqs-app-button-run-title": "Execute query ( + )",
 "wdqs-app-button-clear": "Clear",
+"wdqs-app-button-clear-title": "Clear query",
 "wdqs-app-button-display": "Display",
+"wdqs-app-button-display-title": "Display result as table, image, ...",
 "wdqs-app-button-download": "Download",
+"wdqs-app-button-download-title": "Download result",
 "wdqs-app-button-link": "Link",
+"wdqs-app-button-link-title": "Get link to query",
 "wdqs-app-help-feedback": "Give Feedback!",
 "wdqs-app-help-request-query": "Request a query",
 "wdqs-app-help-portal": "Help Portal",
@@ -53,4 +57,4 @@
 "wdqs-action-server-error": "Server error",
 "wdqs-action-unknow-error": "Unknown error",
 "wdqs-result-map-layers-all": "All layers"
-}
\ No newline at end of file
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bf7c039..8a4e756 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -15,9 +15,13 @@
"wdqs-app-button-run": "Button to run SPARQL query\n{{Identical|Run}}",
"wdqs-app-button-run-title": "Title for button to run SPARQL query",
"wdqs-app-button-clear": "Button to clear SPARQL query 
editor\n{{Identical|Clear}}",
+   "wdqs-app-button-clear-title": "Title for button to clear SPARQL query 
editor",
"wdqs-app-button-display": "Button display result as table, image, 
...\n{{Identical|Display}}",
+   "wdqs-app-button-display-title": "Title for button display result as 
table, image, ...",
"wdqs-app-button-download": "Button download 
result\n{{Identical|Download}}",
+   "wdqs-app-button-download-title": "Title for button download result",
"wdqs-app-button-link": "Button get link to query\n{{Identical|Link}}",
+   "wdqs-app-button-link-title": "Title for button get link to query",
"wdqs-app-help-feedback": "Button message in help dropdown",
"wdqs-app-help-request-query": "Button message in help dropdown",
"wdqs-app-help-portal": "Button message in help dropdown",
diff --git a/index.html b/index.html
index 3bcd618..2fb8e48 100644
--- a/index.html
+++ b/index.html
@@ -102,18 +102,16 @@
 
 
 
-   
-   
+ 
 
-
   



-   
+   
 

-   
+   



@@ -121,31 +119,36 @@



-   
-   
-   
-   

-   
-   
-   
-   JSON
-   Full JSON
-   
-

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fix broken link dropdown button

2017-01-06 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330873 )

Change subject: Fix broken link dropdown button
..

Fix broken link dropdown button

When hovering over the link dropdown button in the toolbar,
the cursor won't switch to hand because there is no link.

Change-Id: Ib490e658cbed23d8058e1d7ec22848c5ec9b37fd
---
M index.html
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/index.html b/index.html
index 3a9a340..00ea1e7 100644
--- a/index.html
+++ b/index.html
@@ -138,7 +138,7 @@
CSV


-   
+   

  
  

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib490e658cbed23d8058e1d7ec22848c5ec9b37fd
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add a new {{PAGELANGUAGE}} variable for use in wikitext

2017-01-06 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330982 )

Change subject: Add a new {{PAGELANGUAGE}} variable for use in wikitext
..

Add a new {{PAGELANGUAGE}} variable for use in wikitext

Returns the language code of the page being parsed.

Bug: T59603
Change-Id: I229edd6251cf1120b3395d1811dbb9d96d9cd8ee
---
M RELEASE-NOTES-1.29
M includes/MagicWord.php
M includes/parser/Parser.php
3 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/330982/1

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index b886738..a226ba1 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -39,6 +39,7 @@
   downloading the XML dump during a transwiki import in seconds.
 * Parser limit report is now available in machine-readable format to JavaScript
   via mw.config.get('wgPageParseReport').
+* (T59603) New magic word {{PAGELANGUAGE}} which returns the language code of 
the page being parsed.
 
 === External library changes in 1.29 ===
 
diff --git a/includes/MagicWord.php b/includes/MagicWord.php
index 391e05a..5968e87 100644
--- a/includes/MagicWord.php
+++ b/includes/MagicWord.php
@@ -169,6 +169,7 @@
'localtimestamp',
'directionmark',
'contentlanguage',
+   'pagelanguage',
'numberofadmins',
'cascadingsources',
];
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 157946c..79fc172 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2812,6 +2812,9 @@
case 'contentlanguage':
global $wgLanguageCode;
return $wgLanguageCode;
+   case 'pagelanguage':
+   $value = $pageLang->getCode();
+   break;
case 'cascadingsources':
$value = CoreParserFunctions::cascadingsources( 
$this );
break;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Don't show the back to top icon in iOS

2017-01-07 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331158 )

Change subject: Don't show the back to top icon in iOS
..

Don't show the back to top icon in iOS

Follows-up I355175e4d6017a0120118b28b8c35d78ccd4a82a.

Bug: T141598
Change-Id: Id314ca2acd040daa0e268b7d8389512014831aa2
---
M resources/skins.minerva.backtotop/init.js
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/58/331158/1

diff --git a/resources/skins.minerva.backtotop/init.js 
b/resources/skins.minerva.backtotop/init.js
index 3c2efff..d953db6 100644
--- a/resources/skins.minerva.backtotop/init.js
+++ b/resources/skins.minerva.backtotop/init.js
@@ -1,4 +1,10 @@
 ( function ( M, $ ) {
+   // check if browser user agent is iOS (T141598)
+   var browser = M.require('mobile.browser/browser').getSingleton();
+   if (browser.isIos()) {
+   return;
+   }
+
var BackToTopOverlay = M.require( 'mobile.backtotop/BackToTopOverlay' ),
backtotop = new BackToTopOverlay();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id314ca2acd040daa0e268b7d8389512014831aa2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix inconsistent capitalisation for link labels in EditWatch...

2017-01-09 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331369 )

Change subject: Fix inconsistent capitalisation for link labels in EditWatchlist
..

Fix inconsistent capitalisation for link labels in EditWatchlist

This patch adds a uncapitalized version of 'history_short' message.

Bug: T151166
Change-Id: Ifecad060abfd3567952e2d0f41115c03f67751c1
---
M includes/specials/SpecialEditWatchlist.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/331369/1

diff --git a/includes/specials/SpecialEditWatchlist.php 
b/includes/specials/SpecialEditWatchlist.php
index 347f0c0..b447271 100644
--- a/includes/specials/SpecialEditWatchlist.php
+++ b/includes/specials/SpecialEditWatchlist.php
@@ -629,7 +629,7 @@
if ( $title->exists() ) {
$tools['history'] = $linkRenderer->makeKnownLink(
$title,
-   $this->msg( 'history_short' )->text(),
+   $this->msg( 'history_small' )->text(),
[],
[ 'action' => 'history' ]
);
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index a621f1c..3e88216 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -173,6 +173,7 @@
"searcharticle": "Go",
"history": "Page history",
"history_short": "History",
+   "history_small": "history",
"updatedmarker": "updated since my last visit",
"printableversion": "Printable version",
"permalink": "Permanent link",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index da43aef..4e04f90 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -358,6 +358,7 @@
"searcharticle": "Button description in the search menu displayed on 
every page. The \"Search\" button is 
{{msg-mw|Searchbutton}}.\n{{Identical|Go}}",
"history": "{{Identical|Page history}}",
"history_short": "Text used on the history 
tab.\n\n{{Identical|History}}",
+   "history_small": "Uncapitalized version of {{msg-mw|History 
short}}.\n\n{{Identical|History}}",
"updatedmarker": "Displayed in the page history (of a page you are 
[[Special:Watchlist|watching]]), when the page has been edited since the last 
time you visited it. This feature is used if 
[[mw:Manual:$wgShowUpdatedMarker|$wgShowUpdatedMarker]] is enabled.",
"printableversion": "Display name for link in wiki menu that leads to a 
printable version of a content page. Example: see one but last menu item on 
[[Main Page]].\n\nSee also:\n* {{msg-mw|Printableversion}}\n* 
{{msg-mw|Accesskey-t-print}}\n* 
{{msg-mw|Tooltip-t-print}}\n{{Identical|Printable version}}",
"permalink": "Display name for a permanent link to the current revision 
of a page. When the page is edited, permalink will still link to this revision. 
Example: Last menu link on [[{{MediaWiki:Mainpage}}]]\n\nSee also:\n* 
{{msg-mw|Permalink}}\n* {{msg-mw|Accesskey-t-permalink}}\n* 
{{msg-mw|Tooltip-t-permalink}}\n{{Identical|Permalink}}",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Wrong message-key used in NewsletterDiffEngine.php

2016-12-21 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328563 )

Change subject: Wrong message-key used in NewsletterDiffEngine.php
..

Wrong message-key used in NewsletterDiffEngine.php

Adds following missing diff i18n messages:
* newsletter-diff-descheader
* newsletter-diff-mainpageheader
* newsletter-diff-publishersheader

Bug: T153530
Change-Id: Iafa1ee7da21fed932d7be3b044313dae67c44663
---
M i18n/en.json
M i18n/qqq.json
M includes/content/NewsletterDiffEngine.php
3 files changed, 15 insertions(+), 7 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
old mode 100755
new mode 100644
index 21a59d1..71ff0f0
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,7 +3,8 @@
"authors": [
"Tina Johnson",
"Thomas Arrow",
-   "Glaisher"
+   "Glaisher",
+   "Divadsn"
]
},
"newsletter-extension-desc": "Enables users to publish and subscribe to 
newsletters",
@@ -145,5 +146,8 @@
"log-action-filter-newsletter-newsletter-added": "Newsletter creation",
"log-action-filter-newsletter-newsletter-removed": "Newsletter 
deletion",
"log-action-filter-newsletter-issue-added": "New issue announcements",
-   "newsletter-restore-failure": "\"$1\" newsletter could not be restored. 
Please try again."
+   "newsletter-restore-failure": "\"$1\" newsletter could not be restored. 
Please try again.",
+   "newsletter-diff-descheader": "Changes in the description:",
+   "newsletter-diff-mainpageheader": "Changes in Main Page:",
+   "newsletter-diff-publishersheader": "Changes in publishers:"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 6e2da62..41173b1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -10,7 +10,8 @@
"Umherirrender",
"Verdy p",
"Amire80",
-   "Base"
+   "Base",
+   "Divadsn"
]
},
"newsletter-extension-desc": "Description of the extension",
@@ -152,5 +153,8 @@
"log-action-filter-newsletter-newsletter-added": 
"{{doc-log-action-filter-action|newsletter|newsletter-added}}",
"log-action-filter-newsletter-newsletter-removed": 
"{{doc-log-action-filter-action|newsletter|newsletter-removed}}",
"log-action-filter-newsletter-issue-added": 
"{{doc-log-action-filter-action|newsletter|issue-added}}",
-   "newsletter-restore-failure": "Error message shown on 
title=Special:Undelete&target=Newsletter:&action=submit when the 
newsletter restoration fails.\n\nParameters:\n* $1 - Newsletter name"
+   "newsletter-restore-failure": "Error message shown on 
title=Special:Undelete&target=Newsletter:&action=submit when the 
newsletter restoration fails.\n\nParameters:\n* $1 - Newsletter name",
+   "newsletter-diff-descheader": "Header for the diff of the description 
between two revisions",
+   "newsletter-diff-mainpageheader": "Header for the diff of Main Page 
between two revisions",
+   "newsletter-diff-publishersheader": "Header for the diff of publishers 
between two revisions"
 }
diff --git a/includes/content/NewsletterDiffEngine.php 
b/includes/content/NewsletterDiffEngine.php
index 939c81d..ddad524 100644
--- a/includes/content/NewsletterDiffEngine.php
+++ b/includes/content/NewsletterDiffEngine.php
@@ -51,9 +51,9 @@
if ( trim( $publishersDiff ) !== '' ) {
$output .= Html::openElement( 'tr' );
$output .= Html::openElement( 'td',
-   [ 'colspan' => 4, 'id' => 
'mw-massmessage-diffpublishersheader' ] );
+   [ 'colspan' => 4, 'id' => 
'mw-newsletter-diffpublishersheader' ] );
$output .= Html::element( 'h4', [],
-   $this->msg( 'massmessage-diff-publishersheader' 
)->text() );
+   $this->msg( 'newsletter-diff-publishersheader' 
)->text() );
$output .= Html::closeElement( 'td' );
$output .= Html::closeElement( 'tr' );
$output .= $publishersDiff;
@@ -61,4 +61,4 @@
 
return $output;
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafa1ee7da21fed932d7be3b044313dae67c44663
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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

[MediaWiki-commits] [Gerrit] mediawiki...Configure[master]: The Configure extension misses API i18n messages

2016-12-21 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328589 )

Change subject: The Configure extension misses API i18n messages
..

The Configure extension misses API i18n messages

Adds following missing api i18n messages:
* apihelp-configure-description
* apihelp-configure-param-prop
* apihelp-configure-param-prop-versionlist
* apihelp-configure-param-prop-wikilist
* apihelp-configure-param-prop-settings
* apihelp-configure-param-prop-extensions
* apihelp-configure-param-prop-ajax
* apihelp-configure-param-version
* apihelp-configure-param-wiki
* apihelp-configure-param-group
* apihelp-configure-param-ajaxgroup
* apihelp-configure-param-ajaxsetting

Bug: T153585
Change-Id: Ia2c7c0565835b2814fce27537c3e542c57cc1adf
---
M Configure.api.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 56 insertions(+), 76 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Configure 
refs/changes/89/328589/1

diff --git a/Configure.api.php b/Configure.api.php
index 2346335..1160b32 100644
--- a/Configure.api.php
+++ b/Configure.api.php
@@ -380,79 +380,32 @@
}
 
protected function getAllowedParams() {
-   global $wgConfigureAPI;
-
-   if ( $wgConfigureAPI ) {
-   return array(
-   'prop' => array(
-   ApiBase::PARAM_ISMULTI => true,
-   ApiBase::PARAM_TYPE => array(
-   'versionlist',
-   'wikilist',
-   'settings',
-   'extensions',
-   'ajax',
-   ),
-   ApiBase::PARAM_DFLT => 
'versionlist|wikilist',
-   ),
-   'version' => null,
-   'wiki' => null,
-   'group' => false,
-   'ajaxgroup' => null,
-   'ajaxsetting' => null,
-   );
-   } else {
-   return array(
-   'prop' => array(
-   ApiBase::PARAM_ISMULTI => true,
-   ApiBase::PARAM_TYPE => array(
-   'ajax',
-   ),
-   ),
-   'ajaxgroup' => null,
-   'ajaxsetting' => null,
-   );
-   }
-   }
-
-   protected function getParamDescription() {
-   global $wgConfigureAPI;
-
-   if ( $wgConfigureAPI ) {
-   return array(
-   'prop' => array(
-   'Which information to get:',
-   '- versionlist: Get the list of old 
configurations',
-   '- wikilist:Get the list the wikis 
to configuration',
-   '- settings:Get settings of a 
specific version',
-   '- extensions:  List of installed 
extensions',
-   '- ajax:Get part of the html 
form on Special:Configure (for internal use)',
-   ),
-   'version' => 'Version to get settings from',
-   'wiki' => 'Wiki to get settings from (default: 
current wiki)',
-   'group' => 'Whether to group settings',
-   'ajaxgroup' => 'for prop=ajax, new group name',
-   'ajaxsetting' =>'for prop=ajax, setting name',
-   );
-   } else {
-   return array(
-   'prop' => array(
-   'Which information to get:',
-   '- ajax:Get part of the html 
form on Special:Configure (for internal use)',
-   ),
-   'ajaxgroup' => 'for prop=ajax, new group name',
-   'ajaxsetting' =>'for prop=ajax, setting name',
-   );
-   }
-   }
-
-   protected function getDescription() {
-   return 'Configure extension\'s API module';
-   }
-
-   protected function getExamples() {
return array(
-   'api.php?action=configure',
+   'prop' => array(
+   ApiBase::PAR

[MediaWiki-commits] [Gerrit] mediawiki...Configure[master]: The Configure extension misses API i18n messages

2016-12-21 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328594 )

Change subject: The Configure extension misses API i18n messages
..

The Configure extension misses API i18n messages

Adds following missing api i18n messages:
* apihelp-configure-description
* apihelp-configure-param-prop
* apihelp-configure-param-prop-versionlist
* apihelp-configure-param-prop-wikilist
* apihelp-configure-param-prop-settings
* apihelp-configure-param-prop-extensions
* apihelp-configure-param-prop-ajax
* apihelp-configure-param-version
* apihelp-configure-param-wiki
* apihelp-configure-param-group
* apihelp-configure-param-ajaxgroup
* apihelp-configure-param-ajaxsetting

Bug: T153585
Change-Id: Iec016e11e762d12010aeaefa376a471db3376fed
---
M Configure.api.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 47 insertions(+), 76 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Configure 
refs/changes/94/328594/1

diff --git a/Configure.api.php b/Configure.api.php
index 2346335..a762651 100644
--- a/Configure.api.php
+++ b/Configure.api.php
@@ -380,79 +380,23 @@
}
 
protected function getAllowedParams() {
-   global $wgConfigureAPI;
-
-   if ( $wgConfigureAPI ) {
-   return array(
-   'prop' => array(
-   ApiBase::PARAM_ISMULTI => true,
-   ApiBase::PARAM_TYPE => array(
-   'versionlist',
-   'wikilist',
-   'settings',
-   'extensions',
-   'ajax',
-   ),
-   ApiBase::PARAM_DFLT => 
'versionlist|wikilist',
-   ),
-   'version' => null,
-   'wiki' => null,
-   'group' => false,
-   'ajaxgroup' => null,
-   'ajaxsetting' => null,
-   );
-   } else {
-   return array(
-   'prop' => array(
-   ApiBase::PARAM_ISMULTI => true,
-   ApiBase::PARAM_TYPE => array(
-   'ajax',
-   ),
-   ),
-   'ajaxgroup' => null,
-   'ajaxsetting' => null,
-   );
-   }
-   }
-
-   protected function getParamDescription() {
-   global $wgConfigureAPI;
-
-   if ( $wgConfigureAPI ) {
-   return array(
-   'prop' => array(
-   'Which information to get:',
-   '- versionlist: Get the list of old 
configurations',
-   '- wikilist:Get the list the wikis 
to configuration',
-   '- settings:Get settings of a 
specific version',
-   '- extensions:  List of installed 
extensions',
-   '- ajax:Get part of the html 
form on Special:Configure (for internal use)',
-   ),
-   'version' => 'Version to get settings from',
-   'wiki' => 'Wiki to get settings from (default: 
current wiki)',
-   'group' => 'Whether to group settings',
-   'ajaxgroup' => 'for prop=ajax, new group name',
-   'ajaxsetting' =>'for prop=ajax, setting name',
-   );
-   } else {
-   return array(
-   'prop' => array(
-   'Which information to get:',
-   '- ajax:Get part of the html 
form on Special:Configure (for internal use)',
-   ),
-   'ajaxgroup' => 'for prop=ajax, new group name',
-   'ajaxsetting' =>'for prop=ajax, setting name',
-   );
-   }
-   }
-
-   protected function getDescription() {
-   return 'Configure extension\'s API module';
-   }
-
-   protected function getExamples() {
return array(
-   'api.php?action=configure',
+   'prop' => array(
+   ApiBase::PAR

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add id attribute to error message "mw-error-cannotundelete"

2016-12-23 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328943 )

Change subject: Add id attribute to error message "mw-error-cannotundelete"
..

Add id attribute to error message "mw-error-cannotundelete"

Bug: T20819
Change-Id: I65c241506d53ced2e714f3f6d431c2005263a1c0
---
M includes/specials/SpecialUndelete.php
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/328943/1

diff --git a/includes/specials/SpecialUndelete.php 
b/includes/specials/SpecialUndelete.php
old mode 100644
new mode 100755
index 04f5be4..eb33346
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -1806,11 +1806,8 @@
// Show revision undeletion warnings and errors
$status = $archive->getRevisionStatus();
if ( $status && !$status->isGood() ) {
-   $out->addWikiText( '' .
-   $status->getWikiText(
-   'cannotundelete',
-   'cannotundelete'
-   ) . ''
+   $out->wrapWikiMsg( "\n$1\n",
+   'cannotundelete'
);
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace &$this with $this in MediaWiki/core hook system

2016-12-25 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329199 )

Change subject: Replace &$this with $this in MediaWiki/core hook system
..

Replace &$this with $this in MediaWiki/core hook system

Bug: T153505
Change-Id: Ie287adf8b1d384aa651c659a9d385877379a0f11
---
M includes/page/Article.php
M includes/page/CategoryPage.php
M includes/page/ImagePage.php
M includes/page/WikiPage.php
4 files changed, 40 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/329199/1

diff --git a/includes/page/Article.php b/includes/page/Article.php
index cc3ef26..c180ca0 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -345,11 +345,14 @@
return false;
}
 
+   // Use of &$this in hooks triggers warnings in PHP 7.1, see 
T153505
+   $articlePage = $this;
+
// @todo Get rid of mContent everywhere!
$this->mContent = ContentHandler::getContentText( $content );
ContentHandler::runLegacyHooks(
'ArticleAfterFetchContent',
-   [ &$this, &$this->mContent ],
+   [ &$articlePage, &$articlePage->mContent ],
'1.21'
);
 
@@ -428,9 +431,12 @@
$this->mContentObject = $content;
$this->mRevIdFetched = $this->mRevision->getId();
 
+   // Use of &$this in hooks triggers warnings in PHP 7.1, see 
T153505
+   $articlePage = $this;
+
ContentHandler::runLegacyHooks(
'ArticleAfterFetchContentObject',
-   [ &$this, &$this->mContentObject ],
+   [ &$articlePage, &$articlePage->mContentObject ],
'1.21'
);
 
@@ -565,7 +571,9 @@
while ( !$outputDone && ++$pass ) {
switch ( $pass ) {
case 1:
-   Hooks::run( 'ArticleViewHeader', [ 
&$this, &$outputDone, &$useParserCache ] );
+   // Use of &$this in hooks triggers 
warnings in PHP 7.1, see T153505
+   $articlePage = $this;
+   Hooks::run( 'ArticleViewHeader', [ 
&$articlePage, &$outputDone, &$useParserCache ] );
break;
case 2:
# Early abort if the page doesn't exist
@@ -904,9 +912,12 @@
$redirectTargetUrl = $this->getTitle()->getLinkURL( $query );
 
if ( isset( $this->mRedirectedFrom ) ) {
+   // Use of &$this in hooks triggers warnings in PHP 7.1, 
see T153505
+   $articlePage = $this;
+
// This is an internally redirected page view.
// We'll need a backlink to the source page for 
navigation.
-   if ( Hooks::run( 'ArticleViewRedirect', [ &$this ] ) ) {
+   if ( Hooks::run( 'ArticleViewRedirect', [ &$articlePage 
] ) ) {
$redir = Linker::linkKnown(
$this->mRedirectedFrom,
null,
@@ -1336,7 +1347,10 @@
 * @param int $oldid Revision ID of this article revision
 */
public function setOldSubtitle( $oldid = 0 ) {
-   if ( !Hooks::run( 'DisplayOldSubtitle', [ &$this, &$oldid ] ) ) 
{
+   // Use of &$this in hooks triggers warnings in PHP 7.1, see 
T153505
+   $articlePage = $this;
+
+   if ( !Hooks::run( 'DisplayOldSubtitle', [ &$articlePage, 
&$oldid ] ) ) {
return;
}
 
@@ -1899,7 +1913,9 @@
&& !$this->mRedirectedFrom && 
!$this->getTitle()->isRedirect();
// Extension may have reason to disable file caching on 
some pages.
if ( $cacheable ) {
-   $cacheable = Hooks::run( 'IsFileCacheable', [ 
&$this ] );
+   // Use of &$this in hooks triggers warnings in 
PHP 7.1, see T153505
+   $articlePage = $this;
+   $cacheable = Hooks::run( 'IsFileCacheable', [ 
&$articlePage ] );
}
}
 
diff --git a/includes/page/CategoryPage.php b/includes/page/CategoryPage.php
index 6d2be51..2ec8b20 100644
--- a/includes/page/CategoryPage.php
+++ b/includes/page/CategoryPage.php
@@ -54,7 +54,10 @@
return;
}
 
-   if ( !Hooks::run( 'CategoryPageView', [ &$this ] ) ) {
+   // Use of &$this in ho

[MediaWiki-commits] [Gerrit] mediawiki...ApprovedRevs[master]: Replace Linker::link() with LinkRenderer

2017-01-09 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331448 )

Change subject: Replace Linker::link() with LinkRenderer
..

Replace Linker::link() with LinkRenderer

Bug: T149346
Change-Id: Ieee96d2b8bd97b53061085a483d916974a37e2cf
---
M ApprovedRevs.hooks.php
M SpecialApprovedRevsPage.php
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApprovedRevs 
refs/changes/48/331448/1

diff --git a/ApprovedRevs.hooks.php b/ApprovedRevs.hooks.php
index 4abb6fb..e541609 100644
--- a/ApprovedRevs.hooks.php
+++ b/ApprovedRevs.hooks.php
@@ -1,5 +1,7 @@
 parse();
 
-   $text .= ' ' . Linker::link(
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+   $text .= ' ' . $linkRenderer->makeLink(
$title,
wfMessage( 'approvedrevs-viewlatestrev' 
)->parse(),
array(),
diff --git a/SpecialApprovedRevsPage.php b/SpecialApprovedRevsPage.php
index 7ffaec3..f45dff5 100644
--- a/SpecialApprovedRevsPage.php
+++ b/SpecialApprovedRevsPage.php
@@ -196,7 +196,7 @@
return false;
}
 
-   $pageLink = Linker::link( $title );
+   $pageLink = $this->getLinkRenderer()->makeLink( $title );
 
if ( $this->mMode == 'unapproved' ) {
global $egApprovedRevsShowApproveLatest;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieee96d2b8bd97b53061085a483d916974a37e2cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleRatings[master]: Replace Linker::link() with LinkRenderer

2017-01-10 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331449 )

Change subject: Replace Linker::link() with LinkRenderer
..

Replace Linker::link() with LinkRenderer

Bug: T149346
Change-Id: I696e770c9fa04197eae07cfc19dbcf28e88a73e3
---
M SpecialMassRatings.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleRatings 
refs/changes/49/331449/1

diff --git a/SpecialMassRatings.php b/SpecialMassRatings.php
index 452ff3b..f191176 100644
--- a/SpecialMassRatings.php
+++ b/SpecialMassRatings.php
@@ -79,7 +79,7 @@
return false;
}
 
-   $link = Linker::link( $title );
+   $link = $this->getLinkRenderer()->makeLink( $title );
 
return $pic . $label . ' - ' . $link;
}
@@ -102,4 +102,4 @@
 
return $params;
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I696e770c9fa04197eae07cfc19dbcf28e88a73e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleRatings
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...CleanChanges[master]: Replace Linker::link() with LinkRenderer

2017-01-10 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331450 )

Change subject: Replace Linker::link() with LinkRenderer
..

Replace Linker::link() with LinkRenderer

Bug: T149346
Change-Id: Id76d2a26ded98db02a40d54b97f58e42e1efe3a0
---
M CleanChanges_body.php
1 file changed, 21 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CleanChanges 
refs/changes/50/331450/1

diff --git a/CleanChanges_body.php b/CleanChanges_body.php
index 1cc51c0..52f26c2 100644
--- a/CleanChanges_body.php
+++ b/CleanChanges_body.php
@@ -1,5 +1,7 @@
 getName()->escaped();
$titleObj = SpecialPage::getTitleFor( 'Log', $logtype );
-   $link = Linker::link( $titleObj, $logname );
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+   $link = $linkRenderer->makeLink( $titleObj, $logname );
return $this->msg( 'parentheses' )->rawParams( $link 
)->escaped();
}
 
@@ -138,19 +141,20 @@
# Should patrol-related stuff be shown?
$rc->unpatrolled = $this->showAsUnpatrolled( $rc );
 
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
$logEntry = $this->isLog( $rc );
if ( $logEntry ) {
$clink = $this->getLogTitle( $rc );
} elseif ( $rc->unpatrolled && $rc->getAttribute( 'rc_type' ) 
== RC_NEW ) {
# Unpatrolled new page, give rc_id in query
-   $clink = linker::linkKnown(
+   $clink = $linkRenderer->makeKnownLink(
$titleObj,
null,
[],
[ 'rcid' => $rc_id ]
);
} else {
-   $clink = Linker::linkKnown( $titleObj );
+   $clink = $linkRenderer->makeKnownLink( $titleObj );
}
 
$rc->watched   = $watched;
@@ -230,21 +234,22 @@
'rcid'  => $rc->unpatrolled ? 
$rc->getAttribute( 'rc_id' ) : '',
] + $rc->_reqCurId;
 
-   $rc->_curLink = Linker::linkKnown( $rc->getTitle(),
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+   $rc->_curLink = $linkRenderer->makeKnownLink( 
$rc->getTitle(),
$this->message['cur'], [], $querycur );
 
if ( $rc->getAttribute( 'rc_type' ) != RC_NEW ) {
-   $rc->_diffLink = Linker::linkKnown( 
$rc->getTitle(),
+   $rc->_diffLink = $linkRenderer->makeKnownLink( 
$rc->getTitle(),
$this->message['diff'], [], $querydiff 
);
}
 
if ( $rc->getAttribute( 'rc_last_oldid' ) != 0 ) {
// This is not the first revision
-   $rc->_lastLink = Linker::linkKnown( 
$rc->getTitle(),
+   $rc->_lastLink = $linkRenderer->makeKnownLink( 
$rc->getTitle(),
$this->message['last'], [], $querydiff 
);
}
 
-   $rc->_histLink = Linker::link( $rc->getTitle(),
+   $rc->_histLink = $linkRenderer->makeLink( 
$rc->getTitle(),
$this->message['hist'], [],
$rc->_reqCurId + [ 'action' => 'history' ]
);
@@ -304,6 +309,7 @@
# Article link
$items[] = $block[0]->link;
 
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
$log = $this->isLog( $block[0] );
if ( !$log ) {
# Changes
@@ -314,7 +320,7 @@
}
 
if ( !$isnew ) {
-   $changes = Linker::linkKnown(
+   $changes = $linkRenderer->makeKnownLink(
$block[0]->getTitle(),
$nchanges[$n],
[],
@@ -405,6 +411,8 @@
 * @return string
 */
protected function subEntries( array $block ) {
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+
$lines = '';
foreach ( $block as $rcObj ) {
$items = [];
@@ -412,7 +420,7 @@
 
$time = $rcObj->timestamp;
if ( !$log ) {
-   $time = Linker::linkKnown(
+   $time 

[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Replace Linker::link() with LinkRenderer

2017-01-10 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331507 )

Change subject: Replace Linker::link() with LinkRenderer
..

Replace Linker::link() with LinkRenderer

Bug: T149346
Change-Id: If1845b2df7d114f7dc66cc7b10c5d53484cdc82a
---
M specials/SpecialCheckUser.php
M specials/SpecialCheckUserLog.php
2 files changed, 17 insertions(+), 18 deletions(-)


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

diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php
index 54d823e..a34b231 100644
--- a/specials/SpecialCheckUser.php
+++ b/specials/SpecialCheckUser.php
@@ -24,9 +24,9 @@
$request = $this->getRequest();
 
if ( $this->getUser()->isAllowed( 'checkuser-log' ) ) {
-   $subtitleLink = Linker::linkKnown(
+   $subtitleLink = $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'CheckUserLog' ),
-   $this->msg( 'checkuser-showlog' )->escaped()
+   $this->msg( 'checkuser-showlog' )->text()
);
$out->addSubtitle( $subtitleLink );
}
@@ -522,9 +522,9 @@
]
);
$s .= ' ' . $this->msg( 'parentheses' 
)->rawParams(
-   Linker::linkKnown(
+   
$this->getLinkRenderer()->makeKnownLink(

SpecialPage::getTitleFor( 'Block', $ip ),
-   $this->msg( 'blocklink' 
)->escaped()
+   $this->msg( 'blocklink' 
)->text()
)
)->escaped();
$s .= ' ' . $this->getTimeRangeString( 
$ips_first[$ip], $ips_last[$ip] ) . ' ';
@@ -575,17 +575,17 @@
 */
protected function getBlockFlag( Block $block ) {
if ( $block->getType() == Block::TYPE_AUTO ) {
-   $ret = Linker::linkKnown(
+   $ret = $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'BlockList' ),
-   $this->msg( 'checkuser-blocked' )->escaped(),
+   $this->msg( 'checkuser-blocked' )->text(),
[],
[ 'wpTarget' => "#{$block->getId()}" ]
);
} else {
$userPage = Title::makeTitle( NS_USER, 
$block->getTarget() );
-   $ret = Linker::linkKnown(
+   $ret = $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Log' ),
-   $this->msg( 'checkuser-blocked' )->escaped(),
+   $this->msg( 'checkuser-blocked' )->text(),
[],
[
'type' => 'block',
@@ -1206,9 +1206,9 @@
if ( $title === null ) {
$title = $this->getPageTitle();
}
-   return Linker::linkKnown(
+   return $this->getLinkRenderer()->makeKnownLink(
$title,
-   htmlspecialchars( $text ),
+   $text,
[],
$params
);
@@ -1233,9 +1233,9 @@
} elseif ( self::userWasBlocked( $user->getName() ) ) {
// Previously blocked
$userpage = $user->getUserPage();
-   $blocklog = Linker::linkKnown(
+   $blocklog = $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Log' ),
-   $this->msg( 'checkuser-wasblocked' )->escaped(),
+   $this->msg( 'checkuser-wasblocked' )->text(),
[],
[
'type' => 'block',
@@ -1398,7 +1398,7 @@
if ( $row->cuc_type == RC_LOG ) {
$title = Title::makeTitle( $row->cuc_namespace, 
$row->cuc_title );
// @todo FIXME: Hard coded parentheses.
-   $links['log'] = '(' . Linker::linkKnown(
+   $links['log'] = '(' . 
$this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Log' ),

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Replace assertRaises with assertRaisesRegex in http_tests.py

2017-01-11 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331601 )

Change subject: Replace assertRaises with assertRaisesRegex in http_tests.py
..

Replace assertRaises with assertRaisesRegex in http_tests.py

Bug: T154281
Change-Id: I87707d58bab07886e8b35cb1030563df841c9844
---
M tests/http_tests.py
1 file changed, 10 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/01/331601/1

diff --git a/tests/http_tests.py b/tests/http_tests.py
index ca90f76..ebbfe56 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -133,18 +133,19 @@
 
 """HTTPS certificate test."""
 
+CERT_VERIFY_FAILED_RE = 'SSL 
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed'
 hostname = 'testssl-expire-r2i2.disig.sk'
 
 def test_https_cert_error(self):
 """Test if http.fetch respects disable_ssl_certificate_validation."""
-self.assertRaises(pywikibot.FatalServerError,
+self.assertRaisesRegex(pywikibot.FatalServerError, 
self.CERT_VERIFY_FAILED_RE,
   http.fetch,
   
uri='https://testssl-expire-r2i2.disig.sk/index.en.html')
 http.session.close()  # clear the connection
 
 with warnings.catch_warnings(record=True) as warning_log:
 response = http.fetch(
-uri='https://testssl-expire-r2i2.disig.sk/index.en.html',
+
uri='https://testssl-expire-r2i2.disig.sk/assertRaisesRegex(index.en.html',
 disable_ssl_certificate_validation=True)
 r = response.content
 self.assertIsInstance(r, unicode)
@@ -152,7 +153,7 @@
 http.session.close()  # clear the connection
 
 # Verify that it now fails again
-self.assertRaises(pywikibot.FatalServerError,
+self.assertRaisesRegex(pywikibot.FatalServerError, 
self.CERT_VERIFY_FAILED_RE,
   http.fetch,
   
uri='https://testssl-expire-r2i2.disig.sk/index.en.html')
 http.session.close()  # clear the connection
@@ -181,13 +182,13 @@
 
 def test_http_504(self):
 """Test that a HTTP 504 raises the correct exception."""
-self.assertRaises(pywikibot.Server504Error,
+self.assertRaisesRegex(pywikibot.Server504Error, 'Server httpbin.org 
timed out',
   http.fetch,
   uri=self.get_httpbin_url('/status/504'))
 
 def test_server_not_found(self):
 """Test server not found exception."""
-self.assertRaises(requests.exceptions.ConnectionError,
+self.assertRaisesRegex(requests.exceptions.ConnectionError, 'Max 
retries exceeded with url: /w/api.php',
   http.fetch,
   uri='http://ru-sib.wikipedia.org/w/api.php',
   default_error_handling=True)
@@ -195,7 +196,7 @@
 def test_invalid_scheme(self):
 """Test invalid scheme."""
 # A InvalidSchema is raised within requests
-self.assertRaises(requests.exceptions.InvalidSchema,
+self.assertRaisesRegex(requests.exceptions.InvalidSchema, 'No 
connection adapters were found for \'invalid://url\'',
   http.fetch,
   uri='invalid://url')
 
@@ -421,6 +422,7 @@
 
 """Test that HttpRequest correct handles the charsets given."""
 
+CODEC_CANT_DECODE_RE = 'codec can\'t decode byte'
 net = False
 
 STR = u'äöü'
@@ -507,9 +509,9 @@
 req = CharsetTestCase._create_request('utf16',
   CharsetTestCase.LATIN1_BYTES)
 self.assertEqual('utf16', req.charset)
-self.assertRaises(UnicodeDecodeError, lambda: req.encoding)
+self.assertRaisesRegex(UnicodeDecodeError, self.CODEC_CANT_DECODE_RE, 
lambda: req.encoding)
 self.assertEqual(req.raw, CharsetTestCase.LATIN1_BYTES)
-self.assertRaises(UnicodeDecodeError, lambda: req.content)
+self.assertRaisesRegex(UnicodeDecodeError, self.CODEC_CANT_DECODE_RE, 
lambda: req.content)
 
 
 class BinaryTestCase(TestCase):

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add explanatory tooltips for GraphResultBrowser display icons

2017-01-14 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332041 )

Change subject: Add explanatory tooltips for GraphResultBrowser display icons
..

Add explanatory tooltips for GraphResultBrowser display icons

Following new i18n messages has been added:
* wdqs-app-resultbrowser-stabilize
* wdqs-app-resultbrowser-hierarchical-lr
* wdqs-app-resultbrowser-hierarchical-ud
* wdqs-app-resultbrowser-hierarchical-rl

Change-Id: I80493f707461c73418b7440dc904505c19910b81
---
M i18n/en.json
M i18n/qqq.json
M wikibase/queryService/ui/resultBrowser/GraphResultBrowser.js
3 files changed, 25 insertions(+), 8 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index f989c61..d1676c2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -40,6 +40,10 @@
 "wdqs-app-shorturl-page-title": "Short URL to this page",
 "wdqs-app-editor-placeholder": "(Input a SPARQL query or choose a query 
example)",
 "wdqs-app-editor-addprefixes": "Add Standard Prefixes",
+"wdqs-app-resultbrowser-stabilize": "Stabilize network",
+"wdqs-app-resultbrowser-hierarchical-lr": "Hierarchical Layout left to 
right",
+"wdqs-app-resultbrowser-hierarchical-ud": "Hierarchical Layout up to down",
+"wdqs-app-resultbrowser-hierarchical-rl": "Hierarchical Layout right to 
left",
 "wdqs-dialog-examples-preview-query": "Preview query",
 "wdqs-dialog-examples-preview-result": "Preview result",
 "wdqs-ve-find": "Find",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 793f3f1..b7d21e6 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -42,6 +42,10 @@
"wdqs-app-shorturl-page-title": "Title of link message on the left side 
of the editor",
"wdqs-app-editor-placeholder": "Placeholder message in editor box",
"wdqs-app-editor-addprefixes": "Butten message in the prefix menu",
+   "wdqs-app-resultbrowser-stabilize": "Button message in graph browser 
toolbar",
+   "wdqs-app-resultbrowser-hierarchical-lr": "Button message in graph 
browser toolbar",
+   "wdqs-app-resultbrowser-hierarchical-ud": "Button message in graph 
browser toolbar",
+   "wdqs-app-resultbrowser-hierarchical-rl": "Button message in graph 
browser toolbar",
"wdqs-dialog-examples-preview-query": "Label to preview query in 
example dialog",
"wdqs-dialog-examples-preview-result": "Label to preview result in 
example dialog",
"wdqs-ve-find": "Label to find some item\n{{Identical|Find}}",
diff --git a/wikibase/queryService/ui/resultBrowser/GraphResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/GraphResultBrowser.js
index 94b6628..f9c6a17 100644
--- a/wikibase/queryService/ui/resultBrowser/GraphResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/GraphResultBrowser.js
@@ -87,23 +87,32 @@
 
$( '' ).click( function() {
network.stabilize( 100 );
-   } ).append( '' )
-   .appendTo( $toolbar );
+   } ).append(
+   ''
+   ).appendTo( $toolbar );
 
$( '' ).click( function() {
setLayout( 'LR' );
-   } ).append( '' )
-   .appendTo( $toolbar );
+   } ).append( ''
+   ).appendTo( $toolbar );
 
$( '' ).click( function() {
setLayout( 'UD' );
-   } ).append( '' )
-   .appendTo( $toolbar );
+   } ).append( ''
+   ).appendTo( $toolbar );
 
$( '' ).click( function() {
setLayout( 'RL' );
-   } ).append( '' )
-   .appendTo( $toolbar );
+   } ).append( ''
+   ).appendTo( $toolbar );
 
return $toolbar;
};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80493f707461c73418b7440dc904505c19910b81
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fix typo in i18n message "wdqs-app-editor-addprefixes"

2017-01-14 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332042 )

Change subject: Fix typo in i18n message "wdqs-app-editor-addprefixes"
..

Fix typo in i18n message "wdqs-app-editor-addprefixes"

Change-Id: I05681f09b3d50f3300f76c780d1b9684ad958265
---
M i18n/qqq.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/i18n/qqq.json b/i18n/qqq.json
index 793f3f1..61193b3 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -41,7 +41,7 @@
"wdqs-app-result-formatter-title-datetime": "Tooltip shown on dates in 
the table result view",
"wdqs-app-shorturl-page-title": "Title of link message on the left side 
of the editor",
"wdqs-app-editor-placeholder": "Placeholder message in editor box",
-   "wdqs-app-editor-addprefixes": "Butten message in the prefix menu",
+   "wdqs-app-editor-addprefixes": "Button message in the prefix menu",
"wdqs-dialog-examples-preview-query": "Label to preview query in 
example dialog",
"wdqs-dialog-examples-preview-result": "Label to preview result in 
example dialog",
"wdqs-ve-find": "Label to find some item\n{{Identical|Find}}",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05681f09b3d50f3300f76c780d1b9684ad958265
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Replace spaces with underscores in multi word articles links

2017-01-15 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332124 )

Change subject: Replace spaces with underscores in multi word articles links
..

Replace spaces with underscores in multi word articles links

Bug: T147625
Change-Id: Icded1a8f66b7182dd6b3eb40cfe4772f558419fb
---
M modules/base/ext.cx.sitemapper.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/24/332124/1

diff --git a/modules/base/ext.cx.sitemapper.js 
b/modules/base/ext.cx.sitemapper.js
index 1529f34..1f18ba1 100644
--- a/modules/base/ext.cx.sitemapper.js
+++ b/modules/base/ext.cx.sitemapper.js
@@ -85,7 +85,7 @@
 
return base
.replace( '$1', domain.replace( /\$/g, '' ) )
-   .replace( '$2', title.replace( /\$/g, '' ) ) + 
extra;
+   .replace( '$2', title.replace(/ /g, "_").replace( 
/\$/g, '' ) ) + extra;
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icded1a8f66b7182dd6b3eb40cfe4772f558419fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Fix badly cropped images when using page images

2016-12-01 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review.

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

Change subject: Fix badly cropped images when using page images
..

Fix badly cropped images when using page images

Skips generating of banner HTML code when image is not landscape.
This fix should also allow when the editor has specifically overriden the 
default.

Bug: T131424
Change-Id: I1261cca946e8e0e87ad9446233096da4511a1443
---
M includes/WikidataPageBanner.functions.php
M includes/WikidataPageBanner.hooks.php
2 files changed, 9 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner 
refs/changes/75/324775/1

diff --git a/includes/WikidataPageBanner.functions.php 
b/includes/WikidataPageBanner.functions.php
old mode 100644
new mode 100755
index 3f2216e..b518787
--- a/includes/WikidataPageBanner.functions.php
+++ b/includes/WikidataPageBanner.functions.php
@@ -165,15 +165,20 @@
// use largest image url as src attribute
$bannerurl = $urls[count( $urls ) - 1];
$bannerfile = Title::newFromText( "File:$bannername" );
+   $file = wfFindFile( $bannerfile );
+   // don't auto generate banner if image is not 
landscape, see bug report T131424
+   $fileWidth = $file->getWidth();
+   $fileHeight = $file->getHeight();
+   if ( $options['isAutomatic'] && $fileWidth < 1.5 * 
$fileHeight ) {
+   return $banner;
+   }
$templateParser = new TemplateParser( __DIR__ . 
'/../templates' );
$options['bannerfile'] = $bannerfile->getLocalUrl();
$options['banner'] = $bannerurl;
$options['srcset'] = $srcset;
-   $file = wfFindFile( $bannerfile );
-   $fileWidth = $file->getWidth();
$options['maxWidth'] = $fileWidth;
// Provide information to the logic-less template about 
whether it is a panorama or not.
-   $options['isPanorama'] = $fileWidth > ( 
$file->getHeight() * 2 );
+   $options['isPanorama'] = $fileWidth > ( $fileHeight * 2 
);
$options['isHeadingOverrideEnabled'] = $config->get( 
'WPBEnableHeadingOverride' );
$banner = $templateParser->processTemplate(
'banner',
diff --git a/includes/WikidataPageBanner.hooks.php 
b/includes/WikidataPageBanner.hooks.php
old mode 100644
new mode 100755
index a87290d..912918a
--- a/includes/WikidataPageBanner.hooks.php
+++ b/includes/WikidataPageBanner.hooks.php
@@ -98,6 +98,7 @@
$banner = $wpbFunctionsClass::getBannerHtml( 
$bannername, $params );
// attempt to get an automatic banner
if ( $banner === null ) {
+   $params['isAutomatic'] = true;
$bannername = 
$wpbFunctionsClass::getAutomaticBanner( $title );
$banner = $wpbFunctionsClass::getBannerHtml( 
$bannername, $params );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1261cca946e8e0e87ad9446233096da4511a1443
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Use isset( $options['isAutomatic'] ) to surpress unnecessary...

2016-12-01 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review.

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

Change subject: Use isset( $options['isAutomatic'] ) to surpress unnecessary 
errors.
..

Use isset( $options['isAutomatic'] ) to surpress unnecessary errors.

Change-Id: Ib9baac4aca92f1ad14069fd10edfb86ccf1f3925
---
M includes/WikidataPageBanner.functions.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner 
refs/changes/37/324837/1

diff --git a/includes/WikidataPageBanner.functions.php 
b/includes/WikidataPageBanner.functions.php
index b518787..dc8c812 100755
--- a/includes/WikidataPageBanner.functions.php
+++ b/includes/WikidataPageBanner.functions.php
@@ -169,8 +169,8 @@
// don't auto generate banner if image is not 
landscape, see bug report T131424
$fileWidth = $file->getWidth();
$fileHeight = $file->getHeight();
-   if ( $options['isAutomatic'] && $fileWidth < 1.5 * 
$fileHeight ) {
-   return $banner;
+   if ( isset( $options['isAutomatic'] ) && $fileWidth < 
1.5 * $fileHeight ) {
+   return null;
}
$templateParser = new TemplateParser( __DIR__ . 
'/../templates' );
$options['bannerfile'] = $bannerfile->getLocalUrl();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9baac4aca92f1ad14069fd10edfb86ccf1f3925
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Add check if $options['isAutomatic'] is true

2016-12-02 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review.

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

Change subject: Add check if $options['isAutomatic'] is true
..

Add check if $options['isAutomatic'] is true

This change is related to 324775 where $options['isAutomatic'] could be false.
Adding a check if $options['isAutomatic'] is also true should do that future 
proof.

Bug: T131424
Change-Id: I30afab29ca63b7590736332e43ff81a3a8fc15f1
---
M includes/WikidataPageBanner.functions.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner 
refs/changes/38/325038/1

diff --git a/includes/WikidataPageBanner.functions.php 
b/includes/WikidataPageBanner.functions.php
index dc8c812..1f957ec 100755
--- a/includes/WikidataPageBanner.functions.php
+++ b/includes/WikidataPageBanner.functions.php
@@ -169,7 +169,7 @@
// don't auto generate banner if image is not 
landscape, see bug report T131424
$fileWidth = $file->getWidth();
$fileHeight = $file->getHeight();
-   if ( isset( $options['isAutomatic'] ) && $fileWidth < 
1.5 * $fileHeight ) {
+   if ( isset( $options['isAutomatic'] ) && 
$options['isAutomatic'] && $fileWidth < ( 1.5 * $fileHeight ) ) {
return null;
}
$templateParser = new TemplateParser( __DIR__ . 
'/../templates' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30afab29ca63b7590736332e43ff81a3a8fc15f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Simplify system messages to fit for other CAPTCHA modules

2016-12-02 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review.

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

Change subject: Simplify system messages to fit for other CAPTCHA modules
..

Simplify system messages to fit for other CAPTCHA modules

The previous system messages referred to a CAPTCHA to be calculated.
With the change to 'following task' this should also fit for other CAPTCHA 
modules.
Also, the following system messages were also too CAPTCHA module specific:
* MediaWiki:Captcha-edit
* MediaWiki:Captcha-create

Bug: T151216
Change-Id: I5704e01663b21a1bc1baaf33823fc13bb28cba8c
---
M i18n/en.json
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/45/325045/1

diff --git a/i18n/en.json b/i18n/en.json
old mode 100644
new mode 100755
index 99018de..99f68e4
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -2,7 +2,7 @@
"@metadata": {
"authors": []
},
-   "captcha-edit": "To edit this page, please solve the simple sum below 
and enter the answer in the box ([[Special:Captcha/help|more info]]):",
+   "captcha-edit": "To edit this page, please solve the following task 
below and enter the answer in the box ([[Special:Captcha/help|more info]]):",
"captcha-edit-fail": "Incorrect or missing CAPTCHA.",
"captcha-desc": "Provides CAPTCHA techniques to protect against spam 
and password-guessing",
"captcha-label": "CAPTCHA",
@@ -11,12 +11,12 @@
"captcha-id-label": "CAPTCHA ID",
"captcha-id-help": "This value should be sent back unchanged.",
"captcha-ip-whitelist": "-",
-   "captcha-addurl": "Your edit includes new external links.\nTo protect 
the wiki against automated spam, we kindly ask you to solve the simple sum 
below and enter the answer in the box in order to save your edit 
([[Special:Captcha/help|more info]]):",
-   "captcha-badlogin": "To protect the wiki against automated password 
cracking, we kindly ask you to solve the simple sum below and enter the answer 
in the box ([[Special:Captcha/help|more info]]):",
-   "captcha-createaccount": "To protect the wiki against automated account 
creation, we kindly ask you to solve the simple sum below and enter the answer 
in the box ([[Special:Captcha/help|more info]]):",
+   "captcha-addurl": "Your edit includes new external links.\nTo protect 
the wiki against automated spam, we kindly ask you to solve the following task 
below and enter the answer in the box in order to save your edit 
([[Special:Captcha/help|more info]]):",
+   "captcha-badlogin": "To protect the wiki against automated password 
cracking, we kindly ask you to solve the following task below and enter the 
answer in the box ([[Special:Captcha/help|more info]]):",
+   "captcha-createaccount": "To protect the wiki against automated account 
creation, we kindly ask you to solve the following task below and enter the 
answer in the box ([[Special:Captcha/help|more info]]):",
"captcha-createaccount-fail": "Incorrect or missing CAPTCHA.",
-   "captcha-create": "To create the page, please solve the simple sum 
below and enter the answer in the box ([[Special:Captcha/help|more info]]):",
-   "captcha-sendemail": "To protect the wiki against automated spamming, 
we kindly ask you to solve the simple sum below and enter the answer in the box 
([[Special:Captcha/help|more info]]):",
+   "captcha-create": "To create the page, please solve the following task 
below and enter the answer in the box ([[Special:Captcha/help|more info]]):",
+   "captcha-sendemail": "To protect the wiki against automated spamming, 
we kindly ask you to solve the following task below and enter the answer in the 
box ([[Special:Captcha/help|more info]]):",
"captcha-sendemail-fail": "Incorrect or missing CAPTCHA.",
"captcha-disabledinapi": "This action requires a CAPTCHA, so it cannot 
be performed through the API.",
"captcha-error": "CAPTCHA verification failed due to internal error: 
$1",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5704e01663b21a1bc1baaf33823fc13bb28cba8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Improve code readability in Quiz extension by reformatting code

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

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

Change subject: Improve code readability in Quiz extension by reformatting code
..

Improve code readability in Quiz extension by reformatting code

This extension had a lot of long code lines which has been wrapped.
Only code lines where HTML tags were present hasn't been changed.

Bug: T150103
Change-Id: Iacebb4d97a00307b64aacdaefc9b86c4f28dd5d5
---
M Question.php
M Quiz.class.php
M modules/ext.quiz.js
3 files changed, 276 insertions(+), 232 deletions(-)


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

diff --git a/Question.php b/Question.php
old mode 100644
new mode 100755
index dc88150..d545e7c
--- a/Question.php
+++ b/Question.php
@@ -19,10 +19,10 @@
$this->mState = ( $beingCorrected ) ? 'NA' : '';
$this->mType = 'multipleChoice';
$this->mCoef = 1;
-   $this->mProposalPattern = '`^([+-]) ?(.*)`';
-   $this->mCorrectionPattern   = '`^\|\|(.*)`';
-   $this->mCategoryPattern = '`^\|(\n|[^\|].*\n)`';
-   $this->mTextFieldPattern= '`\{ ([^\}]*?)(_([\d]*) ?| 
)\}`';
+   $this->mProposalPattern = '`^([+-]) ?(.*)`';
+   $this->mCorrectionPattern = '`^\|\|(.*)`';
+   $this->mCategoryPattern = '`^\|(\n|[^\|].*\n)`';
+   $this->mTextFieldPattern = '`\{ ([^\}]*?)(_([\d]*) ?| )\}`';
}
 
/**
@@ -32,19 +32,18 @@
 * @param $pState String:
 */
function setState( $pState ) {
-   if (
-   $pState == 'error' ||
-   ( $pState == 'wrong' && $this->mState != 'error' ) ||
+   if ( $pState == 'error' || ( $pState == 'wrong' && 
$this->mState != 'error' ) ||
( $pState == 'right' && ( $this->mState == 'NA' || 
$this->mState == 'na_right' ) ) ||
( $pState == 'na_wrong' && ( $this->mState == 'NA' || 
$this->mState == 'na_right' ) ) ||
( $pState == 'na_right' && ( $this->mState == 'NA' ) ) 
||
( $pState == 'new_NA' && ( $this->mState == 'NA' || 
$this->mState == 'right' ) )
-   )
-   {
+   ) {
$this->mState = $pState;
}
-   # Special cases
-   if( ( $pState == 'na_wrong' && $this->mState == 'right' ) || ( 
$pState == 'right' && $this->mState == 'na_wrong' ) ) {
+
+   // Special cases
+   if ( ( $pState == 'na_wrong' && $this->mState == 'right' ) ||
+   ( $pState == 'right' && $this->mState == 'na_wrong' ) ) 
{
$this->mState = 'wrong';
}
return;
@@ -73,15 +72,19 @@
 */
function parseHeader( $input ) {
$parametersPattern = '`\n\|([^\|].*)\s*$`';
-   $input = preg_replace_callback( $parametersPattern, array( 
$this, 'parseParameters' ), $input );
+   $input = preg_replace_callback(
+   $parametersPattern,
+   array( $this, 'parseParameters' ),
+   $input
+   );
$splitHeaderPattern = '`\n\|\|`';
$unparsedHeader = preg_split( $splitHeaderPattern, $input );
$output = $this->mParser->recursiveTagParse( trim( 
$unparsedHeader[0] ) . "\n" );
-   if( array_key_exists( 1, $unparsedHeader ) ) {
+   if ( array_key_exists( 1, $unparsedHeader ) ) {
$output .= '';
-   $output .= '→' .
-   $this->mParser->recursiveTagParse( trim( 
$unparsedHeader[1] ) ) .
-   '';
+   $output .= '→';
+   $output .= $this->mParser->recursiveTagParse( trim( 
$unparsedHeader[1] ) );
+   $output .= '';
$output .= '';
}
return $output;
@@ -95,9 +98,9 @@
 */
function parseParameters( $matches ) {
$typePattern = '`t[yi]p[eo]?="(.*?)"`';
-   if( preg_match( $typePattern, $matches[1], $type ) ) {
-   # List of all object type code and the correspondant 
question type.
-   switch( $type[1] ) {
+   if ( preg_match( $typePattern, $matches[1], $type ) ) {
+   // List of all object type code and the correspondant 
question type.
+   switch ( $type[1] ) {
case '{}':
$this->mType = 'textField';
break;
@@ -110,7 +113,8 @@
}
}
  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace Linker::link() with LinkRenderer in all revisiondele...

2016-12-05 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review.

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

Change subject: Replace Linker::link() with LinkRenderer in all revisiondelete 
pages
..

Replace Linker::link() with LinkRenderer in all revisiondelete pages

* RevDelArchiveItem
* RevDelArchivedFileItem
* RevDelFileItem
* RevDelLogItem
* RevDelRevisionItem

Bug: T149346
Change-Id: I96f83d06b4d3ccf3f76ccfca843a6aaf76d89063
---
M includes/revisiondelete/RevDelArchiveItem.php
M includes/revisiondelete/RevDelArchivedFileItem.php
M includes/revisiondelete/RevDelFileItem.php
M includes/revisiondelete/RevDelLogItem.php
M includes/revisiondelete/RevDelRevisionItem.php
5 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/325348/1

diff --git a/includes/revisiondelete/RevDelArchiveItem.php 
b/includes/revisiondelete/RevDelArchiveItem.php
index 2d0d690..fdfe184 100644
--- a/includes/revisiondelete/RevDelArchiveItem.php
+++ b/includes/revisiondelete/RevDelArchiveItem.php
@@ -75,7 +75,7 @@
return $date;
}
 
-   return Linker::link(
+   return $this->getLinkRenderer->makeLink(
SpecialPage::getTitleFor( 'Undelete' ),
$date,
[],
@@ -91,7 +91,7 @@
return $this->list->msg( 'diff' )->escaped();
}
 
-   return Linker::link(
+   return $this->getLinkRenderer->makeLink(
SpecialPage::getTitleFor( 'Undelete' ),
$this->list->msg( 'diff' )->escaped(),
[],
diff --git a/includes/revisiondelete/RevDelArchivedFileItem.php 
b/includes/revisiondelete/RevDelArchivedFileItem.php
index 52df2e3..7c72316 100644
--- a/includes/revisiondelete/RevDelArchivedFileItem.php
+++ b/includes/revisiondelete/RevDelArchivedFileItem.php
@@ -78,7 +78,7 @@
} else {
$undelete = SpecialPage::getTitleFor( 'Undelete' );
$key = $this->file->getKey();
-   $link = Linker::link( $undelete, $date, [],
+   $link = $this->getLinkRenderer->makeLink( $undelete, 
$date, [],
[
'target' => 
$this->list->title->getPrefixedText(),
'file' => $key,
diff --git a/includes/revisiondelete/RevDelFileItem.php 
b/includes/revisiondelete/RevDelFileItem.php
index ff01cee..06399ee 100644
--- a/includes/revisiondelete/RevDelFileItem.php
+++ b/includes/revisiondelete/RevDelFileItem.php
@@ -128,7 +128,7 @@
if ( !$this->canViewContent() ) {
$link = $date;
} else {
-   $link = Linker::link(
+   $link = $this->getLinkRenderer->makeLink(
SpecialPage::getTitleFor( 'Revisiondelete' ),
$date,
[],
diff --git a/includes/revisiondelete/RevDelLogItem.php 
b/includes/revisiondelete/RevDelLogItem.php
index 1ea7271..d53198a 100644
--- a/includes/revisiondelete/RevDelLogItem.php
+++ b/includes/revisiondelete/RevDelLogItem.php
@@ -92,7 +92,7 @@
$formatter->setAudience( LogFormatter::FOR_THIS_USER );
 
// Log link for this page
-   $loglink = Linker::link(
+   $loglink = $this->getLinkRenderer->makeLink(
SpecialPage::getTitleFor( 'Log' ),
$this->list->msg( 'log' )->escaped(),
[],
diff --git a/includes/revisiondelete/RevDelRevisionItem.php 
b/includes/revisiondelete/RevDelRevisionItem.php
index d799113..8cd5320 100644
--- a/includes/revisiondelete/RevDelRevisionItem.php
+++ b/includes/revisiondelete/RevDelRevisionItem.php
@@ -114,7 +114,7 @@
return $date;
}
 
-   return Linker::linkKnown(
+   return $this->getLinkRenderer->makeKnownLink(
$this->list->title,
$date,
[],
@@ -134,7 +134,7 @@
if ( $this->isDeleted() && !$this->canViewContent() ) {
return $this->list->msg( 'diff' )->escaped();
} else {
-   return Linker::linkKnown(
+   return $this->getLinkRenderer->makeKnownLink(
$this->list->title,
$this->list->msg( 'diff' )->escaped(),
[],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96f83d06b4d3ccf3f76ccfca843a6aaf76d89063

[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Large gap left in footer on pages with no related articles

2016-12-10 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326252 )

Change subject: Large gap left in footer on pages with no related articles
..

Large gap left in footer on pages with no related articles

An empty container was left on the page despite there being no related articles.
This should prevent adding the container on pages with no related articles.

Bug: T147217
Change-Id: I074a12e2d6680403551c436a4b00c3b9ab1c8d09
---
M resources/ext.relatedArticles.readMore.bootstrap/index.js
1 file changed, 13 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles 
refs/changes/52/326252/1

diff --git a/resources/ext.relatedArticles.readMore.bootstrap/index.js 
b/resources/ext.relatedArticles.readMore.bootstrap/index.js
old mode 100644
new mode 100755
index d9fe5ac..aa78f0a
--- a/resources/ext.relatedArticles.readMore.bootstrap/index.js
+++ b/resources/ext.relatedArticles.readMore.bootstrap/index.js
@@ -30,23 +30,25 @@
mw.loader.using( [ 'ext.cards', 
'ext.relatedArticles.readMore' ] ),
relatedPages.getForCurrentPage( LIMIT )
).done( function ( _, pages ) {
-   if ( pages.length ) {
-   mw.track( 'ext.relatedArticles.init', 
pages );
-   }
+   if ( pages.length ) {
+   // Add container to DOM for 
checking distance on scroll
+   // If a skin has marked up a 
footer content area prepend it there
+   if ( $( '.footer-content' 
).length ) {
+   $( '' )
+   .prependTo( 
'.footer-content' );
+   } else {
+   $( '' )
+   .insertAfter( 
'#content' );
+   }
+
+   mw.track( 
'ext.relatedArticles.init', pages );
+   }
} );
// detach handler to stop subsequent loads on scroll
$window.off( 'scroll', debouncedLoad );
}
}
 
-   // Add container to DOM for checking distance on scroll
-   // If a skin has marked up a footer content area prepend it there
-   if ( $( '.footer-content' ).length ) {
-   $( '' ).prependTo( 
'.footer-content' );
-   } else {
-   $( '' )
-   .insertAfter( '#content' );
-   }
// try related articles load on scroll
$window.on( 'scroll', debouncedLoad );
// try an initial load, in case of no scroll

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I074a12e2d6680403551c436a4b00c3b9ab1c8d09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...SemanticPageMaker[master]: Replace "Article::doEdit()" deprecated in MediaWiki 1.21

2016-12-13 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327010 )

Change subject: Replace "Article::doEdit()" deprecated in MediaWiki 1.21
..

Replace "Article::doEdit()" deprecated in MediaWiki 1.21

* SPM_WFAjaxAccess
* SPM_WidgetUtils
* SPM_WidgetAssembler
* SPM_WidgetClone
* SPM_ObjectEditor

Bug: T151973
Change-Id: Ibb28fc6cfad82d36d67eb1ff46b469ba00831d6c
---
M includes/widgets/SPM_WFAjaxAccess.php
M includes/widgets/SPM_WidgetUtils.php
M specials/WidgetAssembler/SPM_WidgetAssembler.php
M specials/WidgetClone/SPM_WidgetClone.php
M specials/WikiObjectEditor/SPM_ObjectEditor.php
5 files changed, 64 insertions(+), 24 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticPageMaker 
refs/changes/10/327010/1

diff --git a/includes/widgets/SPM_WFAjaxAccess.php 
b/includes/widgets/SPM_WFAjaxAccess.php
index e73d21b..56e8dcd 100644
--- a/includes/widgets/SPM_WFAjaxAccess.php
+++ b/includes/widgets/SPM_WFAjaxAccess.php
@@ -143,8 +143,11 @@
$text = $dt->getPropertyWiki( $params );
 
$title = Title::newFromText( $title . '/' . $name, 
SMW_NS_PROPERTY );
-   $article = new Article( $title );
-   $ret = $article->doEdit( $text, 'Edit by Widget Designer' );
+   $page = WikiPage::factory( $title );
+   $ret = $page->doEditContent(
+   ContentHandler::makeContent( $text, $title ),
+   'Edit by Widget Designer'
+   );
 
return wfMessage( 'spm_ajax_success' )->text();
} elseif ( $method == "resetPropertyDefinition" ) {
@@ -172,8 +175,13 @@
// revert
$summary = wfMessage( 'revertpage', 
$revision->getUserText(), $wgUser->getName() )->text();
 
-   $article = new Article( $revision->getTitle() );
-   $status = $article->doEdit( $revision->getText(), 
$summary, 0, $rid );
+   $page = WikiPage::factory( $revision->getTitle() );
+   $status = $page->doEditContent(
+   ContentHandler::makeContent( 
$revision->getText(), $revision->getTitle() ),
+   $summary,
+   0,
+   $rid
+   );
}
return wfMessage( 'spm_ajax_success' )->text();
} elseif ( $method == "refreshPropertyRevision" ) {
@@ -220,8 +228,11 @@
$title = Title::newFromText( $name, NS_TEMPLATE );
// decode error, just deal this in client js
 // $text = html_entity_decode( $text );
-   $article = new Article( $title );
-   $ret = $article->doEdit( $text, 'Edit by Widget Designer' );
+   $page = WikiPage::factory( $title );
+   $ret = $page->doEditContent(
+   ContentHandler::makeContent( $text, $title ),
+   'Edit by Widget Designer'
+   );
if ( !$ret->isOK() ) {
return $ret->getWikiText();
}
@@ -246,8 +257,11 @@
$revision = Revision::newFromTitle( $title );
if ( $revision != null ) $text .= $revision->getText();
 
-   $article = new Article( $title );
-   $ret = $article->doEdit( $text, 'Edit by Widget 
Designer' );
+   $page = WikiPage::factory( $title );
+   $ret = $page->doEditContent(
+   ContentHandler::makeContent( $text, $title ),
+   'Edit by Widget Designer'
+   );
if ( !$ret->isOK() ) {
return $ret->getWikiText();
}
@@ -359,8 +373,11 @@
 
$title = Title::newFromText( $widget_name, 
SF_NS_FORM );
 
-   $article = new Article( $title );
-   $ret = $article->doEdit( $form_text, 'Edit by 
Widget Designer' );
+   $page = WikiPage::factory( $title );
+   $ret = $page->doEditContent(
+   ContentHandler::makeContent( 
$form_text, $title ),
+   'Edit by Widget Designer'
+   );
if ( $ret->isOK() ) {
$ret = 1;
$msg = $title->getFullURL();
diff --git a/includes/widgets/SPM_WidgetUtils.php 
b/includes/widgets/SPM_WidgetUtils.php
index 720fb54..f4b3407 100644
--- a/includes/widgets/SPM_WidgetUtils.php
+++ b/includes/widgets/SPM_WidgetUtils.php
@@ -1021,8 +1021,11 @@

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Replace "Article::getContent()" deprecated in MediaWiki 1.21

2016-12-14 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327257 )

Change subject: Replace "Article::getContent()" deprecated in MediaWiki 1.21
..

Replace "Article::getContent()" deprecated in MediaWiki 1.21

* CargoPageData
* CargoPopulateTableJob

Bug: T151973
Change-Id: I88ea3db41efd5c12e502fda579a0f70d8dead707
---
M CargoPageData.php
M CargoPopulateTableJob.php
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/57/327257/1

diff --git a/CargoPageData.php b/CargoPageData.php
index 22002a8..7398957 100644
--- a/CargoPageData.php
+++ b/CargoPageData.php
@@ -97,8 +97,8 @@
if ( $setToBlank ) {
$pageDataValues['_fullText'] = '';
} else {
-   $article = new Article( $title );
-   $pageDataValues['_fullText'] = 
$article->getContent();
+   $page = WikiPage::factory( $title );
+   $pageDataValues['_fullText'] = 
$page->getContent()->getNativeData();
}
}
if ( in_array( 'categories', $wgCargoPageDataColumns ) ) {
diff --git a/CargoPopulateTableJob.php b/CargoPopulateTableJob.php
index 8f0499c..4b4d4d0 100644
--- a/CargoPopulateTableJob.php
+++ b/CargoPopulateTableJob.php
@@ -32,14 +32,14 @@
return false;
}
 
-   $article = new Article( $this->title );
+   $page = WikiPage::factory( $this->title );
 
// If it was requested, delete all the existing rows for
// this page in this Cargo table. This is only necessary
// if the table wasn't just dropped and recreated.
if ( $this->params['replaceOldRows'] == true ) {
$cdb = CargoUtils::getDB();
-   $cdb->delete( $this->params['dbTableName'], array( 
'_pageID' => $article->getID() ) );
+   $cdb->delete( $this->params['dbTableName'], array( 
'_pageID' => $page->getID() ) );
}
 
// All we need to do here is set some global variables based
@@ -47,7 +47,7 @@
// the #cargo_store function will take care of the rest.
CargoStore::$settings['origin'] = 'template';
CargoStore::$settings['dbTableName'] = 
$this->params['dbTableName'];
-   CargoUtils::parsePageForStorage( $this->title, 
$article->getContent() );
+   CargoUtils::parsePageForStorage( $this->title, 
$page->getContent()->getNativeData() );
 
// We need to unset this, if the job was called via runJobs.php,
// so that it doesn't affect other (non-Cargo) jobs, like page

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88ea3db41efd5c12e502fda579a0f70d8dead707
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Commentbox[master]: Replace "Article::getContent()" deprecated in MediaWiki 1.21

2016-12-14 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327259 )

Change subject: Replace "Article::getContent()" deprecated in MediaWiki 1.21
..

Replace "Article::getContent()" deprecated in MediaWiki 1.21

* SpecialAddComment_body

Bug: T151973
Change-Id: I8b23c14d696be7c1352f235585f7665a6005a1f7
---
M SpecialAddComment_body.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Commentbox 
refs/changes/59/327259/1

diff --git a/SpecialAddComment_body.php b/SpecialAddComment_body.php
index bb8ae29..1683fb7 100644
--- a/SpecialAddComment_body.php
+++ b/SpecialAddComment_body.php
@@ -62,8 +62,8 @@
}
 
$user = $this->getUser();
-   $article = new Article( $title );
-   $text = $article->getContent();
+   $page = WikiPage::factory( $title );
+   $text = $page->getContent()->getNativeData();
$subject = '';
if ( !preg_match( $this->msg( 'commentbox-regex' 
)->inContentLanguage()->plain(), $text ) )
$subject = $this->msg( 
'commentbox-first-comment-heading' )->inContentLanguage()->text() . "\n";
@@ -115,4 +115,3 @@
}
 
 }
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b23c14d696be7c1352f235585f7665a6005a1f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Commentbox
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...DataTransfer[master]: Replace "Article::getContent()" deprecated in MediaWiki 1.21

2016-12-14 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327264 )

Change subject: Replace "Article::getContent()" deprecated in MediaWiki 1.21
..

Replace "Article::getContent()" deprecated in MediaWiki 1.21

* DT_ImportJob
* DT_PageStructure

Bug: T151973
Change-Id: If95c372fa9e6e7fbb91b6664198ca81b58cd2d18
---
M includes/DT_ImportJob.php
M includes/DT_PageStructure.php
2 files changed, 18 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataTransfer 
refs/changes/64/327264/1

diff --git a/includes/DT_ImportJob.php b/includes/DT_ImportJob.php
index 3bd56c9..fd0ea4f 100644
--- a/includes/DT_ImportJob.php
+++ b/includes/DT_ImportJob.php
@@ -24,21 +24,13 @@
return false;
}
 
-   if ( method_exists( 'WikiPage', 'getContent' ) ) {
-   $wikiPage = new WikiPage( $this->title );
-   if ( !$wikiPage ) {
-   $this->error = 'dtImport: Wiki page not found 
"' . $this->title->getPrefixedDBkey() . '"';
-   wfProfileOut( __METHOD__ );
-   return false;
-   }
-   } else {
-   $article = new Article( $this->title );
-   if ( !$article ) {
-   $this->error = 'dtImport: Article not found "' 
. $this->title->getPrefixedDBkey() . '"';
-   wfProfileOut( __METHOD__ );
-   return false;
-   }
+   $wikiPage = WikiPage::factory( $this->title );
+   if ( !$wikiPage ) {
+   $this->error = 'dtImport: Wiki page not found "' . 
$this->title->getPrefixedDBkey() . '"';
+   wfProfileOut( __METHOD__ );
+   return false;
}
+
$for_pages_that_exist = $this->params['for_pages_that_exist'];
if ( $for_pages_that_exist == 'skip' && $this->title->exists() 
) {
return true;
@@ -52,12 +44,7 @@
$text = $this->params['text'];
if ( $this->title->exists() ) {
if ( $for_pages_that_exist == 'append' ) {
-   if ( method_exists( 'WikiPage', 'getContent' ) 
) {
-   // MW >= 1.21
-   $existingText = 
$wikiPage->getContent()->getNativeData();
-   } else {
-   $existingText = $article->getContent();
-   }
+   $existingText = 
$wikiPage->getContent()->getNativeData();
$text = $existingText . "\n" . $text;
} elseif ( $for_pages_that_exist == 'merge' ) {
$existingPageStructure = 
DTPageStructure::newFromTitle( $this->title );
@@ -69,21 +56,17 @@
// otherwise, $for_pages_that_exist == 'overwrite'
}
$edit_summary = $this->params['edit_summary'];
-   if ( method_exists( 'WikiPage', 'getContent' ) ) {
-   $new_content = new WikitextContent( $text );
-   // It's strange that doEditContent() doesn't
-   // automatically attach the 'bot' flag when the user
-   // is a bot...
-   if ( $wgUser->isAllowed( 'bot' ) ) {
-   $flags = EDIT_FORCE_BOT;
-   } else {
-   $flags = 0;
-   }
-   $wikiPage->doEditContent( $new_content, $edit_summary, 
$flags );
-
+   $new_content = new WikitextContent( $text );
+   // It's strange that doEditContent() doesn't
+   // automatically attach the 'bot' flag when the user
+   // is a bot...
+   if ( $wgUser->isAllowed( 'bot' ) ) {
+   $flags = EDIT_FORCE_BOT;
} else {
-   $article->doEdit( $text, $edit_summary );
+   $flags = 0;
}
+   $wikiPage->doEditContent( $new_content, $edit_summary, $flags );
+
$wgUser = $actual_user;
wfProfileOut( __METHOD__ );
return true;
diff --git a/includes/DT_PageStructure.php b/includes/DT_PageStructure.php
index f5a91ec..cb8870a 100644
--- a/includes/DT_PageStructure.php
+++ b/includes/DT_PageStructure.php
@@ -148,13 +148,8 @@
$pageStructure = new DTPageStructure();
$pageStructure->mPageTitle = $pageTitle;
 
-   if ( method_exists( 'WikiPage', 'getContent' ) ) {
-   $w

[MediaWiki-commits] [Gerrit] mediawiki...EditNotify[master]: Replace "Article::getContent()" deprecated in MediaWiki 1.21

2016-12-14 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327265 )

Change subject: Replace "Article::getContent()" deprecated in MediaWiki 1.21
..

Replace "Article::getContent()" deprecated in MediaWiki 1.21

* ENPageStructure

Bug: T151973
Change-Id: I1c0c5df7576339a2e843688745b478e3ba05ce53
---
M includes/ENPageStructure.php
1 file changed, 5 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EditNotify 
refs/changes/65/327265/1

diff --git a/includes/ENPageStructure.php b/includes/ENPageStructure.php
index a8c8526..692c08f 100644
--- a/includes/ENPageStructure.php
+++ b/includes/ENPageStructure.php
@@ -130,15 +130,11 @@
$pageStructure = new ENPageStructure();
$pageStructure->mPageTitle = $pageTitle;
 
-   if ( method_exists( 'WikiPage', 'getContent' ) ) {
-   $wiki_page = new WikiPage( $pageTitle );
-   if ( $wiki_page->getContent() )
-   $page_contents = 
$wiki_page->getContent()->getNativeData();
-   else
-   $page_contents = null;
+   $wiki_page = WikiPage::factory( $pageTitle );
+   if ( $wiki_page->getContent() ) {
+   $page_contents = 
$wiki_page->getContent()->getNativeData();
} else {
-   $article = new Article( $pageTitle );
-   $page_contents = $article->getContent();
+   $page_contents = null;
}
$pageStructure->parsePageContents( $page_contents );
//file_put_contents('php://stderr', print_r('', TRUE));
@@ -347,4 +343,4 @@
return Xml::tags( $page_str, array( $id_str => 
$articleID, $title_str => $pageName ), $bodyXML );
}
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c0c5df7576339a2e843688745b478e3ba05ce53
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EditNotify
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...LinkFilter[master]: Replace "Article::getContent()" deprecated in MediaWiki 1.21

2016-12-14 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327267 )

Change subject: Replace "Article::getContent()" deprecated in MediaWiki 1.21
..

Replace "Article::getContent()" deprecated in MediaWiki 1.21

* LinkPage

Bug: T151973
Change-Id: I0f32201d1ada9b61823a239bf881e9817a05ab88
---
M LinkPage.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkFilter 
refs/changes/67/327267/1

diff --git a/LinkPage.php b/LinkPage.php
index bd5f191..97c8e9a 100644
--- a/LinkPage.php
+++ b/LinkPage.php
@@ -40,8 +40,8 @@
wfDebugLog( 'LinkFilter', __METHOD__ . "\n" );
 
$target = $this->followRedirect();
-   $rarticle = new Article( $target );
-   $this->pageContent = $rarticle->getContent();
+   $page = WikiPage::factory( $target );
+   $this->pageContent = 
$page->getContent()->getNativeData();
 
// if we don't clear, the page content will be 
[[redirect-blah]],
// and not actual page

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f32201d1ada9b61823a239bf881e9817a05ab88
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] mediawiki...LiveTranslate[master]: Replace "Article::getContent()" deprecated in MediaWiki 1.21

2016-12-14 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327268 )

Change subject: Replace "Article::getContent()" deprecated in MediaWiki 1.21
..

Replace "Article::getContent()" deprecated in MediaWiki 1.21

* ApiImportTranslationMemories

Bug: T151973
Change-Id: I32ed1ed2a7d7d4f35bb9893a41089d0784322c90
---
M api/ApiImportTranslationMemories.php
1 file changed, 33 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiveTranslate 
refs/changes/68/327268/1

diff --git a/api/ApiImportTranslationMemories.php 
b/api/ApiImportTranslationMemories.php
index 9592ca2..f00eb2b 100644
--- a/api/ApiImportTranslationMemories.php
+++ b/api/ApiImportTranslationMemories.php
@@ -12,69 +12,69 @@
  * @author Jeroen De Dauw < jeroended...@gmail.com >
  */
 class ApiImportTranslationMemories extends ApiBase {
-   
+
public function __construct( $main, $action ) {
parent::__construct( $main, $action );
}
-   
+
public function execute() {
if ( !$this->getUser()->isAllowed( 'managetms' ) || 
$this->getUser()->isBlocked() ) {
$this->dieUsageMsg( array( 'badaccess-groups' ) );
}
-   
+
$params = $this->extractRequestParams();
-   
+
// In MW 1.17 and above ApiBase::PARAM_REQUIRED can be used, 
this is for b/c with 1.16.
foreach ( array( 'source' ) as $requiredParam ) {
if ( !isset( $params[$requiredParam] ) ) {
$this->dieUsageMsg( array( 'missingparam', 
$requiredParam ) );
-   }   
+   }
}
 
foreach ( $params['source'] as $location ) {
$text = false;
-   
+
$dbr = wfGetDB( DB_SLAVE );
-   
+
$res = $dbr->select(
'live_translate_memories',
array( 'memory_id', 'memory_local', 
'memory_type' ),
array( 'memory_location' => $location ),
__METHOD__,
array( 'LIMIT' => '1' )
-   );  
-   
+   );
+
foreach ( $res as $tm ) {
if ( $tm->memory_local != '0' ) {
// Obtain the contents of the article.
$title = Title::newFromText( $location, 
NS_MAIN );
-   
+
if ( is_object( $title ) && 
$title->exists() ) {
-   $article = new Article( $title 
);
-   $text = $article->getContent();
-   }   
+   $page = WikiPage::factory( 
$title );
+   $text = 
$page->getContent()->getNativeData();
+   }
}
else {
// Make an HTTP request to get the file 
contents. False is returned on failiure.
$text = Http::get( $location );
}
-   
+
if ( $text !== false ) {
// If the text was obtained, parse it 
to a translation memory and import it into the db.
$parser = LTTMParser::newFromType( 
$tm->memory_type );
$this->doTMImport( $parser->parse( 
$text ), $tm->memory_id );
-   }   
-   
+   }
+
break;
}
}
}
-   
+
/**
 * Imports a translation memory into the database.
-* 
+*
 * @since 0.4
-* 
+*
 * @param LTTranslationMemory $tm
 * @param integer $memoryId
 */
@@ -97,10 +97,10 @@
if ( $GLOBALS['egLTRequireSignificance'] && 
!$tu->isSignificant() ) {
continue;
}
-   
+
foreach ( $tu->getVariants() as $language => 
$translations ) {
$primary = 1;
-   
+
foreach (