[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Remove extra indentations from lilypond template

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

Change subject: Remove extra indentations from lilypond template
..

Remove extra indentations from lilypond template

The indentations find themselves in the provided LY files, and are
aesthetically unpleasing, even if there is no consequence when
engraving.

Change-Id: I58e6f6a0c8374a88067c0fde0c75202918e5e6b8
---
M includes/Score.php
1 file changed, 13 insertions(+), 13 deletions(-)


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

diff --git a/includes/Score.php b/includes/Score.php
index b260a2d..18b2596 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -732,19 +732,19 @@
/* Raw code. In Scheme, ##f is false and ##t is true. */
/* Set the default MIDI tempo to 100, 60 is a bit too slow */
$raw = <

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Revert ExtensionRegistry TMH check

2017-12-29 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400915 )

Change subject: Revert ExtensionRegistry TMH check
..

Revert ExtensionRegistry TMH check

The change lead to the `score-nomediahandler` error. Reverting it to a
tried-and-true solution. The problem in my view is that TMH doesn't use
the new extension registry (no extension.json).

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


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

diff --git a/includes/Score.php b/includes/Score.php
index 778467b..5de1ab7 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -266,7 +266,7 @@
$options['generate_ogg'] = array_key_exists( 'vorbis', 
$args );
 
if ( $options['generate_ogg']
-   && !ExtensionRegistry::getInstance()->isLoaded( 
'TimedMediaHandler' )
+   && !class_exists( 'TimedMediaTransformOutput' )
) {
throw new ScoreException( wfMessage( 
'score-nomediahandler' ) );
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Replace class_exists with ExtensionRegistry checks

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

Change subject: Replace class_exists with ExtensionRegistry checks
..

Replace class_exists with ExtensionRegistry checks

class_exists calls with a string are dangerous, because they violate
the separation between extensions and do not reflect changes that
have been made elsewhere.

Bug: T183096
Change-Id: I8cf99e9d77f4978fe3e88d1c781c77f8b17a42e6
---
M includes/Score.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/Score.php b/includes/Score.php
index e6df438..d7f1381 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -266,7 +266,7 @@
$options['generate_ogg'] = array_key_exists( 'vorbis', 
$args );
 
if ( $options['generate_ogg']
-   && !class_exists( 'TimedMediaTransformOutput' )
+   && !ExtensionRegistry::getInstance()->isLoaded( 
'TimedMediaHandler' )
) {
throw new ScoreException( wfMessage( 
'score-nomediahandler' ) );
}
@@ -896,7 +896,7 @@
 */
private static function getLength( $path ) {
// File_Ogg is packaged in TimedMediaHandler
-   if ( !class_exists( 'File_Ogg' ) ) {
+   if ( !ExtensionRegistry::getInstance()->isLoaded( 
'TimedMediaHandler' ) ) {
require 'File/Ogg.php';
}
$f = new File_Ogg( $path );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Remove rawAndMidi from cache options

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

Change subject: Remove rawAndMidi from cache options
..

Remove rawAndMidi from cache options

This was an unnecessary addition from I6a0a239b6. It is un-needed as
whenever the `midi` block is included in a ` self::CACHE_VERSION,
'LyVersion' => self::getLilypondVersion(),
];
-   // Doing this separately to not invalidate too many 
existing keys.
-   if ( $options['raw'] && ( $options['generate_ogg']
-   || ( $options['link_midi'] && 
!$options['override_midi'] )
-   ) ) {
-   $cacheOptions['rawAndMidi'] = true;
-   }
 
/* image file path and URL prefixes */
$imageCacheName = Wikimedia\base_convert( sha1( 
serialize( $cacheOptions ) ), 16, 36, 31 );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add DOM Structure to Scores

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

Change subject: Add DOM Structure to Scores
..

Add DOM Structure to Scores

This change encapsulates the two components of the `getUrl();
+   } else {
+   $url = 
"{$options['dest_url']}/{$options['file_name_prefix']}.midi";
+   }
+   $midiLink .= Html::OpenElement( 'a',
+   [ 'href' => $url, 'class' => 
'mwe-score-mididownload' ] );
+   }
+
+   $output = Html::OpenElement( 'div', ['class' => 
'mwe-score-block'] )
+   . Html::OpenElement( 'div', ['class' => 
'mwe-score-images'] )
+   . $midiLink;
+
if ( isset( $existingFiles[$imageFileName] ) ) {
list( $width, $height ) = 
$metaData[$imageFileName]['size'];
-   $link = Html::rawElement( 'img', [
+   $output .= Html::rawElement( 'img', [
'src' => 
"{$options['dest_url']}/$imageFileName",
'width' => $width,
'height' => $height,
'alt' => $code,
] );
} elseif ( isset( $existingFiles[$multi1FileName] ) ) {
-   $link = '';
for ( $i = 1; ; ++$i ) {
$fileName = 

[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add variables to score hash

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

Change subject: Add variables to score hash
..

Add variables to score hash

This change adds the versions of both the extension and of Lilypond to
the hash options, so that updates, such as Ieb1345582, that will
affect the appearance of a score, will propagate better.

Bug: T49448
Change-Id: Iad119d53e4f25ac66e3aa1d553580f0097b6c395
---
M includes/Score.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/includes/Score.php b/includes/Score.php
index e3b76c8..7eea37e 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -270,10 +270,13 @@
}
 
// Input for cache key
+   $LYversion = json_decode( file_get_contents( __DIR__ . 
'extension.json' ), true )['version'];
$cacheOptions = [
'code' => $code,
'lang' => $options['lang'],
'raw'  => $options['raw'],
+   'ExtVersion' => $LYversion,
+   'LyVersion' => self::getLilypondVersion(),
];
// Doing this separately to not invalidate too many 
existing keys.
if ( $options['raw'] && ( $options['generate_ogg']

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Make image check precede MIDI check

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

Change subject: Make image check precede MIDI check
..

Make image check precede MIDI check

`score-noimages` was in the HTML generation stage, while MIDI checking
was in the PNG generation stage. This meant that MIDI checking took
precedence, making the error message unhelpful to the real issue.

This change places the image checking before MIDI checking right after
engraving.

Bug: T116392
Change-Id: If01818ffc474865ebb6cc57b2dccc9f665d841f0
---
M includes/Score.php
1 file changed, 7 insertions(+), 3 deletions(-)


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

diff --git a/includes/Score.php b/includes/Score.php
index e3b76c8..8d580ee 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -444,10 +444,8 @@
'title' => $pageNumb
] );
}
-   } else {
-   /* No images; this may happen in raw mode or 
when the user omits the score code */
-   throw new ScoreException( wfMessage( 
'score-noimages' ) );
}
+
if ( $options['link_midi'] ) {
if ( $options['override_midi'] ) {
$url = $options['midi_file']->getUrl();
@@ -510,6 +508,7 @@
$factoryLy = "$factoryDirectory/file.ly";
$factoryMidi = "$factoryDirectory/file.midi";
$factoryImage = "$factoryDirectory/file.png";
+   $factoryPage1 = "$factoryDirectory/file-page1.png";
$factoryImageTrimmed = "$factoryDirectory/file-trimmed.png";
 
/* Generate LilyPond input file */
@@ -567,6 +566,11 @@
self::throwCallException( wfMessage( 
'score-compilererr' ), $output,
$options['factory_directory'] );
}
+
+   if ( !file_exists( $factoryImage ) && !file_exists( 
$factoryPage1 ) ) {
+   throw new ScoreException( wfMessage( 'score-noimages' ) 
);
+   }
+
$needMidi = false;
if ( !$options['raw'] ||
( $options['generate_ogg'] || ( $options['link_midi'] 
&& !$options['override_midi'] ) )

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add score count to 'score' page property

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

Change subject: Add score count to 'score' page property
..

Add score count to 'score' page property

This change removes the value of 1 listed after each page with a
score, replacing it by a useful number, that of the amount of
scores on the page.

Bug: T183078
Change-Id: I2977e19388479d64b877c631cfaade9f4abf05a6
---
M includes/Score.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/includes/Score.php b/includes/Score.php
index bede431..e3b76c8 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -298,7 +298,8 @@
 
// Mark the page as using the score extension, it makes easier
// to track all those pages.
-   $parser->getOutput()->setProperty( 'score', true );
+   $scoreNum = $parser->getOutput()->getProperty( 'score' );
+   $parser->getOutput()->setProperty( 'score', $scoreNum += 1 );
 
return $html;
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Remove useless argument

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

Change subject: Remove useless argument
..

Remove useless argument

The `--png` argument in the Lilypond command
implies the use of the PostScript backend.
Specifying the backend is unnecessary and removed
here.

Change-Id: I56f375c49166e5f901e903fd88bb56a0b788e4c1
---
M includes/Score.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/includes/Score.php b/includes/Score.php
index ce43d94..bede431 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -549,7 +549,6 @@
$wgScoreLilyPond,
'-dmidi-extension=midi', // midi needed for Windows to 
generate the file
$mode,
-   '-dbackend=ps',
'--png',
'--header=texidoc',
$factoryLy

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Correct couple typos

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

Change subject: Correct couple typos
..

Correct couple typos

Fixed following typos in generatePngAndMidi() function:
* @param in the PHP-doc
* The backend argument in rendering images

Change-Id: I99fd7e03cd11f704315eac52cea85aec256b7e62
---
M includes/Score.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/Score.php b/includes/Score.php
index 7e73548..ce43d94 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -489,7 +489,7 @@
 * @param string $code Score code.
 * @param array $options Rendering options. They are the same as for
 *  Score::generateHTML().
-* @parma array $metaData array to hold information about images
+* @param array $metaData array to hold information about images
 *
 * @return array of file names placed in the remote dest dir, with the
 *  file names in each key.
@@ -549,7 +549,7 @@
$wgScoreLilyPond,
'-dmidi-extension=midi', // midi needed for Windows to 
generate the file
$mode,
-   '-dbackpend-ps',
+   '-dbackend=ps',
'--png',
'--header=texidoc',
$factoryLy

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Check for PNG metadata before generating HTML

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

Change subject: Check for PNG metadata before generating HTML
..

Check for PNG metadata before generating HTML

When embedding the PNG file(s), the dimensions of the file are
placed into the `

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add `override_midi` to README

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

Change subject: Add `override_midi` to README
..

Add `override_midi` to README

This attribute was not mentioned in the README, and so added it
(based on the documentation for the `midi` and `override_ogg`
attributes). With that, repeated information in the other attribute
was removed with a note.

Change-Id: If4559eadc19c60f05ec617d4cdf2f35f55072fe4
---
M README
1 file changed, 12 insertions(+), 5 deletions(-)


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

diff --git a/README b/README
index 7abbbdf..fdd7a12 100644
--- a/README
+++ b/README
@@ -86,16 +86,23 @@
   Effect: If included in the tag, the rendered image(s) will be embedded into a
   hyperlink to an appropriate MIDI file.
 
+* Attribute: override_midi
+  Allowed values: Known file name, that is, if override_midi="name" is given,
+  [[File:name]] is not a redlink.
+  Effect: Embeds the score image(s) into a hyperlink to a specified MIDI file.
+  This is an alternative to the midi attribute (see above). It can, for
+  example, be useful if you have a suitable MIDI file of superior
+  quality compared with the auto-generated MIDI file the midi attribute
+  yields. Of course, you can still omit both attributes in this case 
and
+  add the file manually to the page, if you prefer.
+
 * Attribute: override_ogg
   Allowed values: Known file name, that is, if override_ogg="name" is given,
   [[File:name]] is not a redlink.
   Effect: Embeds the media specified by the file name in the HTML below the
   score image(s). This is an alternative to the vorbis attribute (see
-  below). It can, for example, be useful if you have a suitable
-  Ogg/Vorbis file of superior quality compared with the auto-generated
-  Ogg/Vorbis file the vorbis attribute yields. Of course, you can still
-  omit both attributes in this case and add the file manually to the
-  page, if you prefer.
+  below). Its use is similar to the use of the override_midi attribute
+  (see above).
 
 * Attribute: raw
   Effect: If included in the tag, the score code is interpreted as a complete

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Show protection log on every use of moveddeleted-notice

2017-09-03 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375618 )

Change subject: Show protection log on every use of moveddeleted-notice
..

Show protection log on every use of moveddeleted-notice

As a follow-up to T171338, the other uses of the message were ignored.
This change adds the protection log to these uses; that is, history and
image pages.

Bug: T174889
Change-Id: Ib9f22d6e06c372c4a32e77a08c846d768853bc21
---
M includes/actions/HistoryAction.php
M includes/page/ImagePage.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/375618/1

diff --git a/includes/actions/HistoryAction.php 
b/includes/actions/HistoryAction.php
index 7460340..4d92d36 100644
--- a/includes/actions/HistoryAction.php
+++ b/includes/actions/HistoryAction.php
@@ -154,7 +154,7 @@
# show deletion/move log if there is an entry
LogEventsList::showLogExtract(
$out,
-   [ 'delete', 'move' ],
+   [ 'delete', 'move', 'protect' ],
$this->getTitle(),
'',
[ 'lim' => 10,
diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php
index 0e3eaa5..8765576 100644
--- a/includes/page/ImagePage.php
+++ b/includes/page/ImagePage.php
@@ -583,7 +583,7 @@
# Show deletion log to be consistent with 
normal articles
LogEventsList::showLogExtract(
$out,
-   [ 'delete', 'move' ],
+   [ 'delete', 'move', 'protect' ],
$this->getTitle()->getPrefixedText(),
'',
[ 'lim' => 10,

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set $wgScoreSafeMode to false

2017-08-28 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374446 )

Change subject: Set $wgScoreSafeMode to false
..

Set $wgScoreSafeMode to false

Will permit greater flexibility in Lilypond use.

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index fa7af44..33e6593 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1077,7 +1077,7 @@
 
 if ( $wmgUseScore ) {
wfLoadExtension( 'Score' );
-   $wgScoreSafeMode = true;
+   $wgScoreSafeMode = false;
$wgScoreLilypond = '/usr/local/bin/mediawiki-firejail-lilypond';
$wgScoreAbc2Ly = '/usr/local/bin/mediawiki-firejail-abc2ly';
$wgScoreTimidity = '/usr/local/bin/mediawiki-firejail-timidity';

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Create hybrid-raw mode

2017-08-10 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371211 )

Change subject: Create hybrid-raw mode
..

Create hybrid-raw mode

When a layout or midi block is added in a non-raw score tag, the
default should be overridden. This change makes it so before adding
the default blocks, the LY code is checked to see whether it already
contains the tags.

Bug: T49616
Change-Id: I7f0a4268c3834bf6ee91cbcec19592503f87da67
---
M Score.body.php
1 file changed, 14 insertions(+), 7 deletions(-)


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

diff --git a/Score.body.php b/Score.body.php
index 0a6517f..12620a8 100644
--- a/Score.body.php
+++ b/Score.body.php
@@ -709,6 +709,19 @@
private static function embedLilypondCode( $lilypondCode ) {
$version = self::getLilypondVersion();
 
+   // Check if parameters have already been supplied (hybrid-raw 
mode)
+   $options = "";
+   if ( strpos( $lilypondCode, '\\layout') !== true ) {
+   $options .= "\\layout { }\n";
+   }
+   if ( strpos( $lilypondCode, '\\midi') !== true ) {
+   $options .= <

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add variables to score hash and add purging

2017-08-06 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370428 )

Change subject: Add variables to score hash and add purging
..

Add variables to score hash and add purging

This change enables the use of `?action=purge` on scores. As with math
equations, the purge of a page with a score will also cascade identical
scores on other pages.

The versions of both the extension and of Lilypond has also been added
to the hash options, so that updates, such as Ieb1345582, that will
affect the appearance of a score, will propagate better.

Bug: T49448
Change-Id: Id2dd37f476a3bd0ff2ab69f9900b87f9e859f87f
---
M Score.body.php
1 file changed, 29 insertions(+), 2 deletions(-)


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

diff --git a/Score.body.php b/Score.body.php
index 0a6517f..e005f7a 100644
--- a/Score.body.php
+++ b/Score.body.php
@@ -275,10 +275,13 @@
}
 
// Input for cache key
+   $version = json_decode( file_get_contents( __DIR__ . 
'extension.json' ), true )['version'];
$cacheOptions = [
'code' => $code,
'lang' => $options['lang'],
'raw'  => $options['raw'],
+   'ExtVersion' => $version,
+   'LyVersion' => self::getLilypondVersion(),
];
// Doing this separately to not invalidate too many 
existing keys.
if ( $options['raw'] && ( $options['generate_ogg']
@@ -356,8 +359,15 @@
$fileIter = $backend->getFileList(
[ 'dir' => $options['dest_storage_path'], 
'topOnly' => true ] );
$existingFiles = [];
-   foreach ( $fileIter as $file ) {
-   $existingFiles[$file] = true;
+
+   if ( self::purgeScores() ) {
+   foreach ( $fileIter as $file ) {
+   $existingFiles[$file] = false;
+   }
+   } else {
+   foreach ( $fileIter as $file ) {
+   $existingFiles[$file] = true;
+   }
}
 
/* Generate PNG and MIDI files if necessary */
@@ -913,6 +923,23 @@
}
 
/**
+* Determines whether to re-render the score tags
+* Set true when purging requested with ?action=purge
+*
+* @return Bool true if purging requested
+*/
+   private static function purgeScores() {
+   $refererHeader = 
RequestContext::getMain()->getRequest()->getHeader( 'REFERER' );
+   if ( $refererHeader ) {
+   parse_str( parse_url( $refererHeader, PHP_URL_QUERY ), 
$refererParam );
+   if ( isset( $refererParam['action'] ) && 
$refererParam['action'] === 'purge' ) {
+   return true;
+   }
+   }
+   return false;
+   }
+
+   /**
 * Deletes a local directory with no subdirectories with all files in 
it.
 *
 * @param $dir string Local path to the directory that is to be deleted.

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Run Lilypond from Firejail

2017-08-05 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370361 )

Change subject: Run Lilypond from Firejail
..

Run Lilypond from Firejail

This change adds the python command, encapsulating Lilypond within
Firejail, with the `mediawiki-converters` profile, like in similar
scripts.

See also I5a0579b0e and I926fbe6b3.

Bug: T171372
Change-Id: I011db0e9a2d9da825cf3ac02bfba23b562e052f6
---
A modules/mediawiki/files/mediawiki-firejail-lilypond
M modules/mediawiki/manifests/init.pp
2 files changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/370361/1

diff --git a/modules/mediawiki/files/mediawiki-firejail-lilypond 
b/modules/mediawiki/files/mediawiki-firejail-lilypond
new file mode 100644
index 000..cbee57b
--- /dev/null
+++ b/modules/mediawiki/files/mediawiki-firejail-lilypond
@@ -0,0 +1,5 @@
+#! /usr/bin/python
+# -*- coding: utf-8 -*-
+
+import sys, subprocess
+subprocess.call(['/usr/bin/firejail', 
'--profile=/etc/firejail/mediawiki-converters.profile', '/usr/bin/lilypond'] + 
sys.argv[1:])
diff --git a/modules/mediawiki/manifests/init.pp 
b/modules/mediawiki/manifests/init.pp
index 8b54677..9929fdc 100644
--- a/modules/mediawiki/manifests/init.pp
+++ b/modules/mediawiki/manifests/init.pp
@@ -32,8 +32,7 @@
 
 # This profile is used to contain the convert command of imagemagick using
 # firejail Profiles specific to the image/video scalers are handled via
-# mediawiki::firejail, but imagemagick is also used on the general purpose
-# appscalers for scaling musical typesheets in the Score extension
+# mediawiki::firejail
 file { '/etc/firejail/mediawiki-imagemagick.profile':
 source  => 'puppet:///modules/mediawiki/mediawiki-imagemagick.profile',
 owner   => 'root',
@@ -63,6 +62,14 @@
 mode   => '0555',
 }
 
+# The Score extension uses Lilypond, which requires the use of Firejail
+file { '/usr/local/bin/mediawiki-firejail-lilypond':
+source => 'puppet:///modules/mediawiki/mediawiki-firejail-lilypond',
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+}
+
 # /var/log/mediawiki contains log files for the MediaWiki jobrunner
 # and for various periodic jobs that are managed by cron.
 file { '/var/log/mediawiki':

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Run Lilypond from Firejail

2017-08-05 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370358 )

Change subject: Run Lilypond from Firejail
..

Run Lilypond from Firejail

This change changes the path to the Lilypond executable to a script
provided by Puppet encapsulating it with Firejail.

Should not be merged until the equivalent puppet patch is merged.

Bug: T171372
Change-Id: I5a0579b0e5adf4b4498cd8663bcb878ef0f34626
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 32e6f83..4fa9333 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1068,6 +1068,7 @@
 
 if ( $wmgUseScore ) {
wfLoadExtension( 'Score' );
+   $wgScoreLilypond = '/usr/local/bin/mediawiki-firejail-lilypond';
$wgScoreFileBackend = $wmgScoreFileBackend;
$wgScorePath = $wmgScorePath;
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Run lilypond from inside firejail

2017-08-04 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370306 )

Change subject: Run lilypond from inside firejail
..

Run lilypond from inside firejail

Firejail prevents the execution of malicious code and is used by
Wikimedia when running commands such as `convert`. This change
replaces the current line of defence in Lilypond code, of which used
the `-dsafe` argument, with Firejail.

A new global: `$wgScoreFirejail` has been created for Firejail's path,
and a profile (based on puppet's) was added to the extension.

This change resolves T171372 and its subtasks, even though the subtasks
appear to be unrelated. The were nonetheless all caused by the very
restrictive `safe` argument, of which Firejail supercedes.

Bug: T171372
Bug: T54883
Bug: T60526
Bug: T161293
Change-Id: I926fbe6b31b7ef95a0994c6a460972e46a07b4ae
---
M README
M Score.body.php
M Score.hooks.php
M extension.json
A firejail.profile
5 files changed, 56 insertions(+), 3 deletions(-)


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

diff --git a/README b/README
index bece82e..b5a5d6a 100644
--- a/README
+++ b/README
@@ -33,6 +33,8 @@
 5. Add the lines
 
require_once("$IP/extensions/Score/Score.php");
+   $wgScoreFirejail = '/path/to/your/firejail/executable'; /* required for
+  security */
$wgScoreLilyPond = '/path/to/your/lilypond/executable'; /* required */
$wgScoreAbc2Ly = '/path/to/your/abc2ly/executable'; /* if you want ABC to
   LilyPond conversion 
*/
diff --git a/Score.body.php b/Score.body.php
index 0a6517f..2c01986 100644
--- a/Score.body.php
+++ b/Score.body.php
@@ -517,10 +517,14 @@
 * @throws ScoreException on error.
 */
private static function generatePngAndMidi( $code, $options, &$metaData 
) {
-   global $wgScoreLilyPond, $wgScoreTrim;
+   global $wgScoreLilyPond, $wgScoreFirejail, $wgScoreTrim;
 
if ( !is_executable( $wgScoreLilyPond ) ) {
throw new ScoreException( wfMessage( 
'score-notexecutable', $wgScoreLilyPond ) );
+   }
+
+   if ( !is_executable( $wgScoreFirejail ) ) {
+   throw new ScoreException( wfMessage( 
'score-notexecutable', $wgScoreFirejail ) );
}
 
/* Create the working environment */
@@ -564,8 +568,9 @@
// probably won't do anything.
$env = [ 'LILYPOND_GC_YIELD' => '25' ];
 
-   $cmd = wfEscapeShellArg( $wgScoreLilyPond )
-   . ' ' . wfEscapeShellArg( '-dsafe=#t' )
+   $cmd = wfEscapeShellArg( $wgScoreFirejail ) // Setup Firejail
+   . ' --profile=' . wfEscapeShellArg( __DIR__ ) . 
'/firejail.profile '
+   . wfEscapeShellArg( $wgScoreLilyPond )
. ' -dmidi-extension=midi' // midi needed for Windows 
to generate the file
. ' -dbackend=ps --png --header=texidoc '
. wfEscapeShellArg( $factoryLy )
diff --git a/Score.hooks.php b/Score.hooks.php
index 855a7b4..f36d17c 100644
--- a/Score.hooks.php
+++ b/Score.hooks.php
@@ -18,8 +18,24 @@
public static function onSoftwareInfo( array &$software ) {
try {
$software[ '[http://lilypond.org/ LilyPond]' ] = 
Score::getLilypondVersion();
+   $software[ '[https://firejail.wordpress.com/ Firejail]' 
] = self::getFJVersion();
} catch ( ScoreException $ex ) {
// LilyPond executable can't found
}
}
+
+   private static function getFJVersion() {
+   global $wgScoreFirejail;
+
+   if ( !is_executable( $wgScoreFirejail ) ) {
+   throw new ScoreException( wfMessage( 
'score-notexecutable', $wgScoreFirejail ) );
+   }
+
+   $cmd = wfEscapeShellArg( $wgScoreFirejail ) . ' --version 2>&1';
+   $output = wfShellExec( $cmd, $rc );
+   if ( $rc != 0 ) {
+   self::throwCallException( wfMessage( 'score-versionerr' 
), $output );
+   }
+   return sscanf( $output, 'firejail version %s' )[0];
+   }
 }
diff --git a/extension.json b/extension.json
index f585433..d37b58c 100644
--- a/extension.json
+++ b/extension.json
@@ -68,6 +68,7 @@
},
"config": {
"ScoreTrim": null,
+   "ScoreFirejail": "/usr/bin/firejail",
"ScoreLilyPond": "/usr/bin/lilypond",
"ScoreAbc2Ly": "/usr/bin/abc2ly",
"ScoreTimidity": "/usr/bin/timidity",
diff --git a/firejail.profile b/firejail.profile
new file mode 100644
index 000..b0431c8
--- /dev/null

[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Update documentation

2017-08-04 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370305 )

Change subject: Update documentation
..

Update documentation

Rendered the installation guide up-to-date and
matched the documentation of the tag attributes
to the code.

Bug: T113046
Change-Id: Ie4818d6a9edc18c1cefdbcbff217ed0721130f1c
---
M README
1 file changed, 15 insertions(+), 21 deletions(-)


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

diff --git a/README b/README
index bece82e..834e7bf 100644
--- a/README
+++ b/README
@@ -15,24 +15,22 @@
 
 for more information.
 
-This extension was tested with LilyPond 2.12.3.
+This extension was tested with LilyPond 2.12.3 through 2.18.2.
 
 
 Setup
 =
 
 1. Change to the "extensions" directory of your MediaWiki installation.
-2. Create a new subdirectory named "Score".
-3. Copy the files Score.php, Score.body.php and Score.i18n.php into the new
-   subdirectory. Make sure they are readable by your webserver.
-4. Create a subdirectory named "lilypond" in your $wgUploadDirectory (usually
+2. Clone this repository.
+3. Create a subdirectory named "lilypond" in your $wgUploadDirectory (usually
the directory named "images" in in your MediaWiki directory). Make sure
the directory is writable by your webserver. If you do not create this
directory, the Score extension will attempt to create it for you with the
rights available to it.
-5. Add the lines
+4. Add the lines
 
-   require_once("$IP/extensions/Score/Score.php");
+   wfLoadExtension( 'score' );
$wgScoreLilyPond = '/path/to/your/lilypond/executable'; /* required */
$wgScoreAbc2Ly = '/path/to/your/abc2ly/executable'; /* if you want ABC to
   LilyPond conversion 
*/
@@ -79,9 +77,8 @@
   .
 
 * Attribute: midi
-  Allowed values: 0 (default), 1
-  Effect: If set to 1, the rendered image(s) will be embedded into a hyperlink
-  to an appropriate MIDI file.
+  Effect: If included in the tag, the rendered image(s) will be embedded into a
+  hyperlink to an appropriate MIDI file.
 
 * Attribute: override_ogg
   Allowed values: Known file name, that is, if override_ogg="name" is given,
@@ -95,16 +92,13 @@
   page, if you prefer.
 
 * Attribute: raw
-  Allowed valued: 0 (default), 1
-  Effect: If set to 1, the score code is interpreted as a complete LilyPond
-  file. Use this option if you want to create more complex scores.
-  If the score language (lang attribute) is not set to lilypond, this
-  attribute is ignored.
+  Effect: If included in the tag, the score code is interpreted as a complete
+  LilyPond file. Use this option if you want to create more complex
+  scores. If the score language (lang attribute) is not set to
+  lilypond, this attribute is ignored.
 
 * Attribute: vorbis
-  Allowed values: 0 (default), 1
-  Effect: If set to 1, an Ogg/Vorbis file will be generated for the score,
-  provided you installed and configured the OggHandler extension.
-  An Ogg/Vorbis player will be embedded in the HTML below the score
-  image(s).
-
+  Effect: If included in the tag, an Ogg/Vorbis file will be generated for the
+  score, provided you installed and configured the OggHandler
+  extension. An Ogg/Vorbis player will be embedded in the HTML below
+  the score image(s).

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Output SVG in scores

2017-08-04 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370209 )

Change subject: Output SVG in scores
..

Output SVG in scores

This change makes scores be outputted in SVG, and rendered in-
browser if supported. A .png fallback is also created through
the MediaHandler, for both files to be output in an https://codereview.appspot.com/326960043/ . This option
automatically places all the music on 1 file, of which is trimmed.

As the '-dcrop' option outputs a trimmed file, the $wgScoreTrim
global has been removed as it is now automatic. Further, the
multipage functionality has been removed since all is outputted
in 1 file.

DO NOT MERGE UNTIL -DCROP IS RELEASED UPSTREAM.

Change-Id: Ieb13455825053cb187e6240b238fa7b6bd5c18c1
Task: T49578
---
M README
M Score.body.php
M Score.hooks.php
M extension.json
M i18n/en.json
M i18n/qqq.json
6 files changed, 78 insertions(+), 110 deletions(-)


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

diff --git a/README b/README
index bece82e..24c481c 100644
--- a/README
+++ b/README
@@ -4,8 +4,7 @@
 =
 
 This extension uses LilyPond to render score images, so you need a working
-LilyPond installation. If you want the extension to trim the score files for
-you, you will also need ImageMagick.
+LilyPond installation.
 
 The extension is also capable of creating Ogg/Vorbis files from the MIDI files
 generated by LilyPond. If you want to make use of this functionality, you need
@@ -38,7 +37,6 @@
   LilyPond conversion 
*/
$wgScoreTimidty = '/path/to/your/timidty/executable'; /* if you want MIDI to
 Vorbis conversion 
*/
-   $wgScoreTrim = true; /* Set to false if you don't want score trimming */
 
to your LocalSettings.php file. If you get unexpected out-of-memory errors,
you may also have to increase $wgMaxShellMemory (see
@@ -107,4 +105,3 @@
   provided you installed and configured the OggHandler extension.
   An Ogg/Vorbis player will be embedded in the HTML below the score
   image(s).
-
diff --git a/Score.body.php b/Score.body.php
index 6cb8304..d19b782 100644
--- a/Score.body.php
+++ b/Score.body.php
@@ -360,9 +360,9 @@
$existingFiles[$file] = true;
}
 
-   /* Generate PNG and MIDI files if necessary */
-   $imageFileName = "{$options['file_name_prefix']}.png";
-   $multi1FileName = 
"{$options['file_name_prefix']}-page1.png";
+   /* Generate SVG and MIDI files if necessary */
+   $svgFileName = "{$options['file_name_prefix']}.svg";
+   $pngFileName = "{$options['file_name_prefix']}.png";
$midiFileName = "{$options['file_name_prefix']}.midi";
$metaDataFileName = 
"{$options['file_name_prefix']}.json";
 
@@ -380,11 +380,11 @@
if (
!isset( $existingFiles[$metaDataFileName] )
|| (
-   !isset( $existingFiles[$imageFileName] )
-   && !isset( 
$existingFiles[$multi1FileName] )
-   )
+   !isset( $existingFiles[$svgFileName] )
+   && !isset( $existingFiles[$pngFileName] 
)
+   )
|| !isset( $existingFiles[$midiFileName] ) ) {
-   $existingFiles += self::generatePngAndMidi( 
$code, $options, $metaData );
+   $existingFiles += self::generateImageAndMidi( 
$code, $options, $metaData );
}
 
/* Generate Ogg/Vorbis file if necessary */
@@ -420,34 +420,16 @@
}
 
/* return output link(s) */
-   if ( isset( $existingFiles[$imageFileName] ) ) {
-   list( $width, $height ) = 
$metaData[$imageFileName]['size'];
+   if ( isset( $existingFiles[$svgFileName] ) ) {
+   list( $width, $height ) = 
$metaData[$svgFileName]['size'];
$link = Html::rawElement( 'img', [
-   'src' => 
"{$options['dest_url']}/$imageFileName",
+   'src' => 
"{$options['dest_url']}/$pngFileName",
+   'srcset' => 
"{$options['dest_url']}/$svgFileName 1x",
'width' => $width,
'height' => $height,
  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Show protection log on creation-protected pages

2017-07-22 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/367033 )

Change subject: Show protection log on creation-protected pages
..

Show protection log on creation-protected pages

This change would add the message 'titleprotectedwarning'
to pages that have been protected against creation, just
like how deleted pages have their log visible beforere-creation.
It is visible to everyone, whether or not they are allowed to
recreate the page.

Bug: T171338
Change-Id: I5acf1bee9cea056b20b77fd386bc9df65033cded
---
M includes/page/Article.php
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/367033/1

diff --git a/includes/page/Article.php b/includes/page/Article.php
index d13fb3c..5ce4e35 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1221,6 +1221,17 @@
return;
}
 
+   # Show protection log if create-protected
+   if ( $title->isProtected() ) {
+   LogEventsList::showLogExtract( $outputPage, 'protect', 
$title, '',
+   [
+   'lim' => 1,
+   'showIfEmpty' => false,
+   'msgKey' => [ 'titleprotectedwarning' ],
+   'wrap' => "\n$1"
+   ] );
+   }
+
# Show error message
$oldid = $this->getOldID();
if ( !$oldid && $title->getNamespace() === NS_MEDIAWIKI && 
$title->hasSourceText() ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add language 'kbp'

2017-02-21 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339026 )

Change subject: Add language 'kbp'
..

Add language 'kbp'

Language 'kbp' (Kabiye) is a language spoken in Togo, so the fallback
is french. It should be added as the localization requirements are
met and the Wikipedia in the langauge is under consideration for
creation on the Langcom mailing list.

Change-Id: I8bb7480ba1f0e4c29369bebbe4084e1585ed6598
Task: T158677
---
M RELEASE-NOTES-1.29
M languages/data/Names.php
A languages/messages/MessagesKbp.php
3 files changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/339026/1

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 13406d6..7c3cf0c 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -144,6 +144,7 @@
   ca ↔ oc; hsb ↔ dsb; io → eo; mdf → ru; pnt → el; roa-tara → it; rup → ro;
   sh → bs, sr-el, hr.
 * (T155957) Talk Namespaces for Javanese language (jv) have been updated.
+* (T158677) Added language 'kbp' (Kabɩyɛ, Kabye)
 
  No fallback for Ukrainian 
 * (T39314) The fallback from Ukrainian to Russian was removed. The Ukrainian
diff --git a/languages/data/Names.php b/languages/data/Names.php
index 0557455..d14d415 100644
--- a/languages/data/Names.php
+++ b/languages/data/Names.php
@@ -220,6 +220,7 @@
'kab' => 'Taqbaylit', # Kabyle
'kbd' => 'Адыгэбзэ', # Kabardian
'kbd-cyrl' => 'Адыгэбзэ', # Kabardian (Cyrillic)
+   'kbp' => 'Kabɩyɛ' # Kabye
'kg' => 'Kongo', # Kongo, (FIXME!) should probaly be KiKongo or 
KiKoongo
'khw' => 'کھوار', # Khowar
'ki' => 'Gĩkũyũ', # Gikuyu
diff --git a/languages/messages/MessagesKbp.php 
b/languages/messages/MessagesKbp.php
new file mode 100644
index 000..b4b5a03
--- /dev/null
+++ b/languages/messages/MessagesKbp.php
@@ -0,0 +1,11 @@
+https://translatewiki.net
+ *
+ * @ingroup Language
+ * @file
+ *
+ */
+
+$fallback = 'fr';

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

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

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


[MediaWiki-commits] [Gerrit] Add langauge 'zgh' Standard Moroccan Amazigh - change (mediawiki/core)

2016-06-09 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add langauge 'zgh' Standard Moroccan Amazigh
..

Add langauge 'zgh' Standard Moroccan Amazigh

This change adds the Standard Moroccan Amazigh language with ISO
639-3 code 'zgh' with 'kab' (Kabyle) fallback.

Bug: T137491
Change-Id: Idd13f92d7ae05cd47267558c8ff4fa368b701e24
---
M RELEASE-NOTES-1.28
M languages/data/Names.php
A languages/messages/MessagesZgh.php
3 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/293661/1

diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 0e423d2..ad48e52 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -39,6 +39,9 @@
 regularly. Below only new and removed languages are listed, as well as
 changes to languages because of Phabricator reports.
 
+* Languages added:
+** (T137491) zgh (Standard Moroccan Amazigh)
+
 === Other changes in 1.28 ===
 * (T128697) Improved handling of large diffs.
 
diff --git a/languages/data/Names.php b/languages/data/Names.php
index a7de1f9..7e1b61a 100644
--- a/languages/data/Names.php
+++ b/languages/data/Names.php
@@ -451,6 +451,7 @@
'yue' => '粵語', # Cantonese
'za' => 'Vahcuengh', # Zhuang
'zea' => 'Zeêuws', # Zeeuws/Zeaws
+   'zgh' => 'ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ/tamaziɣt tanawayt', # Standard 
Moroccan Amazigh (multiple scripts - defaults to Neo-Tifinagh)
'zh' => '中文', # (Zhōng Wén) - Chinese
'zh-classical' => '文言', # Classical Chinese/Literary Chinese -- 
(see bug 8217)
'zh-cn' => "中文(中国大陆)\xE2\x80\x8E", # Chinese (PRC)
diff --git a/languages/messages/MessagesZgh.php 
b/languages/messages/MessagesZgh.php
new file mode 100644
index 000..720b591
--- /dev/null
+++ b/languages/messages/MessagesZgh.php
@@ -0,0 +1,11 @@
+https://translatewiki.net
+ *
+ * @ingroup Language
+ * @file
+ *
+ */
+
+$fallback = 'kab';

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

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

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


[MediaWiki-commits] [Gerrit] Show talk pages to users with fewer than 5 edits - change (mediawiki...MobileFrontend)

2015-12-23 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Show talk pages to users with fewer than 5 edits
..

Show talk pages to users with fewer than 5 edits

Per discussion at T119337, the condition of having 5 edits before
being shown talk pages has been removed.

Bug: T122311
Change-Id: I0c0a8d63c1bf5e1223869c8a63d3bb4ab079e0a4
---
M includes/skins/SkinMinerva.php
M includes/skins/SkinMinervaBeta.php
2 files changed, 1 insertion(+), 17 deletions(-)


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

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 6539231..d80ceba 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -931,13 +931,6 @@
}
 
/**
-* Checks, if an edit count > 5.
-*/
-   protected function isExperiencedUser() {
-   return $this->getUser()->getEditCount() > 5;
-   }
-
-   /**
 * Returns true, if the page can have a talk page.
 * @return boolean
 */
@@ -945,8 +938,7 @@
$title = $this->getTitle();
return $this->isAllowedPageAction( 'talk' ) &&
!$title->isTalkPage() &&
-   $title->canTalk() &&
-   $this->isExperiencedUser();
+   $title->canTalk();
}
 
/*
diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
index 2e9c5b2..a227d4f 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -168,14 +168,6 @@
}
 
/**
-* If the user is in beta mode, we assume, he is an experienced
-* user (he/she found the "beta" switch ;))
-*/
-   protected function isExperiencedUser() {
-   return true;
-   }
-
-   /**
 * Add talk, contributions, and uploads links at the top of the user 
page.
 *
 * @inheritdoc

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

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

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


[MediaWiki-commits] [Gerrit] Fix declension in grammar rules for Latin language - change (mediawiki/core)

2015-12-21 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Fix declension in grammar rules for Latin language
..

Fix declension in grammar rules for Latin language

On behalf of User:UV on la.wiki.

Bug: T122022
Change-Id: Icc24b29558947989dc35468ea0f6e1741824cb58
---
M languages/classes/LanguageLa.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/260426/1

diff --git a/languages/classes/LanguageLa.php b/languages/classes/LanguageLa.php
index e2dea1d..80cf694 100644
--- a/languages/classes/LanguageLa.php
+++ b/languages/classes/LanguageLa.php
@@ -53,7 +53,7 @@
'/u[ms]$/', # 2nd 
declension singular
'/ommunia$/',   # 3rd 
declension neuter plural (partly)
'/a$/', # 1st 
declension singular
-   '/libri$/', '/nuntii$/',# 2nd 
declension plural (partly)
+   '/libri$/', '/nuntii$/', '/datae$/', # 2nd 
declension plural (partly)
'/tio$/', '/ns$/', '/as$/', # 3rd 
declension singular (partly)
'/es$/' # 5th 
declension singular
);
@@ -61,7 +61,7 @@
'i',
'ommunium',
'ae',
-   'librorum', 'nuntiorum',
+   'librorum', 'nuntiorum', 'datorum',
'tionis', 'ntis', 'atis',
'ei'
);
@@ -72,7 +72,7 @@
'/u[ms]$/', # 2nd 
declension singular
'/a$/', # 1st 
declension singular
'/ommuniam$/',  # 3rd declension 
neuter plural (partly)
-   '/libri$/', '/nuntii$/',# 2nd 
declension plural (partly)
+   '/libri$/', '/nuntii$/', '/datam$/', # 2nd 
declension plural (partly)
'/tio$/', '/ns$/', '/as$/', # 3rd 
declension singular (partly)
'/es$/' # 5th 
declension singular
);
@@ -80,7 +80,7 @@
'um',
'am',
'ommunia',
-   'libros', 'nuntios',
+   'libros', 'nuntios', 'data',
'tionem', 'ntem', 'atem',
'em'
);
@@ -91,7 +91,7 @@
'/u[ms]$/', # 2nd 
declension singular
'/ommunia$/',   # 3rd 
declension neuter plural (partly)
'/a$/', # 1st 
declension singular
-   '/libri$/', '/nuntii$/',# 2nd 
declension plural (partly)
+   '/libri$/', '/nuntii$/', '/data$/', # 2nd 
declension plural (partly)
'/tio$/', '/ns$/', '/as$/', # 3rd 
declension singular (partly)
'/es$/' # 5th 
declension singular
);
@@ -99,7 +99,7 @@
'o',
'ommunibus',
'a',
-   'libris', 'nuntiis',
+   'libris', 'nuntiis', 'datis',
'tione', 'nte', 'ate',
'e'
);

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

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

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


[MediaWiki-commits] [Gerrit] Use MediaWiki message quotation-marks instead of wminc-la... - change (mediawiki...WikimediaIncubator)

2014-11-09 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Use MediaWiki message quotation-marks instead of 
wminc-languagecode
..

Use MediaWiki message quotation-marks instead of wminc-languagecode

Follow-up to Ibcf1ddc920e3ca6a9219de816860c3ffc1fa2e57 .

Change-Id: I79120fc7695cc2e33ef8988fc6d0470932ea051f
---
M InfoPage.php
M i18n/en.json
2 files changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/InfoPage.php b/InfoPage.php
index 41a59c8..b6e345d 100644
--- a/InfoPage.php
+++ b/InfoPage.php
@@ -41,7 +41,7 @@
$name = Language::fetchLanguageName( $this-mLangCode, 
$wgLang-getCode(), 'all' );
$this-mLangName = $name ? $name :
Language::fetchLanguageName( $this-mLangCode, 'en', 
'all' );
-   $titleParam = $this-mLangName ? $this-mLangName : wfMessage( 
'wminc-languagecode', $this-mLangCode )-text(); # Name, else code
+   $titleParam = $this-mLangName ? $this-mLangName : wfMessage( 
'quotation-marks', $this-mLangCode )-text(); # Name, else code
# Give grep a chance to find the usages:
# wminc-infopage-title-p, wminc-infopage-title-b, 
wminc-infopage-title-t, wminc-infopage-title-q,
# wminc-infopage-title-n, wminc-infopage-title-s, 
wminc-infopage-title-v, wminc-infopage-title-y
diff --git a/i18n/en.json b/i18n/en.json
index 90108ba..124f2bd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -74,7 +74,6 @@
wminc-fs-startwiki-exists-text: The prefix of your wiki is $1. The 
Main Page is at $2. You can now collaborate with other speakers of this 
language to build a community!\nIf you want to create a page, just type in the 
name in the search box above, and follow the link you will see.,
wminc-infopage-enter: go to the Main Page,
wminc-unknownlang: (unknown language code),
-   wminc-languagecode: \$1\,
wminc-manual-url: Help:Manual,
wminc-infopage-title-p: Wikipedia $1,
wminc-infopage-title-b: Wikibooks $1,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79120fc7695cc2e33ef8988fc6d0470932ea051f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix quot; in title on infopages - change (mediawiki...WikimediaIncubator)

2014-09-01 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Fix quot; in title on infopages
..

Fix quot; in title on infopages

This commit replaces the quot; tags with proper quotation marks
in the title of infopages with an unknown language code. It was
caused by the message being escaped twice.

Bug: 70240
Change-Id: I3f39d9eaa0fe23f076bc0d0f5337ede3e15020d2
---
M InfoPage.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaIncubator 
refs/changes/86/157686/1

diff --git a/InfoPage.php b/InfoPage.php
index 8b6108b..9433adc 100644
--- a/InfoPage.php
+++ b/InfoPage.php
@@ -48,7 +48,7 @@
$this-mFormatTitle = wfMessage( 'wminc-infopage-title-' . 
$this-mProjectCode, $titleParam )-escaped();
if ( !$this-mLangName ) {
# Unknown language, add short note to title
-   $this-mFormatTitle .= ' ' . wfMessage( 
'wminc-unknownlang', $this-mLangCode )-escaped();
+   $this-mFormatTitle .= ' ' . wfMessage( 
'wminc-unknownlang', $this-mLangCode )-text();
}
return;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f39d9eaa0fe23f076bc0d0f5337ede3e15020d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add localization capability to quotation marks - change (mediawiki...WikimediaIncubator)

2014-09-01 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add localization capability to quotation marks
..

Add localization capability to quotation marks

This commit adds the message wminc-languagecode so that the quotation
marks can be localized. They shouldn't always be straight as in English.

Change-Id: Ibcf1ddc920e3ca6a9219de816860c3ffc1fa2e57
---
M InfoPage.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 4 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaIncubator 
refs/changes/02/157702/1

diff --git a/InfoPage.php b/InfoPage.php
index 8b6108b..41a59c8 100644
--- a/InfoPage.php
+++ b/InfoPage.php
@@ -41,7 +41,7 @@
$name = Language::fetchLanguageName( $this-mLangCode, 
$wgLang-getCode(), 'all' );
$this-mLangName = $name ? $name :
Language::fetchLanguageName( $this-mLangCode, 'en', 
'all' );
-   $titleParam = $this-mLangName ? $this-mLangName : '' . 
$this-mLangCode . ''; # Name, else code
+   $titleParam = $this-mLangName ? $this-mLangName : wfMessage( 
'wminc-languagecode', $this-mLangCode )-text(); # Name, else code
# Give grep a chance to find the usages:
# wminc-infopage-title-p, wminc-infopage-title-b, 
wminc-infopage-title-t, wminc-infopage-title-q,
# wminc-infopage-title-n, wminc-infopage-title-s, 
wminc-infopage-title-v, wminc-infopage-title-y
diff --git a/i18n/en.json b/i18n/en.json
index 79c2537..90108ba 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -74,6 +74,7 @@
wminc-fs-startwiki-exists-text: The prefix of your wiki is $1. The 
Main Page is at $2. You can now collaborate with other speakers of this 
language to build a community!\nIf you want to create a page, just type in the 
name in the search box above, and follow the link you will see.,
wminc-infopage-enter: go to the Main Page,
wminc-unknownlang: (unknown language code),
+   wminc-languagecode: \$1\,
wminc-manual-url: Help:Manual,
wminc-infopage-title-p: Wikipedia $1,
wminc-infopage-title-b: Wikibooks $1,
@@ -103,4 +104,4 @@
wminc-infopage-status-beforeincubator-sister: This project is 
available at $1.,
wminc-infopage-error: Error: {{#infopage}} can only be used on 
prefixed pages.,
wminc-infopage-links: 
-}
\ No newline at end of file
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bbd03a6..7ae12e3 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -85,6 +85,7 @@
wminc-fs-startwiki-exists-text: Parameters:\n* $1 - the prefix 
(Wx/xyz)\n* $2 - a link to its main page (Wx/xyz/Main_Page),
wminc-infopage-enter: Text of a link to the Main Page of a test wiki 
at Incubator.,
wminc-unknownlang: Added after the title ''Wiki[project] \code\'' 
when no language name is found for the language code.,
+   wminc-languagecode: Used when a language code is provided but the 
language name is unknown on {{msg-wm|wminc-infopage-title-p}} and sister 
messages.\n* $1 - language code,
wminc-manual-url: {{notranslate}}\nUsed in:\n* 
{{msg-mw|Wminc-infopage-option-startwiki}}\n* 
{{msg-mw|Wminc-fs-settings-text}},
wminc-infopage-title-p: This is the main title of the info page. 
Parameters:\n* $1 - the language name from CLDR, i.e. it takes the name in your 
language if available. Otherwise, it's in English.\n{{Identical|Wikipedia}},
wminc-infopage-title-b: This is the main title of the info page. $1 
is the language name from CLDR, i.e. it takes the name in your language if 
available. Otherwise, it's in English.,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcf1ddc920e3ca6a9219de816860c3ffc1fa2e57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add fallback to Cajun French - change (translatewiki)

2014-08-25 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add fallback to Cajun French
..

Add fallback to Cajun French

This change adds French (français, fr) as a fallback language to
Cajun French (français cadien, frc). If Louisiana Creole French
(kréyol la lwizyàn, lou) is added to translatewiki, it may be added
as a fallback.

Change-Id: I13fab20d930e86daf1da36f4fa382465123e74a0
---
M FallbackSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/41/156141/1

diff --git a/FallbackSettings.php b/FallbackSettings.php
index 1a1d774..0a6ffd8 100644
--- a/FallbackSettings.php
+++ b/FallbackSettings.php
@@ -25,6 +25,7 @@
 $wgTranslateLanguageFallbacks['et'] = 'fi';
 $wgTranslateLanguageFallbacks['fi'] = array( 'de', 'sv', 'et', 'vro' );
 $wgTranslateLanguageFallbacks['fit'] = array( 'fi', 'sv' ); # Robin 2011-09-27
+$wgTranslateLanguageFallbacks['frc'] = 'fr'; # Ebe123 2014-08-25 ('lou' is not 
implemented)
 $wgTranslateLanguageFallbacks['fy'] = 'nl';
 $wgTranslateLanguageFallbacks['gcf'] = 'fr';
 $wgTranslateLanguageFallbacks['gom'] = 'gom-deva';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13fab20d930e86daf1da36f4fa382465123e74a0
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add gender support to 'Mobile-frontend-profile-userpage-link' - change (mediawiki...MobileFrontend)

2014-08-25 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add gender support to 'Mobile-frontend-profile-userpage-link'
..

Add gender support to 'Mobile-frontend-profile-userpage-link'

As asked at
https://translatewiki.net/wiki/Support#About_[[MediaWiki:Mobile-frontend-profile-userpage-link/uk]]_43430
by Base.

Change-Id: I5018b31784fb217ec8643c12b3d8f7f11b00a8b9
---
M i18n/en.json
M i18n/qqq.json
M includes/specials/SpecialUserProfile.php
3 files changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 15352de..6c096c8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -241,7 +241,7 @@
 mobile-frontend-profile-noargs: No username was given. Please provide a 
username to view a profile.,
 mobile-frontend-profile-nouser: No user with this name exists. 
Usernames are case sensitive so please check if it has been typed correctly.,
 mobile-frontend-profile-title: User profile,
-mobile-frontend-profile-userpage-link: Visit user page.,
+mobile-frontend-profile-userpage-link: Visit {{GENDER:$1|user}} page.,
 mobile-frontend-profile-usertalk: {{GENDER:$1|Talk to $1}},
 mobile-frontend-random-button: Random,
 mobile-frontend-regular-site: Desktop view,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3ed2e5a..11453b4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -267,7 +267,7 @@
mobile-frontend-profile-noargs: Message shown when no user profile 
URL is specified.\n\nIf the user is logged in, this message is followed by:\n* 
{{msg-mw|Mobile-frontend-profile-yours}},
mobile-frontend-profile-nouser: Message shown when the username 
requested is non-existent or invalid.\n\nIf the user is logged in, this message 
is followed by:\n* {{msg-mw|Mobile-frontend-profile-yours}},
mobile-frontend-profile-title: Title of the [[Special:UserProfile]] 
page.\n{{Identical|User profile}},
-   mobile-frontend-profile-userpage-link: Label for a link to user page 
that shows on [[Special:UserProfile]].,
+   mobile-frontend-profile-userpage-link: Label for a link to user page 
that shows on [[Special:UserProfile]].\n\nParameter:\n* $1 - username of user 
who talk page belongs to. Can be used for GENDER.,
mobile-frontend-profile-usertalk: Link label to user talk 
page.\n\nParameters:\n* $1 - username of user who talk page belongs to. Can be 
used for GENDER.,
mobile-frontend-random-button: This is the label of one of the 
buttons that appear if you click the wiki logo near the search box.\n\nThis 
buttons takes the user to a random page.\n{{Identical|Random}},
mobile-frontend-regular-site: When on the mobile site, this text 
links to the normal page for desktop computers,
diff --git a/includes/specials/SpecialUserProfile.php 
b/includes/specials/SpecialUserProfile.php
index 90bc86d..a0f0c1b 100644
--- a/includes/specials/SpecialUserProfile.php
+++ b/includes/specials/SpecialUserProfile.php
@@ -200,14 +200,16 @@
$uploadCount = 500;
}
 
+   $username = $this-targetUser-getName();
+
return Html::openElement( 'div', array( 'class' = 'footer' ) )
. Html::openElement( 'div' )
-   . $this-msg( $msg, $this-targetUser-getName() )-
+   . $this-msg( $msg, $username )-
numParams( $units, $editCount, $uploadCount 
)-parse()
. Html::closeElement( 'div' )
. Html::openElement( 'div' )
. Linker::link( $this-targetUser-getUserPage(),
-   $this-msg( 
'mobile-frontend-profile-userpage-link' )-escaped()
+   $this-msg( 
'mobile-frontend-profile-userpage-link', $username )-escaped()
)
. Html::closeElement( 'div' )
. $this-getTalkLink();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5018b31784fb217ec8643c12b3d8f7f11b00a8b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add option to hide and unhide file thumbnails in file history - change (mediawiki/core)

2014-08-24 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add option to hide and unhide file thumbnails in file history
..

Add option to hide and unhide file thumbnails in file history

This change adds a show/hide option to the thumbnails of files in
the file history, that defaults to hiding the thumbnails. The message
used is 'filehist-showhidethumb' and also messages suffixed with -show
and -hide for the options. The global 'wgShowArchiveThumbnails'
has been removed, being replaced by the new user option.

Bug: 69053
Change-Id: Ie993204e8c2a3e52713479f7f2451fc3e7c65580
---
M RELEASE-NOTES-1.24
M includes/DefaultSettings.php
M includes/page/ImagePage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
5 files changed, 66 insertions(+), 7 deletions(-)


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

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 32ce12b..bccf721 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -63,6 +63,7 @@
 * The default thumb size ($wgDefaultUserOptions['thumbsize']) is now 300px, up 
from
   180px. If you have altered the number of entries in $wgThumbLimits for your 
wiki, you
   may need to adjust your default user settings to compensate for the index 
change.
+* $wgShowArchiveThumbnails has been removed.
 
 === New features in 1.24 ===
 * Added a new hook, WhatLinksHereProps, to allow extensions to annotate
@@ -169,6 +170,7 @@
 * (bug 35045) Redirects to sections will now update the URL in browser's 
address
   bar using the HTML5 History API. When [[Dog]] redirects to [[Animals#Dog]],
   the user will now see Animals#Dog in their browser instead of Dog#Dog.
+* (bug 69053) File thumbnails can be shown or hidden in the file history.
 
 === Bug fixes in 1.24 ===
 * (bug 50572) MediaWiki:Blockip should support gender
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 14799c6..af589d3 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1062,11 +1062,6 @@
 $wgGenerateThumbnailOnParse = true;
 
 /**
- * Show thumbnails for old images on the image description page
- */
-$wgShowArchiveThumbnails = true;
-
-/**
  * If set to true, images that contain certain the exif orientation tag will
  * be rotated accordingly. If set to null, try to auto-detect whether a scaler
  * is available that can rotate.
diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php
index 380252f..89476a8 100644
--- a/includes/page/ImagePage.php
+++ b/includes/page/ImagePage.php
@@ -1166,15 +1166,40 @@
 * @param ImagePage $imagePage
 */
public function __construct( $imagePage ) {
-   global $wgShowArchiveThumbnails;
+   $this-setup( $imagePage );
+
$this-current = $imagePage-getFile();
$this-img = $imagePage-getDisplayedFile();
$this-title = $imagePage-getTitle();
$this-imagePage = $imagePage;
-   $this-showThumb = $wgShowArchiveThumbnails  
$this-img-canRender();
+   $this-showThumb = !$this-opts-getValue( 'hidethumb' )  
$this-img-canRender();
$this-setContext( $imagePage-getContext() );
}
 
+   protected function setup( $par ) {
+   // To be able to add more options
+   $opts = new FormOptions();
+   $this-opts = $opts;
+   $opts-add( 'hidethumb', false );
+
+   // Set values
+   $opts-fetchValuesFromRequest( $this-getRequest() );
+   if ( $par ) {
+   $this-parseParams( $par );
+   }
+
+   // Validate
+   $opts-validateIntBounds( 'limit', 0, 5000 );
+   }
+
+   protected function parseParams( $par ) {
+   $bits = preg_split( '/\s*,\s*/', trim( $par ) );
+   foreach ( $bits as $bit ) {
+   if ( 'hidethumb' === $bit ) {
+   $this-opts-setValue( 'hidethumb', true );
+   }
+   }
+   }
/**
 * @return ImagePage
 */
@@ -1198,6 +1223,9 @@
. \n
. div id=\mw-imagepage-section-filehistory\\n
. $this-msg( 'filehist-help' )-parseAsBlock()
+   . 'trtd/tdtd class=mw-input'
+   . $this-filterLinks()
+   . '/td/tr'
. $navLinks . \n
. Xml::openElement( 'table', array( 'class' = 
'wikitable filehistory' ) ) . \n
. 'trtd/td'
@@ -1436,6 +1464,34 @@
public function getPreventClickjacking() {
return $this-preventClickjacking;
}
+
+   protected function filterLinks() {
+   // show/hide links
+   

[MediaWiki-commits] [Gerrit] Create sub-statuses for invalid and rejected test-wikis - change (mediawiki...WikimediaIncubator)

2014-08-14 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Create sub-statuses for invalid and rejected test-wikis
..

Create sub-statuses for invalid and rejected test-wikis

This change adds three sub-statuses in the 'missing' status as
- 'tocreate': (default) No problem for the creation of the test-wiki
- 'invalid': the ISO 639 code is invalid
- 'rejected': the project is unsuitable for the Wikimedia Incubator
The 'invalid' status is to work with the future language check feature
'mThisLangData'. The 'rejected' status is also for the future with
the replacement of Template:Test_wiki with {{#infopage:}}.

This change was proposed at:
https://incubator.wikimedia.org/wiki/User:SPQRobin/notes#Extension
(specifically for the Wikipedia in Klignon (Wp/tlh)).

Change-Id: Idd13a443e8f7a9cb3c874d53d4cbcf35f34c5fdb
---
M InfoPage.php
M WikimediaIncubator.class.php
M i18n/af.json
M i18n/ar.json
M i18n/ast.json
M i18n/azb.json
M i18n/bar.json
M i18n/be-tarask.json
M i18n/br.json
M i18n/cs.json
M i18n/de.json
M i18n/diq.json
M i18n/dsb.json
M i18n/en.json
M i18n/eo.json
M i18n/es.json
M i18n/et.json
M i18n/fa.json
M i18n/fi.json
M i18n/fr.json
M i18n/frp.json
M i18n/gl.json
M i18n/he.json
M i18n/hsb.json
M i18n/hu.json
M i18n/ia.json
M i18n/it.json
M i18n/ja.json
M i18n/ka.json
M i18n/ko.json
M i18n/ksh.json
M i18n/lb.json
M i18n/lt.json
M i18n/lus.json
M i18n/mk.json
M i18n/ml.json
M i18n/mr.json
M i18n/ms.json
M i18n/nb.json
M i18n/nl.json
M i18n/pl.json
M i18n/pms.json
M i18n/pt-br.json
M i18n/pt.json
M i18n/qqq.json
M i18n/ro.json
M i18n/roa-tara.json
M i18n/ru.json
M i18n/si.json
M i18n/sl.json
M i18n/sr-ec.json
M i18n/sr-el.json
M i18n/sv.json
M i18n/ta.json
M i18n/tl.json
M i18n/tr.json
M i18n/uk.json
M i18n/vi.json
M i18n/zh-hans.json
M i18n/zh-hant.json
60 files changed, 94 insertions(+), 75 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaIncubator 
refs/changes/27/154127/1

diff --git a/InfoPage.php b/InfoPage.php
index 8b6108b..0952cb5 100644
--- a/InfoPage.php
+++ b/InfoPage.php
@@ -3,7 +3,9 @@
  * Implements the info page (Wx/xx pages)
 
 'missing' showMissingWiki()
-A [Project] in this language does not yet exist.
+'tocreate': The test-wiki in this language does not yet exist.
+'invalid': The language code is not valid.
+'rejected': The test-wiki in this language is not allowed per the 
Incubator's or the language committee's policies.
 'incubator' showIncubatingWiki()
 'open': This is a new Incubator wiki that is not yet verified by the 
language committee.
 'eligible': This Incubator wiki has been marked as eligible by the 
language committee.
@@ -149,26 +151,38 @@
 */
public function showMissingWiki() {
global $wgRequest;
-   $link = SpecialPage::getTitleFor( 'IncubatorFirstSteps' );
-   $query = array( 'testwiki' = $this-mPrefix,
-   'uselang' = $wgRequest-getVal( 'uselang' ) );
-   $steps = $link-getFullUrl( $query );
+   $subStatus = $this-mSubStatus;
+   if ( $subStatus == null ) {
+   $subStatus = 'tocreate';
+   }
+
+   if ( $subStatus == 'tocreate' ) {
+   $link = SpecialPage::getTitleFor( 'IncubatorFirstSteps' 
);
+   $query = array( 'testwiki' = $this-mPrefix,
+   'uselang' = $wgRequest-getVal( 'uselang' ) );
+   $steps = $link-getFullUrl( $query );
+   }
 
$content = Html::rawElement( 'div',
array( 'class' = 'wminc-infopage-status' ),
-   wfMessage( 'wminc-infopage-missingwiki-text',
-   $this-mProjectName, $this-mLangName )-parseAsBlock()
+   # Give grep a chance to find the usages:
+   # wminc-infopage-tocreatewiki-text, 
wminc-infopage-invalidwiki-text,
+   # wminc-infopage-rejectedwiki-text
+   wfMessage( 'wminc-infopage-' . $subStatus . 'wiki-text',
+   $this-mProjectName, $this-mLangName, $this-mLangCode 
)-parseAsBlock()
) .
Html::rawElement( 'ul', array( 'class' = 
'wminc-infopage-options' ),
-   Html::rawElement( 'li', null,
-   wfMessage( $this-mIsSister ? 
'wminc-infopage-option-startsister' : 'wminc-infopage-option-startwiki',
-   $this-mProjectName, $this-mPortal, 
$steps )-parse() ) .
-   Html::rawElement( 'li', null,
-   wfMessage( 
'wminc-infopage-option-languages-existing',
-   $this-mProjectName )-parse() ) .
-   Html::rawElement( 'li', null,
-   

[MediaWiki-commits] [Gerrit] Remove duplicate translations - change (mediawiki...WikimediaIncubator)

2014-08-10 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Remove duplicate translations
..

Remove duplicate translations

This is a follow-up to change 150463 where I had accidentally made
duplicate translations in some translation files.

Change-Id: Icbe013e08f8fd79c4a419f368a0b4e0367786055
---
M i18n/ba.json
M i18n/fr.json
2 files changed, 1 insertion(+), 36 deletions(-)


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

diff --git a/i18n/ba.json b/i18n/ba.json
index 83621b2..2df6ded 100644
--- a/i18n/ba.json
+++ b/i18n/ba.json
@@ -15,12 +15,5 @@
wminc-infopage-title-s: Викикитапхана $1,
wminc-infopage-title-v: Викиверситет $1,
wminc-infopage-enter: Баш биткә күсергә,
-   wminc-unknownlang: (билдәһеҙ тел коды),
-   wminc-infopage-title-p: Википедия $1,
-   wminc-infopage-title-b: Викикитаптар $1,
-   wminc-infopage-title-t: Викиһүҙлек $1,
-   wminc-infopage-title-q: Викиөҙөмтә $1,
-   wminc-infopage-title-n: Викияңылыҡтар $1,
-   wminc-infopage-title-s: Викикитапхана $1,
-   wminc-infopage-title-v: Викиверситет $1
+   wminc-unknownlang: (билдәһеҙ тел коды)
 }
diff --git a/i18n/fr.json b/i18n/fr.json
index edf80de..56e4d21 100644
--- a/i18n/fr.json
+++ b/i18n/fr.json
@@ -109,33 +109,5 @@
wminc-infopage-status-created: Ce projet a été approuvé par le 
comité linguistique et est maintenant disponible sur $1.,
wminc-infopage-status-beforeincubator: Ce projet, disponible sur $1, 
a été créé avant que l’Incubateur Wikimedia ait été lancé.,
wminc-infopage-status-beforeincubator-sister: Ce projet est 
disponible sur $1 .,
-   wminc-infopage-error: Erreur: {{#infopage}} ne peut être utilisé que 
sur des pages préfixées.,
-   wminc-infopage-enter: aller à la page d’accueil,
-   wminc-unknownlang: (code de langue inconnu),
-   wminc-infopage-title-p: Wikipédia en $1,
-   wminc-infopage-title-b: Wikibooks en $1,
-   wminc-infopage-title-t: Wiktionnaire en $1,
-   wminc-infopage-title-q: Wikiquote en $1,
-   wminc-infopage-title-n: Wikinews en $1,
-   wminc-infopage-title-s: Wikisource en $1,
-   wminc-infopage-title-v: Wikiversité en $1,
-   wminc-infopage-title-y: Wikivoyage $1,
-   wminc-infopage-welcome: Bienvenue sur l’Incubateur Wikimedia, un 
projet de la Wikimedia Foundation ([[{{MediaWiki:Aboutpage}}|à propos]]),
-   wminc-infopage-missingwiki-text: $1 n’existe pas encore dans cette 
langue.,
-   wminc-infopage-option-startwiki: Si vous voulez démarrer ce wiki, 
merci de suivre\n'''[$3 ces étapes]''' et 
[[{{MediaWiki:Wminc-manual-url}}|notre manuel]].,
-   wminc-infopage-option-startsister: Si vous voulez commencer ce wiki, 
vous pouvez vous rendre sur strong[$2 $1]/strong.,
-   wminc-infopage-option-languages-existing: Vous pouvez chercher des 
[//www.$1.org versions linguistiques existantes de $1].,
-   wminc-infopage-option-sisterprojects-existing: Vous pouvez chercher 
des projets existants dans cette langue :,
-   wminc-infopage-option-sisterprojects-other: Vous pouvez chercher 
d’autres projets dans cette langue :,
-   wminc-infopage-option-multilingual: À la place, vous pouvez aller 
vers un wiki multilingue:,
-   wminc-infopage-createmainpage: Saisissez l’expression « Page 
d’accueil » dans cette langue :,
-   wminc-infopage-contribute: Si vous parlez cette langue, vous êtes 
invités à contribuer !,
-   wminc-infopage-status-open: Il s’agit d’un wiki ouvert de 
l’Incubateur Wikimedia.,
-   wminc-infopage-status-imported: Ce wiki Incubateur a été importé 
depuis $1 après que le wiki ait été fermé.,
-   wminc-infopage-status-closedsister: Ce sous-domaine a été fermé. 
Veuillez vous rendre sur strong$2/strong pour contribuer à ce wiki.,
-   wminc-infopage-status-approved: Ce wiki incubateur a été approuvé 
par le [[meta:Special:MyLanguage/Language_committee|Comité linguistique]] et 
sera bientôt créé.,
-   wminc-infopage-status-created: Ce projet a été approuvé par le 
comité linguistique et est maintenant disponible sur $1.,
-   wminc-infopage-status-beforeincubator: Ce projet, disponible sur $1, 
a été créé avant que l’Incubateur Wikimedia ait été lancé.,
-   wminc-infopage-status-beforeincubator-sister: Ce projet est 
disponible sur $1 .,
wminc-infopage-error: Erreur: {{#infopage}} ne peut être utilisé que 
sur des pages préfixées.
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbe013e08f8fd79c4a419f368a0b4e0367786055
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com


[MediaWiki-commits] [Gerrit] Standardize indentation of en.json - change (mediawiki...WikimediaIncubator)

2014-08-06 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Standardize indentation of en.json
..

Standardize indentation of en.json

The indentation used on en.json (4 spaces) is not consistant with
the indentation on other json files (tab). This change fixes the
inconsistancy.

Change-Id: I835325c50f54ce40fca7754fa3636c70ca78c402
---
M i18n/en.json
1 file changed, 105 insertions(+), 105 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index a1a1b11..124f2bd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,106 +1,106 @@
 {
-@metadata: {
-authors: [
-SPQRobin
-]
-},
-wminc-desc: Test wiki system for Wikimedia Incubator,
-wminc-manual: Manual,
-wminc-listwikis: List of wikis,
-wminc-testwiki: Test wiki:,
-wminc-testwiki-code: Test wiki language:,
-wminc-testwiki-none: None/All,
-wminc-testwiki-site: (Maintenance),
-wminc-recentchanges-all: All recent changes,
-wminc-prefinfo-language: Your interface language - independent from 
your test wiki,
-wminc-prefinfo-code: The ISO 639 code of the language you are working 
on here,
-wminc-prefinfo-project: Select the Wikimedia project you are working on 
here,
-wminc-prefinfo-error: You selected a project that needs a language 
code.,
-wminc-error-help: Help:Contents,
-wminc-error-move-unprefixed: strongError:/strong The page you are 
trying to move to [[{{MediaWiki:Wminc-error-help}}|is unprefixed or has a wrong 
prefix]].,
-wminc-error-wronglangcode: strongError:/strong This page contains a 
[[{{MediaWiki:Wminc-error-help}}|wrong language code]] \$1\.,
-wminc-error-unprefixed: strongError:/strong This page is 
[[{{MediaWiki:Wminc-error-help}}|unprefixed]].,
-wminc-error-unprefixed-suggest: strongError:/strong This page is 
[[{{MediaWiki:Wminc-error-help}}|unprefixed]]! You can create a page at 
[[:$1]].,
-wminc-error-wiki-exists: This wiki already exists. You can find this 
page on $1. If the wiki was recently created, please wait a few hours or days 
until all content is imported.,
-wminc-error-wiki-sister: This page belongs to a project that is not 
hosted here. Please go to $1 to find the wiki.,
-randombytest: Random page by test wiki,
-randombytest-nopages: There are no pages in your test wiki, in the 
namespace: $1.,
-wminc-viewuserlang: Look up user language and test wiki,
-wminc-viewuserlang-user: Username:,
-wminc-viewuserlang-go: Go,
-wminc-userdoesnotexist: The user \$1\ does not exist.,
-wminc-ip: \$1\ is an IP address.,
-right-viewuserlang: View user language and test wiki,
-group-test-sysop: Test wiki administrators,
-group-test-sysop-member: {{GENDER:$1|test wiki administrator}},
-grouppage-test-sysop: {{ns:project}}:Test wiki administrators,
-group-test-sysop.css: /* CSS placed here will affect test wiki 
administrators only */,
-group-test-sysop.js: /* JS placed here will affect test wiki 
administrators only */,
-wminc-code-macrolanguage: The [[wikipedia:$2 language|\$3\ language]] 
is a [[wikipedia:ISO 639 macrolanguage|macrolanguage]], consisting of the 
following member languages:,
-wminc-code-collective: The code \$1\ does not refer to a specific 
language, but to a collection of languages, namely the [[wikipedia:$2 
language|\$3\ languages]].,
-wminc-code-retired: This language code has been changed and no longer 
refers to the original language.,
-wminc-listusers-testwiki: You are viewing users who have set their test 
wiki preference to $1.,
-wminc-search-nocreate-nopref: You searched for \$1\. Please set your 
[[Special:Preferences|test wiki preference]] so we can tell you which page you 
can create!,
-wminc-search-nocreate-suggest: You searched for \$1\. You can create 
a page in your wiki at strong[[$3]]/strong!,
-wminc-searchwiki: Search for a wiki,
-wminc-searchwiki-noproject: You did not select a project.,
-wminc-searchwiki-noresults: No results. You can search by language 
codes, native names and names in your interface language or English.,
-wminc-searchwiki-selectproject: Search for:,
-wminc-searchwiki-inputlanguage: In language:,
-wminc-searchwiki-go: Go,
-wminc-searchwiki-multiplematches: Your search matches the following 
languages:,
-wminc-searchwiki-match-langcode: \$1\ is an ISO 639 language code for 
$2.,
-wminc-searchwiki-match-userlangname: $1 is the name of a language.,
-wminc-searchwiki-match-englishname: \$1\ is the name for $2 in 
English.,
-wminc-searchwiki-match-nativename: \$1\ is the name for $2 in that 
language.,
-wminc-searchwiki-goto: strong$1/strong ($2),
-wminc-searchwiki-gotoinfopage: info page,
-wminc-fs-pagetitle: Getting started wizard 

[MediaWiki-commits] [Gerrit] Merge Wikimedia Incubator and Infopage translations - change (translatewiki)

2014-08-05 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Merge Wikimedia Incubator and Infopage translations
..

Merge Wikimedia Incubator and Infopage translations

This is a follow-up for change I524fb415111904377d0f6226683e4a837ff5338c.

Change-Id: I8eda3c9d61aa7ea51712bb8543ca960fa4a57788
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/37/151837/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index ce5af75..40496e3 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -2217,16 +2217,12 @@
 Wikimedia Events
 
 Wikimedia Incubator
-file = WikimediaIncubator/i18n/incubator/%CODE%.json
+file = WikimediaIncubator/i18n/%CODE%.json
 descmsg = wminc-desc
 ignored = wminc-error-help, wminc-fs-langselect-langs, wminc-fs-settings-image
+ignored = wminc-infopage-prefill, wminc-manual-url, wminc-infopage-links
 optional = wminc-searchwiki-goto
 optional = group-test-sysop.css, group-test-sysop.js
-
-Wikimedia Incubator - Info Page
-file = WikimediaIncubator/i18n/infopage/%CODE%.json
-descmsg = wminc-desc
-ignored = wminc-infopage-prefill, wminc-manual-url, wminc-infopage-links
 
 Wikimedia Messages
 file = WikimediaMessages/i18n/wikimedia/%CODE%.json

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8eda3c9d61aa7ea51712bb8543ca960fa4a57788
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add link to Special:PrefixIndex to Delete dialog - change (mediawiki/core)

2014-08-01 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add link to Special:PrefixIndex to Delete dialog
..

Add link to Special:PrefixIndex to Delete dialog

This change adds a link to a table of subpages of the page being
deleted through Special:PrefixIndex/{{FULLPAGENAME}}. It is in
the message Deleting-subpages-warning. It is only shown if the
page being deleted  has subpages.

Bug: 30666
Change-Id: Ibd705ed77452a55f782ed855c676d7ee23e9ad61
---
M includes/page/Article.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/151061/1

diff --git a/includes/page/Article.php b/includes/page/Article.php
index a189c2e..744ea3b 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1656,16 +1656,23 @@
 */
public function confirmDelete( $reason ) {
wfDebug( Article::confirmDelete\n );
+   $title = $this-getTitle();
 
$outputPage = $this-getContext()-getOutput();
-   $outputPage-setPageTitle( wfMessage( 'delete-confirm', 
$this-getTitle()-getPrefixedText() ) );
-   $outputPage-addBacklinkSubtitle( $this-getTitle() );
+   $outputPage-setPageTitle( wfMessage( 'delete-confirm', 
$title-getPrefixedText() ) );
+   $outputPage-addBacklinkSubtitle( $title );
$outputPage-setRobotPolicy( 'noindex,nofollow' );
-   $backlinkCache = $this-getTitle()-getBacklinkCache();
+
+   $backlinkCache = $title-getBacklinkCache();
if ( $backlinkCache-hasLinks( 'pagelinks' ) || 
$backlinkCache-hasLinks( 'templatelinks' ) ) {
$outputPage-wrapWikiMsg( div class='mw-warning 
plainlinks'\n$1\n/div\n,
'deleting-backlinks-warning' );
}
+
+   if ( $title-hasSubpages() ) {
+   $outputPage-wrapWikiMsg( div class='mw-warning 
plainlinks'\n$1\n/div\n,
+   'deleting-subpages-warning' );
+   }
$outputPage-addWikiMsg( 'confirmdeletetext' );
 
wfRunHooks( 'ArticleConfirmDelete', array( $this, $outputPage, 
$reason ) );
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index d506ad2..8fce2c5 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1875,6 +1875,7 @@
delete-toobig: This page has a large edit history, over $1 
{{PLURAL:$1|revision|revisions}}.\nDeletion of such pages has been restricted 
to prevent accidental disruption of {{SITENAME}}.,
delete-warning-toobig: This page has a large edit history, over $1 
{{PLURAL:$1|revision|revisions}}.\nDeleting it may disrupt database operations 
of {{SITENAME}};\nproceed with caution.,
deleting-backlinks-warning: '''Warning:''' 
[[Special:WhatLinksHere/{{FULLPAGENAME}}|Other pages]] link to or transclude 
the page you are about to delete.,
+   deleting-subpages-warning: '''Warning:''' The page you are about to 
delete has [[Special:PrefixIndex/{{FULLPAGENAME}}|subpages]].,
rollback: Roll back edits,
rollback_short: Rollback,
rollbacklink: rollback,
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 9a1d2e1..3498cf9 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -2037,6 +2037,7 @@
delete-toobig: Parameters:\n* $1 - the upper limit of number of 
revisions\nSee also:\n* {{msg-mw|Delete-warning-toobig}},
delete-warning-toobig: Parameters:\n* $1 - the upper limit of number 
of revisions\nSee also:\n* {{msg-mw|Delete-toobig}},
deleting-backlinks-warning: A warning shown when a page that is 
being deleted has at least one link to it or is transcluded in at least one 
page.,
+   deleting-subpages-warning: A warning shown when a page that is being 
deleted has at least one subpage. \nSee also:\n* 
{{msg-mw|Deleting-backlinks-warning}},
rollback: {{Identical|Rollback}},
rollback_short: {{Identical|Rollback}},
rollbacklink: {{Doc-actionlink}}\nThis link text appears on the 
recent changes page to users who have the \rollback\ right.\nThis message has 
a tooltip {{msg-mw|tooltip-rollback}}\n{{Identical|Rollback}},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd705ed77452a55f782ed855c676d7ee23e9ad61
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Replace IP userpage link by IP contribution page - change (mediawiki...MobileFrontend)

2014-07-30 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Replace IP userpage link by IP contribution page
..

Replace IP userpage link by IP contribution page

Bug: 68775
Change-Id: Ic105766b545e9a0862c5fb17a468a762c3a56030
---
M includes/specials/SpecialMobileDiff.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index 940ab04..9d16f26 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -297,7 +297,7 @@
);
} else {
$ipAddr = $this-rev-getUserText();
-   $userPage = Title::makeTitle( NS_USER, $ipAddr );
+   $userPage = SpecialPage::getTitleFor( 'Contributions', 
$ipAddr );
$output-addHtml(
'div class=mw-mf-user mw-mf-anon icon 
icon-16px icon-text' .
$this-msg( 
'mobile-frontend-diffview-anonymous' )-escaped() .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic105766b545e9a0862c5fb17a468a762c3a56030
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Change native name of Southern Luri - change (translatewiki)

2014-07-29 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Change native name of Southern Luri
..

Change native name of Southern Luri

This change modifies the name of Southern Luri (luz) from لری جنووی
to لری دومنی by request of Mogoeilor on Support.

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/00/150400/1

diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php
index 2dda668..14a4b07 100644
--- a/TranslatewikiSettings.php
+++ b/TranslatewikiSettings.php
@@ -317,7 +317,7 @@
 $wgExtraLanguageNames['mww-latn'] = 'Hmoob Dawb'; # Hmong Daw / Siebrand 
2013-12-02
 $wgExtraLanguageNames['rmf'] = 'kaalengo tšimb'; # Romani language spoken in 
Finland / Nike 2014-03-05
 $wgExtraLanguageNames['zgh'] = 'ⵜⴰⵎⴰⵣⵉⵖⵜ'; # Standard Moroccan Tamazight / 
Siebrand 2014-03-11
-$wgExtraLanguageNames['luz'] = 'لری جنووی '; # Southern Luri / Siebrand 
2014-03-12
+$wgExtraLanguageNames['luz'] = 'لری دومنی'; # Southern Luri / Ebe123  
2014-07-29
 $wgExtraLanguageNames['ciw'] = 'Ojibwemowin'; # Chippewa / Siebrand 2014-03-21
 $wgExtraLanguageNames['lki'] = 'لەکی‎'; # Laki / Siebrand 2014-04-08
 $wgExtraLanguageNames['kac'] = 'Jinghpaw'; # Jingpho / Siebrand 2014-04-08

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e5924c9deb965fc57de53885d1081c9a6740197
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Merge infopage and incubator i18n - change (mediawiki...WikimediaIncubator)

2014-07-29 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Merge infopage and incubator i18n
..

Merge infopage and incubator i18n

This change merges the incubator and infopage directories
(including translations and credits) and moves the result in the
root i18n directory.

(Tedious manual work is done when I'm fatally bored)

Change-Id: I524fb415111904377d0f6226683e4a837ff5338c
---
D InfoPage.i18n.php
M WikimediaIncubator.i18n.php
M WikimediaIncubator.php
R i18n/ace.json
R i18n/ady-cyrl.json
R i18n/af.json
R i18n/aln.json
R i18n/anp.json
R i18n/ar.json
R i18n/arc.json
R i18n/ary.json
R i18n/arz.json
A i18n/as.json
R i18n/ast.json
R i18n/avk.json
R i18n/az.json
R i18n/azb.json
A i18n/ba.json
R i18n/bar.json
R i18n/be-tarask.json
R i18n/bg.json
R i18n/bn.json
R i18n/br.json
R i18n/bs.json
R i18n/ca.json
R i18n/ce.json
R i18n/ckb.json
R i18n/cs.json
R i18n/cy.json
R i18n/da.json
R i18n/de-formal.json
R i18n/de.json
R i18n/diq.json
R i18n/dsb.json
R i18n/dtp.json
R i18n/ee.json
R i18n/el.json
R i18n/en.json
R i18n/eo.json
R i18n/es.json
R i18n/et.json
R i18n/eu.json
R i18n/fa.json
R i18n/fi.json
A i18n/fr.json
A i18n/frc.json
R i18n/frp.json
R i18n/ga.json
R i18n/gl.json
R i18n/gom-latn.json
A i18n/grc.json
R i18n/gsw.json
R i18n/gu.json
R i18n/he.json
R i18n/hi.json
R i18n/hil.json
R i18n/hr.json
R i18n/hsb.json
A i18n/hsn.json
A i18n/hu.json
R i18n/hy.json
R i18n/ia.json
R i18n/id.json
R i18n/ig.json
D i18n/incubator/af.json
D i18n/incubator/as.json
D i18n/incubator/azb.json
D i18n/incubator/fr.json
D i18n/incubator/frc.json
D i18n/incubator/grc.json
D i18n/incubator/hsn.json
D i18n/incubator/hu.json
D i18n/incubator/kn.json
D i18n/incubator/mr.json
D i18n/incubator/nb.json
D i18n/incubator/roa-tara.json
D i18n/incubator/sa.json
D i18n/incubator/sq.json
D i18n/incubator/tet.json
D i18n/infopage/ar.json
D i18n/infopage/as.json
D i18n/infopage/ast.json
D i18n/infopage/avk.json
D i18n/infopage/az.json
D i18n/infopage/ba.json
D i18n/infopage/bar.json
D i18n/infopage/be-tarask.json
D i18n/infopage/br.json
D i18n/infopage/ce.json
D i18n/infopage/cs.json
D i18n/infopage/cy.json
D i18n/infopage/de-formal.json
D i18n/infopage/de.json
D i18n/infopage/diq.json
D i18n/infopage/dsb.json
D i18n/infopage/el.json
D i18n/infopage/en.json
D i18n/infopage/eo.json
D i18n/infopage/es.json
D i18n/infopage/et.json
D i18n/infopage/fa.json
D i18n/infopage/fi.json
D i18n/infopage/fr.json
D i18n/infopage/frc.json
D i18n/infopage/frp.json
D i18n/infopage/gl.json
D i18n/infopage/grc.json
D i18n/infopage/gsw.json
D i18n/infopage/he.json
D i18n/infopage/hi.json
D i18n/infopage/hsb.json
D i18n/infopage/hsn.json
D i18n/infopage/hu.json
D i18n/infopage/ia.json
D i18n/infopage/id.json
D i18n/infopage/it.json
D i18n/infopage/ja.json
D i18n/infopage/ka.json
D i18n/infopage/kn.json
D i18n/infopage/ko.json
D i18n/infopage/ksh.json
D i18n/infopage/lb.json
D i18n/infopage/li.json
D i18n/infopage/lt.json
D i18n/infopage/lus.json
D i18n/infopage/lv.json
D i18n/infopage/mk.json
D i18n/infopage/ml.json
D i18n/infopage/mr.json
D i18n/infopage/ms.json
D i18n/infopage/nb.json
D i18n/infopage/nl.json
D i18n/infopage/or.json
D i18n/infopage/pl.json
D i18n/infopage/pms.json
D i18n/infopage/ps.json
D i18n/infopage/pt-br.json
D i18n/infopage/pt.json
D i18n/infopage/qqq.json
D i18n/infopage/ro.json
D i18n/infopage/roa-tara.json
D i18n/infopage/ru.json
D i18n/infopage/rue.json
D i18n/infopage/sa.json
D i18n/infopage/si.json
D i18n/infopage/sl.json
D i18n/infopage/sr-ec.json
D i18n/infopage/sr-el.json
D i18n/infopage/sv.json
D i18n/infopage/ta.json
D i18n/infopage/te.json
D i18n/infopage/tet.json
D i18n/infopage/tl.json
D i18n/infopage/tr.json
D i18n/infopage/tt-cyrl.json
D i18n/infopage/tzm.json
D i18n/infopage/ug-arab.json
D i18n/infopage/uk.json
D i18n/infopage/vi.json
D i18n/infopage/yi.json
D i18n/infopage/zh-hans.json
D i18n/infopage/zh-hant.json
R i18n/it.json
R i18n/ja.json
R i18n/jam.json
R i18n/jv.json
R i18n/ka.json
R i18n/khw.json
R i18n/km.json
A i18n/kn.json
R i18n/ko.json
R i18n/koi.json
R i18n/ksh.json
R i18n/ku-latn.json
R i18n/kw.json
R i18n/ky.json
R i18n/lb.json
R i18n/li.json
R i18n/lrc.json
R i18n/lt.json
R i18n/lus.json
R i18n/lv.json
R i18n/lzz.json
R i18n/mg.json
R i18n/min.json
R i18n/mk.json
R i18n/ml.json
R i18n/mn.json
A i18n/mr.json
R i18n/ms.json
R i18n/mt.json
R i18n/myv.json
A i18n/nb.json
R i18n/nds-nl.json
R i18n/ne.json
R i18n/nl.json
R i18n/nn.json
R i18n/oc.json
R i18n/or.json
R i18n/pdc.json
R i18n/pfl.json
R i18n/pl.json
R i18n/pms.json
R i18n/pnt.json
R i18n/ps.json
R i18n/pt-br.json
R i18n/pt.json
R i18n/qqq.json
R i18n/qug.json
R i18n/ro.json
A i18n/roa-tara.json
R i18n/ru.json
R i18n/rue.json
A i18n/sa.json
R i18n/sah.json
R i18n/sc.json
R i18n/scn.json
R i18n/sco.json
R i18n/sgs.json
R i18n/sh.json
R i18n/shi.json
R i18n/si.json
R i18n/sk.json
R i18n/sl.json
R i18n/sq.json
R i18n/sr-ec.json
R 

[MediaWiki-commits] [Gerrit] Added myself to CREDITS - change (mediawiki/core)

2014-07-28 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Added myself to CREDITS
..

Added myself to CREDITS

Added myself to CREDITS, as suggested by Vogone.

Change-Id: Ia1759a753b06bbe672a4e9ecd7d9cb5606c37866
---
M CREDITS
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/150040/1

diff --git a/CREDITS b/CREDITS
index fde6b78..776e51b 100644
--- a/CREDITS
+++ b/CREDITS
@@ -131,6 +131,7 @@
 * Elvis Stansvik
 * Eranroz
 * Erwin Dokter
+* Étienne Beaulé
 * Federico Leva
 * FunPika
 * fomafix

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1759a753b06bbe672a4e9ecd7d9cb5606c37866
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Show whether a page is watched though a message while editing - change (mediawiki/core)

2014-07-23 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Show whether a page is watched though a message while editing
..

Show whether a page is watched though a message while editing

This change switches the watchthis message for watchthis-watched
in the edit dialog if the page is already watched by the user. This
is to supplement the checkbox being activated when the page is watched.

Bug: 14224
Change-Id: I2dc738dcae78ecd05602de61d5ff5956f4612fb2
---
M includes/EditPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/148716/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 9d512ab..efb77bb 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3795,7 +3795,12 @@
}
}
 
-   $watchLabel = wfMessage( 'watchthis' )-parse();
+   if ( $wgUser-isWatched( $this-mTitle ) ) {
+   $watchLabel = wfMessage( 'watchthis-watched' )-parse();
+   } else {
+   $watchLabel = wfMessage( 'watchthis' )-parse();
+   }
+
$checkboxes['watch'] = '';
if ( $wgUser-isLoggedIn() ) {
$attribs = array(
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index e42d716..e9b1a35 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -577,7 +577,8 @@
summary: Summary:,
subject: Subject/headline:,
minoredit: This is a minor edit,
-   watchthis: Watch this page,
+   watchthis: Watch this page (unwatched),
+   watchthis-watched: Watch this page (watched),
savearticle: Save page,
preview: Preview,
showpreview: Show preview,
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index ad5b288..1aae103 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -739,7 +739,8 @@
summary: The Summary text beside the edit summary field\n\nSee 
also:\n* {{msg-mw|Subject}}\nSee also:\n* {{msg-mw|Accesskey-summary}}\n* 
{{msg-mw|Tooltip-summary}}\n{{Identical|Summary}},
subject: Used as label for input box in the EditPage page.\n\nSee 
also:\n* {{msg-mw|Summary}},
minoredit: Text above Save page button in editor\n\nSee also:\n* 
{{msg-mw|Minoredit}}\n* {{msg-mw|Accesskey-minoredit}}\n* 
{{msg-mw|Tooltip-minoredit}},
-   watchthis: Text of checkbox above {{msg-mw|Showpreview}} button in 
editor.\n\nSee also:\n* {{msg-mw|Watchthis}}\n* {{msg-mw|Accesskey-watch}}\n* 
{{msg-mw|Tooltip-watch}}\n{{Identical|Watch this page}},
+   watchthis: Text of checkbox above {{msg-mw|Showpreview}} button in 
editor when page edited is not already watched.\n\nSee also:\n* 
{{msg-mw|Watchthis}}\n* {{msg-mw|Accesskey-watch}}\n* 
{{msg-mw|Tooltip-watch}}\n* {{msg-mw|Watchthis-watched}},
+   watchthis-watched: Text of checkbox above {{msg-mw|Showpreview}} 
button in editor when page edited is already watched.\n\nSee also:\n* 
{{msg-mw|Watchthis}}\n* {{msg-mw|Accesskey-watch}}\n* {{msg-mw|Tooltip-watch}},
savearticle: Text on the Save page button. See also 
{{msg-mw|showpreview}} and {{msg-mw|showdiff}} for the other buttons.\n\nSee 
also:\n* {{msg-mw|Savearticle}}\n* {{msg-mw|Accesskey-save}}\n* 
{{msg-mw|Tooltip-save}}\n{{Identical|Save page}},
preview: The title of the Preview page shown after clicking the 
\Show preview\ button in the edit page. Since this is a heading, it should 
probably be translated as a noun and not as a verb.\n\n{{Identical|Preview}},
showpreview: The text of the button to preview the page you are 
editing. See also {{msg-mw|showdiff}} and {{msg-mw|savearticle}} for the other 
buttons.\n\nSee also:\n* {{msg-mw|Showpreview}}\n* 
{{msg-mw|Accesskey-preview}}\n* {{msg-mw|Tooltip-preview}}\n{{Identical|Show 
preview}},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dc738dcae78ecd05602de61d5ff5956f4612fb2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Create preferences to watchlist pages after rollbacking and ... - change (mediawiki/core)

2014-07-15 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Create preferences to watchlist pages after rollbacking and 
undoing
..

Create preferences to watchlist pages after rollbacking and undoing

This change adds two preferences in the 'watchlist' section to
- Automatically watchlist a page after rollbacking
- Check the box to watchlist a page after reverting an edit

They are two seperate preferences, of which are turned off by default.

Bug: 4488
Change-Id: I3aa831c9c04d627684641af0ca5a332795c87062
---
M RELEASE-NOTES-1.24
M includes/DefaultSettings.php
M includes/EditPage.php
M includes/Preferences.php
M includes/actions/RevertAction.php
M includes/actions/RollbackAction.php
M includes/api/ApiFileRevert.php
M includes/api/ApiRollback.php
M languages/i18n/en.json
M languages/i18n/qqq.json
10 files changed, 55 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/146440/1

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 8011044..4f1c839 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -116,6 +116,8 @@
 * Upgrade Sinon.JS to 1.10.3.
 * Added the es5-shim polyfill for older or non-compliant javascript engines.
 * Upgrade jQuery Cookie to v1.2.0.
+* (bug 4488) There are now two preferences to watch pages where the user has 
reverted
+  or rollbacked an edit by default.
 
 === Bug fixes in 1.24 ===
 * (bug 49116) Footer copyright notice is now always displayed in user language
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 7c81294..755df26 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4125,6 +4125,8 @@
'watchlisthideown' = 0,
'watchlisthidepatrolled' = 0,
'watchmoves' = 0,
+   'watchreverts' = 0,
+   'watchrollback' = 0,
'wllimit' = 250,
'useeditwarning' = 1,
'prefershttps' = 1,
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 88c49a7..6b8a9d9 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1104,6 +1104,11 @@
}

$this-undidRev = $undo;
}
+
+   if ( 
$wgUser-getOption( 'watchreverts' ) ) {
+   
$this-watchthis = true;
+   }
+
$this-formtype 
= 'diff';
}
}
diff --git a/includes/Preferences.php b/includes/Preferences.php
index fdb1a9d..c6e7725 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -982,7 +982,8 @@
$watchTypes = array(
'edit' = 'watchdefault',
'move' = 'watchmoves',
-   'delete' = 'watchdeletion'
+   'delete' = 'watchdeletion',
+   'revert' = 'watchreverts'
);
 
// Kinda hacky
@@ -990,10 +991,15 @@
$watchTypes['read'] = 'watchcreations';
}
 
+   if ( $user-isAllowed( 'rollback' ) ) {
+   $watchTypes['rollback'] = 'watchrollback';
+   }
+
foreach ( $watchTypes as $action = $pref ) {
if ( $user-isAllowed( $action ) ) {
// Messages:
-   // tog-watchdefault, tog-watchmoves, 
tog-watchdeletion, tog-watchcreations
+   // tog-watchdefault, tog-watchmoves, 
tog-watchdeletion, tog-watchreverts,
+   // tog-watchcreations, tog-watchrollback
$defaultPreferences[$pref] = array(
'type' = 'toggle',
'section' = 
'watchlist/advancedwatchlist',
diff --git a/includes/actions/RevertAction.php 
b/includes/actions/RevertAction.php
index 6481630..da7903b 100644
--- a/includes/actions/RevertAction.php
+++ b/includes/actions/RevertAction.php
@@ -136,6 +136,11 @@
wfExpandUrl( $this-page-getFile()-getArchiveUrl( 
$this-getRequest()-getText( 'oldimage' ) ),
PROTO_CURRENT
) );
+
+   if ( $user-getBoolOption( 'watchreverts' ) || 
$this-User-isWatched( $this-page-getTitle() ) ) {
+   $this-User-addWatch( $this-page-getTitle() );
+   }
+
$this-getOutput()-returnToMain( false, 

[MediaWiki-commits] [Gerrit] Enable the creation of empty pages - change (mediawiki/core)

2014-07-13 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Enable the creation of empty pages
..

Enable the creation of empty pages

This change enables the direct creation of empty pages without needing
to use a work-around (such as {{subst:ns:0}}). A warning is added as
the message blankarticle to request confirmation that the empty page
was meant to be blank.

May possibly fix bug 57238
Bug: 65206

Change-Id: I3457c36a909d1dbfaeed04a1f0568c69e0ef3386
---
M RELEASE-NOTES-1.24
M includes/EditPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 14 insertions(+), 4 deletions(-)


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

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 3686548..38314d6 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -141,6 +141,8 @@
 * (bug 65757) MSSQL: Update script drops unnamed constraints to be prepared
   for future updates. Because it's doing so heuristically, it may fail or drop
   wrong constraints.
+* (bugs 57238, 65206) Empty pages are now able to be made without a 
work-around.
+  A warning has been added when attempting to do such.
 
 === Web API changes in 1.24 ===
 * action=parse API now supports prop=modules, which provides the list of
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 3d57e95..f341561 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -254,6 +254,9 @@
/** @var bool */
protected $allowBlankSummary = false;
 
+   /** @var bool */
+   protected $blankArticle = false;
+
/** @var string */
protected $autoSumm = '';
 
@@ -1400,6 +1403,7 @@
case self::AS_TEXTBOX_EMPTY:
case self::AS_MAX_ARTICLE_SIZE_EXCEEDED:
case self::AS_END:
+   case self::AS_BLANK_ARTICLE:
return true;
 
case self::AS_HOOK_ERROR:
@@ -1433,10 +1437,6 @@
}
}
$wgOut-redirect( $this-mTitle-getFullURL( 
$extraQuery ) . $sectionanchor );
-   return false;
-
-   case self::AS_BLANK_ARTICLE:
-   $wgOut-redirect( 
$this-getContextTitle()-getFullURL() );
return false;
 
case self::AS_SPAM_ERROR:
@@ -1747,6 +1747,8 @@
}
 
if ( $this-textbox1 === $defaultText ) {
+   $this-blankArticle = true;
+   $status-fatal( 'blankarticle' );
$status-setResult( false, 
self::AS_BLANK_ARTICLE );
wfProfileOut( __METHOD__ );
return $status;
@@ -2664,6 +2666,10 @@
$wgOut-wrapWikiMsg( div 
id='mw-missingcommentheader'\n$1\n/div, 'missingcommentheader' );
}
 
+   if ( $this-blankArticle ) {
+   $wgOut-wrapWikiMsg( div 
id='mw-blankarticle'\n$1\n/div, 'blankarticle' );
+   }
+
if ( $this-hookError !== '' ) {
$wgOut-addWikiText( $this-hookError );
}
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index c06c29e..daeb450 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -582,6 +582,7 @@
preview: Preview,
showpreview: Show preview,
showdiff: Show changes,
+   blankarticle: strongWarning:/strong The page you are creating is 
blank.\nIf you click \{{int:savearticle}}\ again, the page will be created 
without any content.,
anoneditwarning: strongWarning:/strong You are not logged 
in.\nYour IP address will be recorded in this page's edit history.,
anonpreviewwarning: emYou are not logged in. Saving will record 
your IP address in this page's edit history./em,
missingsummary: strongReminder:/strong You have not provided an 
edit summary.\nIf you click \{{int:savearticle}}\ again, your edit will be 
saved without one.,
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 0b3e7af..b481344 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -744,6 +744,7 @@
preview: The title of the Preview page shown after clicking the 
\Show preview\ button in the edit page. Since this is a heading, it should 
probably be translated as a noun and not as a verb.\n\n{{Identical|Preview}},
showpreview: The text of the button to preview the page you are 
editing. See also {{msg-mw|showdiff}} and {{msg-mw|savearticle}} for the other 
buttons.\n\nSee also:\n* {{msg-mw|Showpreview}}\n* 

[MediaWiki-commits] [Gerrit] Standardize Error messages - change (mediawiki...WikimediaIncubator)

2014-03-29 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Standardize Error messages
..

Standardize Error messages

Changed a couple of messages to standardize the group. Changed:
- The punctuation from ! to .
- Bolded Error:

Change-Id: I17b531522e48a6ce1fbacc83d4417796db012825
---
M i18n/en.json
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index c0d61a4..6f0489f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,9 +17,9 @@
 wminc-prefinfo-project: Select the Wikimedia project you are working on 
here,
 wminc-prefinfo-error: You selected a project that needs a language 
code.,
 wminc-error-help: Help:Contents,
-wminc-error-move-unprefixed: Error: The page you are trying to move to 
[[{{MediaWiki:Wminc-error-help}}|is unprefixed or has a wrong prefix]]!,
-wminc-error-wronglangcode: '''Error:''' This page contains a 
[[{{MediaWiki:Wminc-error-help}}|wrong language code]] \$1\!,
-wminc-error-unprefixed: '''Error:''' This page is 
[[{{MediaWiki:Wminc-error-help}}|unprefixed]]!,
+wminc-error-move-unprefixed: '''Error:''' The page you are trying to 
move to [[{{MediaWiki:Wminc-error-help}}|is unprefixed or has a wrong 
prefix]].,
+wminc-error-wronglangcode: '''Error:''' This page contains a 
[[{{MediaWiki:Wminc-error-help}}|wrong language code]] \$1\.,
+wminc-error-unprefixed: '''Error:''' This page is 
[[{{MediaWiki:Wminc-error-help}}|unprefixed]].,
 wminc-error-unprefixed-suggest: '''Error:''' This page is 
[[{{MediaWiki:Wminc-error-help}}|unprefixed]]! You can create a page at 
[[:$1]].,
 wminc-error-wiki-exists: This wiki already exists. You can find this 
page on $1. If the wiki was recently created, please wait a few hours or days 
until all content is imported.,
 wminc-error-wiki-sister: This page belongs to a project that is not 
hosted here. Please go to $1 to find the wiki.,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17b531522e48a6ce1fbacc83d4417796db012825
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove global $wmincLangCodeLength - change (mediawiki...WikimediaIncubator)

2014-02-17 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Remove global $wmincLangCodeLength
..

Remove global $wmincLangCodeLength

This change removes all instances of $wmincLangCodeLength, a global
that is Pretty useless actually.

Change-Id: I025507882bfd556790341f2385d026a43ea6dfda
---
M TestWikiRC.php
M WikimediaIncubator.class.php
M WikimediaIncubator.php
3 files changed, 6 insertions(+), 14 deletions(-)


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

diff --git a/TestWikiRC.php b/TestWikiRC.php
index a2fd9ab..91ee6e1 100644
--- a/TestWikiRC.php
+++ b/TestWikiRC.php
@@ -46,7 +46,7 @@
}
 
static function onRcForm( $items, $opts ) {
-   global $wmincProjects, $wmincProjectSite, $wmincLangCodeLength;
+   global $wmincProjects, $wmincProjectSite;

list( $projectvalue, $codevalue ) = self::getValues();
$opts-consumeValue( 'rc-testwiki-project' );
@@ -58,8 +58,8 @@
$select-addOption( $name, $prefix );
}
$select-addOption( $wmincProjectSite['name'], 
$wmincProjectSite['short'] );
-   $langcode = Xml::input( 'rc-testwiki-code', 
(int)$wmincLangCodeLength, $codevalue,
-   array( 'id' = 'rc-testwiki-code', 'maxlength' = 
(int)$wmincLangCodeLength ) );
+   $langcode = Xml::input( 'rc-testwiki-code', $codevalue,
+   array( 'id' = 'rc-testwiki-code' ) );
$items['testwiki'] = array( $label, $select-getHTML() . ' ' . 
$langcode );
return true;
}
diff --git a/WikimediaIncubator.class.php b/WikimediaIncubator.class.php
index c7cbef5..614da93 100644
--- a/WikimediaIncubator.class.php
+++ b/WikimediaIncubator.class.php
@@ -31,7 +31,7 @@
 * @return true
 */
static function onGetPreferences( $user, $preferences ) {
-   global $wmincPref, $wmincProjects, $wmincProjectSite, 
$wmincLangCodeLength;
+   global $wmincPref, $wmincProjects, $wmincProjectSite;
 
$preferences['language']['help-message'] = 
'wminc-prefinfo-language';
 
@@ -51,8 +51,6 @@
'section' = 'personal/i18n',
'label-message' = 'wminc-testwiki-code',
'id' = $wmincPref . '-code',
-   'maxlength' = (int)$wmincLangCodeLength,
-   'size' = (int)$wmincLangCodeLength,
'help' = wfMessage( 'wminc-prefinfo-code' )-parse() .
self::getTestWikiLanguages(),
'list' = 'wminc-testwiki-codelist',
@@ -112,16 +110,11 @@
 
/**
 * This validates a given language code.
-* Only xx[x] and xx[x]-x[] are allowed.
+* Only xx[x], xx[x]-x[]-x[], and 
xx[x]-x[] are allowed.
 * @return Boolean
 */
static function validateLanguageCode( $code ) {
-   global $wmincLangCodeLength;
-   if ( strlen( $code )  $wmincLangCodeLength ) { return false; }
-   if ( $code == 'be-x-old' ) {
-   return true; # one exception... waiting to be renamed 
to be-tarask
-   }
-   return (bool) preg_match( '/^[a-z][a-z][a-z]?(-[a-z]+)?$/', 
$code );
+   return (bool) preg_match( 
'/^[a-z][a-z][a-z]?(-[a-z]+)?(-[a-z]+)?$/', $code );
}
 
/**
diff --git a/WikimediaIncubator.php b/WikimediaIncubator.php
index 1eb61c3..b1cd821 100644
--- a/WikimediaIncubator.php
+++ b/WikimediaIncubator.php
@@ -57,7 +57,6 @@
NS_CATEGORY, NS_CATEGORY_TALK,
828, 829, //NS_MODULE, NS_MODULE_TALK,
 );
-$wmincLangCodeLength = 12; // can be changed if needed (depends on policy)
 // Pseudo category namespaces like Category:Maintenance:Delete, for easy 
whitelisting and structure
 $wmincPseudoCategoryNSes = array(
'Incubator', 'Help', 'Users', 'Maintenance', 'Files',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I025507882bfd556790341f2385d026a43ea6dfda
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Make MediaWiki:wminc-error-unprefixed-suggest show correctly... - change (mediawiki...WikimediaIncubator)

2014-02-15 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Make MediaWiki:wminc-error-unprefixed-suggest show correctly 
capitalised title
..

Make MediaWiki:wminc-error-unprefixed-suggest show correctly capitalised title

This commit also makes Error: bold as for other messages with the string at
MediaWiki:wminc-error-move-unprefixed .

Change-Id: I5c79e55f4816c50467261bfc19a5a3103ed79de9
---
M WikimediaIncubator.class.php
M WikimediaIncubator.i18n.php
2 files changed, 8 insertions(+), 3 deletions(-)


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

diff --git a/WikimediaIncubator.class.php b/WikimediaIncubator.class.php
index c7cbef5..de6be04 100644
--- a/WikimediaIncubator.class.php
+++ b/WikimediaIncubator.class.php
@@ -301,14 +301,19 @@
* $wmincTestWikiNamespaces, so use format:
* TITLE + NS = NS:Wx/xxx/TITLE
*/
-   $title = Title::makeTitleSafe( $ns, 
self::displayPrefix() . '/' . $title );
+   $prefix = self::analysePrefix( $title );
+   if ( $prefix[project] == 't' ) {
+   $title = Title::makeTitleSafe( $ns, 
self::displayPrefix() . '/' . $title );
+   } else {
+   $title = Title::makeTitleSafe( $ns, 
self::displayPrefix() . '/' . ucfirst( $title ) );
+   }
} else {
/* Non-standard namespace, so use format:
* TITLE + NS = Wx/xxx/NS:TITLE
* (with localized namespace name)
*/
$title = Title::makeTitleSafe( NULL, 
self::displayPrefix() . '/' .
-   $wgLang-getNsText( $ns ) . ':' . $title );
+   $wgLang-getNsText( $ns ) . ':' . ucfirst( 
$title ) );
}
return $title;
}
diff --git a/WikimediaIncubator.i18n.php b/WikimediaIncubator.i18n.php
index 5b10b4d..61302d7 100644
--- a/WikimediaIncubator.i18n.php
+++ b/WikimediaIncubator.i18n.php
@@ -29,7 +29,7 @@
 
# Editing/creating pages errors
'wminc-error-help' = 'Help:Contents',
-   'wminc-error-move-unprefixed' = Error: The page you are trying to 
move to [[{{MediaWiki:Wminc-error-help}}|is unprefixed or has a wrong 
prefix]]!,
+   'wminc-error-move-unprefixed' = '''Error:''' The page you are trying 
to move to [[{{MediaWiki:Wminc-error-help}}|is unprefixed or has a wrong 
prefix]]!,
'wminc-error-wronglangcode' = '''Error:''' This page contains a 
[[{{MediaWiki:Wminc-error-help}}|wrong language code]] \$1\!,
'wminc-error-unprefixed' = '''Error:''' This page is 
[[{{MediaWiki:Wminc-error-help}}|unprefixed]]!,
'wminc-error-unprefixed-suggest' = '''Error:''' This page is 
[[{{MediaWiki:Wminc-error-help}}|unprefixed]]! You can create a page at 
[[:$1]].,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c79e55f4816c50467261bfc19a5a3103ed79de9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove ability of admins to give import userright on zh.wiki... - change (operations/mediawiki-config)

2014-02-11 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Remove ability of admins to give import userright on 
zh.wikivoyage
..

Remove ability of admins to give import userright on zh.wikivoyage

This change removes the ability of administrators on zh.wikivoyage
to grant and revoke the importer right. Transwiki import is going
to be set with change 110876 and it should negate the need of the
importupload permission to be used. zh.wikivoyage has discussed:
//zh.wikivoyage.org/wiki/Wikivoyage:互助客栈#m:Special:Diff.2F7252544_.28Special:Import.29_.E9.97.AE.E9.A2.98

Change-Id: I24bb54c8c7cbd6fe3fe1ecd55be9344ee3a157be
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 663dde5..cbf7216 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8093,7 +8093,7 @@
),
),
'+zhwikivoyage' = array(
-   'sysop' = array( 'autopatrolled', 'confirmed', 'import', 
'patroller', 'transwiki' ), // bug 60085, 60328
+   'sysop' = array( 'autopatrolled', 'confirmed', 'patroller', 
'transwiki' ), // bug 60085, 60328
),
'+zh_yuewiki' = array(
'sysop' = array( 'abusefilter', 'rollbacker', 'autoreviewer', 
'confirmed' ),
@@ -8581,7 +8581,7 @@
),
),
'+zhwikivoyage' = array(
-   'sysop' = array( 'autopatrolled', 'confirmed', 'import', 
'patroller', 'transwiki' ), // bug 60085, 60328
+   'sysop' = array( 'autopatrolled', 'confirmed', 'patroller', 
'transwiki' ), // bug 60085, 60328
),
'+zh_yuewiki' = array(
'sysop' = array( 'abusefilter', 'rollbacker', 'autoreviewer', 
'confirmed' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24bb54c8c7cbd6fe3fe1ecd55be9344ee3a157be
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add namespace aliases for ang.wikipedia and wiktionary - change (operations/mediawiki-config)

2014-02-09 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add namespace aliases for ang.wikipedia and wiktionary
..

Add namespace aliases for ang.wikipedia and wiktionary

This chnage adds many aliases to Project: and Project talk: namespaces
for ang.wikipedia and ang.wikibooks.

Bug: 58711
Change-Id: I225ca79c35125b3e1e315482def7c48dd03465c1
---
M wmf-config/InitialiseSettings.php
1 file changed, 17 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6bfe1d8..47c5bc8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -2284,15 +2284,30 @@
'+amwiki' = array(
100 = 'በር',
),
-   '+angwiki' = array( // bug 56634
+   '+angwiki' = array( // bug 56634, 58711
'Wikipedia' = NS_PROJECT,
'Wikipaedia' = NS_PROJECT,
'Wikipædiamotung' = NS_PROJECT_TALK,
'Wikipaediamotung' = NS_PROJECT_TALK,
+   'Wicipǣdiamōtung' = NS_PROJECT_TALK,
+   'Wicipædia' = NS_PROJECT,
+   'Wicipaedia' = NS_PROJECT,
+   'Ƿikipǣdiamōtung' = NS_PROJECT_TALK,
+   'Ƿikipædia' = NS_PROJECT,
+   'Ƿikipaedia' = NS_PROJECT,
+   'Ƿicipǣdiamōtung' = NS_PROJECT_TALK,
+   'Ƿicipædia' = NS_PROJECT,
+   'Ƿicipaedia' = NS_PROJECT,
),
-   '+angwiktionary' = array( // bug 56634
+   '+angwiktionary' = array( // bug 56634, 58711
'Wikiwordboc' = NS_PROJECT,
'Wikiwordbocmotung' = NS_PROJECT_TALK,
+   'Wiciwordbōcmōtung' = NS_PROJECT_TALK,
+   'Wiciwordboc' = NS_PROJECT,
+   'Ƿikiƿordbōcmōtung' = NS_PROJECT_TALK,
+   'Ƿikiƿordbocmotung' = NS_PROJECT_TALK,
+   'Ƿiciƿordbōcmōtung' = NS_PROJECT_TALK,
+   'Ƿiciƿordbocmotung' = NS_PROJECT_TALK,
'Æteaca' = 100,
'Æteacmotung' = 101,
'Aeteaca' = 100,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I225ca79c35125b3e1e315482def7c48dd03465c1
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Show warning when moving a page to a different test wiki - change (mediawiki...WikimediaIncubator)

2014-02-07 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Show warning when moving a page to a different test wiki
..

Show warning when moving a page to a different test wiki

This change adds a warning when trying to move a page from one
test-wiki to another. This functionality uses the AbortMove hook
and is basically re-utilizing the code from checkPrefixMovePermissions()
to show an error. The analyzePrefix() function is used to compare the
two prefixes. If they are the same or both give 'error', the function
returns false (or with other conditions from the re-used code) I also
added the message wminc-move-differentprefix for notifing when the
prefixes are different.

I used this opportunity to make the Error: in the message
wminc-error-move-unprefixed bold to standardise it, as the word Error:
is bold in the other messages that have the string.

Change-Id: If0148c1a8094b1a73ec728d56eff6b9d187190df
---
M WikimediaIncubator.class.php
M WikimediaIncubator.i18n.php
M WikimediaIncubator.php
3 files changed, 50 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaIncubator 
refs/changes/22/112022/1

diff --git a/WikimediaIncubator.class.php b/WikimediaIncubator.class.php
index 17da13f..0e73ac3 100644
--- a/WikimediaIncubator.class.php
+++ b/WikimediaIncubator.class.php
@@ -899,7 +899,50 @@
$linktext = ltrim( $url, '/' );
return $callLinker ? Linker::makeExternalLink( $url, $linktext 
) : $linktext;
}
-
+   
+   /**
+* Whether we should show an error message that the source and target 
pages
+* in a move do not have the same prefix.
+* @param $title Title object
+* @return Boolean
+*/
+   static function shouldWeShowInterPrefixError( $oldtitle, $newtitle ) {
+   global $wmincTestWikiNamespaces, $wmincProjectSite, 
$wmincPseudoCategoryNSes;
+   $oldtitleprefixdata = self::analyzePrefix( $oldtitle-getText() 
);
+   $newtitleprefixdata = self::analyzePrefix( $newtitle-getText() 
);
+   $ns = $newtitle-getNamespace();
+   $categories = array_map( array( __CLASS__, 'preg_quote_slash' 
), $wmincPseudoCategoryNSes );
+   if ( $oldtitleprefixdata[] == $newtitleprefixdata[] ) {
+   # no error in prefix - no error to show
+   # Or prefixes are the same.
+   return false;
+   } elseif ( self::displayPrefix() == $wmincProjectSite['short'] 
) {
+   # If user has project (Incubator) as test wiki 
preference, it isn't needed to check
+   return false;
+   } elseif ( !in_array( $ns, $wmincTestWikiNamespaces ) ) {
+   # OK if it's not in one of the content namespaces
+   return false;
+   } elseif ( ( $ns == NS_CATEGORY || $ns == NS_CATEGORY_TALK ) 
+   preg_match( '/^(' . implode( '|', $categories ) 
.'):.+$/', $newtitle-getText() ) ) {
+   # whitelisted unprefixed categories
+   return false;
+   }
+   return true;
+   }
+   
+   /**
+* Return a option if user tries to move page to a different prefix.
+* @return Boolean true
+*/
+   static function checkInterPrefixMove( $oldtitle, $newtitle, $user, 
$error ) {
+   if ( self::shouldWeShowInterPrefixError( $oldtitle, $newtitle ) 
) {
+   # There might be a error with the page title
+   $error = wfMessage( 'wminc-move-differentprefix' 
)-parse();
+   return false;
+   }
+   return true;
+   }
+   
/**
 * @param $files
 * @return true
diff --git a/WikimediaIncubator.i18n.php b/WikimediaIncubator.i18n.php
index 8c81c8a..259c7ce 100644
--- a/WikimediaIncubator.i18n.php
+++ b/WikimediaIncubator.i18n.php
@@ -29,7 +29,8 @@
 
# Editing/creating pages errors
'wminc-error-help' = 'Help:Contents',
-   'wminc-error-move-unprefixed' = Error: The page you are trying to 
move to [[{{MediaWiki:Wminc-error-help}}|is unprefixed or has a wrong 
prefix]]!,
+   'wminc-error-move-unprefixed' = '''Error:''' The page you are trying 
to move to [[{{MediaWiki:Wminc-error-help}}|is unprefixed or has a wrong 
prefix]]!,
+   'wminc-move-differentprefix' = '''Error:''' You are moving a prefixed 
page to another prefix.,
'wminc-error-wronglangcode' = '''Error:''' This page contains a 
[[{{MediaWiki:Wminc-error-help}}|wrong language code]] \$1\!,
'wminc-error-unprefixed' = '''Error:''' This page is 
[[{{MediaWiki:Wminc-error-help}}|unprefixed]]!,
'wminc-error-unprefixed-suggest' = '''Error:''' This page is 

[MediaWiki-commits] [Gerrit] Add transwiki import options for zh.wikivoyage - change (operations/mediawiki-config)

2014-02-02 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add transwiki import options for zh.wikivoyage
..

Add transwiki import options for zh.wikivoyage

This change adds a list of wikis for transwiki import
at zh.wikivoyage that includes the following wikis:
- w, b, q, s, en, wikt, meta, and commons.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f739058..7ef4ce3 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8877,6 +8877,7 @@
'wuuwiki' = array( 'en', 'th', 'fr', 'zh', ),
'xhwiki' = array( 'en' ), // bug 51327
'zhwikiquote' = array( 'w', 'b', 'wikt', 's', 'meta', 'commons' ),
+   'zhwikivoyage' = array( 'w', 'b', 'q', 's', 'wikt', 'meta', 'commons' 
), //bug 60248
'zhwiktionary' = array( 'w', 'b', 'q', 's', 'meta', 'commons' ),
'zhwikibooks' = array( 'w', 'wikt', 'q', 's', 'meta', 'commons' ),
'zhwikisource' = array( 'w', 'b', 'q', 'wikt', 'meta', 'commons' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9988aeda79f69735c2dbd6778991ca32e2f2504
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add el.wikivoyage to it.wikivoyage transwiki import - change (operations/mediawiki-config)

2014-02-01 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add el.wikivoyage to it.wikivoyage transwiki import
..

Add el.wikivoyage to it.wikivoyage transwiki import

This commit adds el.wikivoyage to the list of transwiki import wikis
of it.wikivoyage as Wy/el has been created.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f739058..7b4c7ac 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8763,9 +8763,8 @@
'commons', 'd', 'mw', 'meta', 'foundation', 'w:ca',
'w:de', 'w:en', 'w:es', 'w:fr', 'w:he', 'w:hu',
'w:nl', 'w:pl', 'w:pt', 'w:ru', 's:fr', 'n:en',
-   'wikt:en', 'de', 'en', 'es', 'fr', 'nl', 'ru', 'sv',
+   'wikt:en', 'de', 'en', 'es', 'fr', 'nl', 'ru', 'sv', 'el'
), // Bug 43310
-   //TODO: add 'el' to itwikivoyage import sources (now in Incubator) when 
el.wikivoyage is live
'itwiktionary' = array( 'w', 'b', 's', 'q', 'n', 'v', 'en', 'fr', 'sc' 
),
'jawikibooks' = array( 'w', 'wikt', 'q', 's', 'v', 'en' ),
'jawikiversity' = array( 'betawikiversity', 'w', 'wikt', 'en', 'b', 
'q', 's', 'n' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec7ae3c5b3b3281d48fb47b4b8e382864531e659
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Create Special:Purge - change (mediawiki/core)

2014-01-26 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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


Change subject: Create Special:Purge
..

Create Special:Purge

This change creates the Special page Special:Purge. Its function
is to purge a page with the following syntax: [[Special:Purge/—-]]

This change should fix bug 59622

Change-Id: I492c040887eb132208990deb7d0a8e854b53d37c
---
M RELEASE-NOTES-1.23
M includes/AutoLoader.php
M includes/specialpage/SpecialPageFactory.php
A includes/specials/SpecialPurge.php
M languages/messages/MessagesEn.php
5 files changed, 60 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/109523/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 0bb6bee..0e07a57 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -78,6 +78,8 @@
 * [[Special:Diff]] was added, allowing users to create internal links to
   revision comparison pages using syntax such as [[Special:Diff/12345]],
   [[Special:Diff/12345/prev]] or [[Special:Diff/12345/98765]].
+* [[Special:Purge]] was added, allowing users to purge a page using syntax
+  such as [[Special:Purge/xy]].
 
 === Bug fixes in 1.23 ===
 * (bug 41759) The updated since last visit markers (on history pages, recent
diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index dabcc5c..2723a03 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -988,6 +988,7 @@
'SpecialPrefixindex' = 'includes/specials/SpecialPrefixindex.php',
'SpecialProtectedpages' = 
'includes/specials/SpecialProtectedpages.php',
'SpecialProtectedtitles' = 
'includes/specials/SpecialProtectedtitles.php',
+   'SpecialPurge' = 'includes/specials/SpecialPurge.php',
'SpecialRandomInCategory' = 
'includes/specials/SpecialRandomInCategory.php',
'SpecialRandomredirect' = 
'includes/specials/SpecialRandomredirect.php',
'SpecialRecentChanges' = 'includes/specials/SpecialRecentchanges.php',
diff --git a/includes/specialpage/SpecialPageFactory.php 
b/includes/specialpage/SpecialPageFactory.php
index 792d0a6..d41a15c 100644
--- a/includes/specialpage/SpecialPageFactory.php
+++ b/includes/specialpage/SpecialPageFactory.php
@@ -163,6 +163,7 @@
'Myuploads' = 'SpecialMyuploads',
'AllMyUploads'  = 'SpecialAllMyUploads',
'PermanentLink' = 'SpecialPermanentLink',
+   'Purge' = 'Special:Purge',
'Redirect'  = 'SpecialRedirect',
'Revisiondelete'= 'SpecialRevisionDelete',
'Specialpages'  = 'SpecialSpecialpages',
diff --git a/includes/specials/SpecialPurge.php 
b/includes/specials/SpecialPurge.php
new file mode 100644
index 000..460a669
--- /dev/null
+++ b/includes/specials/SpecialPurge.php
@@ -0,0 +1,55 @@
+?php
+/**
+ * Redirect from Special:Purge/### to index.php?title=###action=purge
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+/**
+ * Redirect from Special:Purge/### to index.php?title=###action=purge.
+ *
+ * Valid usage
+ * - [[Special:Purge/12345]]
+ *
+ * Invalid usage
+ * - [[Special:Purge]]
+ *
+ * @ingroup SpecialPage
+ * @since 1.23
+ */
+class SpecialDiff extends RedirectSpecialPage {
+   function __construct() {
+   parent::__construct( 'Purge' );
+   $this-mAllowedRedirectParams = array();
+   }
+
+   function getRedirect( $subpage ) {
+   $parts = explode( '/', $subpage );
+
+   $this-mAddedRedirectParams['action'] = 'purge';
+   if ( count( $parts ) === 1 ) {
+   $this-mAddedRedirectParams['title'] = $parts[0];
+   } else {
+   // Wrong number of parameters, bail out
+   throw new ErrorPageError( 'nopagetitle' );
+   }
+
+   return true;
+   }
+}
\ No newline at end of file
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 3e009e8..0094736 100644
--- a/languages/messages/MessagesEn.php
+++ 

[MediaWiki-commits] [Gerrit] Use namespace ID for Module: namespace This commit changes a... - change (mediawiki...WikimediaIncubator)

2014-01-13 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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


Change subject: Use namespace ID for Module: namespace This commit changes all 
the proper names for namespaces into their IDs. This change was meant for the 
Module: and Module_talk: namespaces (ID 828 and 829 respectivily) specifically, 
but for consistancy in the array, 
..

Use namespace ID for Module: namespace
This commit changes all the proper names for namespaces into their
IDs. This change was meant for the Module: and Module_talk:
namespaces (ID 828 and 829 respectivily) specifically, but for
consistancy in the array, I changed all the values, adding a
comment for easier reading (not that code is easily readable.

This change was necessary as the Scribunto extenion (creates the
Module: namespace) is loaded after the WikimediaIncubator extension
(this extension)

This should squash bug 59187 hopefully

Bug: 59187
Change-Id: If0f030674c728d39876a251a7c35613b6f88d2bf
---
M WikimediaIncubator.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/WikimediaIncubator.php b/WikimediaIncubator.php
index 2493e2b..d1a819c 100644
--- a/WikimediaIncubator.php
+++ b/WikimediaIncubator.php
@@ -52,10 +52,10 @@
'short' = 'inc',
 );
 $wmincTestWikiNamespaces = array(
-   NS_MAIN, NS_TALK,
-   NS_TEMPLATE, NS_TEMPLATE_TALK,
-   NS_CATEGORY, NS_CATEGORY_TALK,
-   NS_MODULE, NS_MODULE_TALK,
+   0, 1, //NS_MAIN, NS_TALK,
+   10, 11,   //NS_TEMPLATE, NS_TEMPLATE_TALK,
+   14, 15,   //NS_CATEGORY, NS_CATEGORY_TALK,
+   828, 829, //NS_MODULE, NS_MODULE_TALK,
 );
 $wmincLangCodeLength = 12; // can be changed if needed (depends on policy)
 // Pseudo category namespaces like Category:Maintenance:Delete, for easy 
whitelisting and structure

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0f030674c728d39876a251a7c35613b6f88d2bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Require Module: to be prefixed - change (mediawiki...WikimediaIncubator)

2014-01-01 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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


Change subject: Require Module: to be prefixed
..

Require Module: to be prefixed

Get the Module: and Module_talk: namespaces (ns: 828, 829)
to be prefixed according to the WikimediaIncubator
extension.

Bug: 59187
Change-Id: Ibcec527bf33210c926a96d3e843a50d05fae9861
---
M WikimediaIncubator.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaIncubator 
refs/changes/14/104814/1

diff --git a/WikimediaIncubator.php b/WikimediaIncubator.php
index 484c8e9..2493e2b 100644
--- a/WikimediaIncubator.php
+++ b/WikimediaIncubator.php
@@ -55,6 +55,7 @@
NS_MAIN, NS_TALK,
NS_TEMPLATE, NS_TEMPLATE_TALK,
NS_CATEGORY, NS_CATEGORY_TALK,
+   NS_MODULE, NS_MODULE_TALK,
 );
 $wmincLangCodeLength = 12; // can be changed if needed (depends on policy)
 // Pseudo category namespaces like Category:Maintenance:Delete, for easy 
whitelisting and structure

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcec527bf33210c926a96d3e843a50d05fae9861
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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