[MediaWiki-commits] [Gerrit] Migrate to JSON configuration based extension registration - change (mediawiki...ContentTranslation)

2015-06-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Migrate to JSON configuration based extension registration
..


Migrate to JSON configuration based extension registration

Removed Autoload.php and Resources.php.
Replaced ContentTranslation.php with stub.

Testplan:
Register extension using wfLoadExtension( 'ContentTranslation' );
and remove the old
require_once $IP/extensions/ContentTranslation/ContentTranslation.php;

Make sure all works fine!

Bug: T92492
Change-Id: I7bb6249b1555e2159c2932eaa9a4d96e067c80ee
---
D Autoload.php
M ContentTranslation.php
D Resources.php
M extension.json
4 files changed, 278 insertions(+), 1,254 deletions(-)

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



diff --git a/Autoload.php b/Autoload.php
deleted file mode 100644
index 9c7c5e6..000
--- a/Autoload.php
+++ /dev/null
@@ -1,32 +0,0 @@
-?php
-/**
- * Autoload definitions.
- *
- * @file
- * @copyright See AUTHORS.txt
- * @license GPL-2.0+
- */
-
-global $wgAutoloadClasses;
-$dir = __DIR__;
-
-$wgAutoloadClasses += array(
-   'ApiContentTranslationConfiguration' = 
$dir/api/ApiContentTranslationConfiguration.php,
-   'ApiContentTranslationPublish' = 
$dir/api/ApiContentTranslationPublish.php,
-   'ApiContentTranslationDelete' = 
$dir/api/ApiContentTranslationDelete.php,
-   'ApiQueryContentTranslation' = 
$dir/api/ApiQueryContentTranslation.php,
-   'ApiQueryContentTranslationStats' = 
$dir/api/ApiQueryContentTranslationStats.php,
-   'ApiQueryContentTranslationLanguageTrend' 
=$dir/api/ApiQueryContentTranslationLanguageTrend.php,
-   'ApiQueryPublishedTranslations' = 
$dir/api/ApiQueryPublishedTranslations.php,
-   'ContentTranslationHooks' = $dir/ContentTranslation.hooks.php,
-   'ContentTranslation\Database' = $dir/includes/Database.php,
-   'ContentTranslation\Draft' = $dir/includes/Draft.php,
-   'ContentTranslation\GlobalUser' = $dir/includes/GlobalUser.php,
-   'ContentTranslation\Notification' = $dir/includes/Notification.php,
-   'ContentTranslation\SiteMapper' = $dir/includes/SiteMapper.php,
-   'ContentTranslation\Stats' = $dir/includes/Stats.php,
-   'ContentTranslation\Translation' = $dir/includes/Translation.php,
-   'ContentTranslation\Translator' = $dir/includes/Translator.php,
-   'SpecialContentTranslation' = 
$dir/specials/SpecialContentTranslation.php,
-   'SpecialContentTranslationStats' = 
$dir/specials/SpecialContentTranslationStats.php,
-);
diff --git a/ContentTranslation.php b/ContentTranslation.php
index 9c757ed..c845477 100644
--- a/ContentTranslation.php
+++ b/ContentTranslation.php
@@ -1,173 +1,15 @@
 ?php
-/**
- * ContentTranslation extension
- * A tool that allows editors to translate pages from one language
- * to another with the help of machine translation and other translation tools
- *
- * @file
- * @ingroup Extensions
- * @copyright See AUTHORS.txt
- * @license GPL-2.0+
- */
-
-/**
- * Version number used in extension credits and in other places where needed.
- */
-define( 'CONTENTTRANSLATION_VERSION', '1.0.0+20150401' );
-
-/**
- * Extension credits properties.
- */
-$wgExtensionCredits['specialpage'][] = array(
-   'path' = __FILE__,
-   'name' = 'ContentTranslation',
-   'version' = CONTENTTRANSLATION_VERSION,
-   'author' = array(
-   'Amir Aharoni',
-   'David Chan',
-   'Kartik Mistry',
-   'Joel Sahleen',
-   'Niklas Laxström',
-   'Pau Giner',
-   'Runa Bhattacharjee',
-   'Santhosh Thottingal',
-   'Siebrand Mazeland',
-   'Sucheta Ghoshal',
-   ),
-   'descriptionmsg' = 'cx-desc',
-   'url' = 'https://www.mediawiki.org/wiki/Extension:ContentTranslation',
-   'license-name' = 'GPL-2.0+',
-);
-
-$dir = __DIR__;
-
-require_once $dir/Resources.php;
-require_once $dir/Autoload.php;
-
-$GLOBALS['wgMessagesDirs']['ContentTranslation'] = $dir/i18n;
-
-$GLOBALS['wgExtensionMessagesFiles']['ContentTranslationAlias'] =
-   $dir/ContentTranslation.alias.php;
-
-// Special pages
-$GLOBALS['wgSpecialPages']['ContentTranslation'] = 'SpecialContentTranslation';
-$GLOBALS['wgSpecialPages']['ContentTranslationStats'] = 
'SpecialContentTranslationStats';
-
-// API modules
-$GLOBALS['wgAPIModules']['cxconfiguration'] = 
'ApiContentTranslationConfiguration';
-$GLOBALS['wgAPIModules']['cxpublish'] = 'ApiContentTranslationPublish';
-$GLOBALS['wgAPIModules']['cxdelete'] = 'ApiContentTranslationDelete';
-$GLOBALS['wgAPIListModules']['contenttranslation'] = 
'ApiQueryContentTranslation';
-$GLOBALS['wgAPIListModules']['contenttranslationstats'] = 
'ApiQueryContentTranslationStats';
-$GLOBALS['wgAPIListModules']['contenttranslationlangtrend'] =
-   'ApiQueryContentTranslationLanguageTrend';
-$GLOBALS['wgAPIListModules']['cxpublishedtranslations' ]= 

[MediaWiki-commits] [Gerrit] Migrate to JSON configuration based extension registration - change (mediawiki...ContentTranslation)

2015-06-16 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Migrate to JSON configuration based extension registration
..

Migrate to JSON configuration based extension registration

Remove ContentTranslation.php, Autoload.php and Resources.php

Bug: T92492
Change-Id: I7bb6249b1555e2159c2932eaa9a4d96e067c80ee
---
D Autoload.php
D ContentTranslation.php
D Resources.php
M extension.json
4 files changed, 264 insertions(+), 1,255 deletions(-)


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

diff --git a/Autoload.php b/Autoload.php
deleted file mode 100644
index 9c7c5e6..000
--- a/Autoload.php
+++ /dev/null
@@ -1,32 +0,0 @@
-?php
-/**
- * Autoload definitions.
- *
- * @file
- * @copyright See AUTHORS.txt
- * @license GPL-2.0+
- */
-
-global $wgAutoloadClasses;
-$dir = __DIR__;
-
-$wgAutoloadClasses += array(
-   'ApiContentTranslationConfiguration' = 
$dir/api/ApiContentTranslationConfiguration.php,
-   'ApiContentTranslationPublish' = 
$dir/api/ApiContentTranslationPublish.php,
-   'ApiContentTranslationDelete' = 
$dir/api/ApiContentTranslationDelete.php,
-   'ApiQueryContentTranslation' = 
$dir/api/ApiQueryContentTranslation.php,
-   'ApiQueryContentTranslationStats' = 
$dir/api/ApiQueryContentTranslationStats.php,
-   'ApiQueryContentTranslationLanguageTrend' 
=$dir/api/ApiQueryContentTranslationLanguageTrend.php,
-   'ApiQueryPublishedTranslations' = 
$dir/api/ApiQueryPublishedTranslations.php,
-   'ContentTranslationHooks' = $dir/ContentTranslation.hooks.php,
-   'ContentTranslation\Database' = $dir/includes/Database.php,
-   'ContentTranslation\Draft' = $dir/includes/Draft.php,
-   'ContentTranslation\GlobalUser' = $dir/includes/GlobalUser.php,
-   'ContentTranslation\Notification' = $dir/includes/Notification.php,
-   'ContentTranslation\SiteMapper' = $dir/includes/SiteMapper.php,
-   'ContentTranslation\Stats' = $dir/includes/Stats.php,
-   'ContentTranslation\Translation' = $dir/includes/Translation.php,
-   'ContentTranslation\Translator' = $dir/includes/Translator.php,
-   'SpecialContentTranslation' = 
$dir/specials/SpecialContentTranslation.php,
-   'SpecialContentTranslationStats' = 
$dir/specials/SpecialContentTranslationStats.php,
-);
diff --git a/ContentTranslation.php b/ContentTranslation.php
deleted file mode 100644
index 9c757ed..000
--- a/ContentTranslation.php
+++ /dev/null
@@ -1,173 +0,0 @@
-?php
-/**
- * ContentTranslation extension
- * A tool that allows editors to translate pages from one language
- * to another with the help of machine translation and other translation tools
- *
- * @file
- * @ingroup Extensions
- * @copyright See AUTHORS.txt
- * @license GPL-2.0+
- */
-
-/**
- * Version number used in extension credits and in other places where needed.
- */
-define( 'CONTENTTRANSLATION_VERSION', '1.0.0+20150401' );
-
-/**
- * Extension credits properties.
- */
-$wgExtensionCredits['specialpage'][] = array(
-   'path' = __FILE__,
-   'name' = 'ContentTranslation',
-   'version' = CONTENTTRANSLATION_VERSION,
-   'author' = array(
-   'Amir Aharoni',
-   'David Chan',
-   'Kartik Mistry',
-   'Joel Sahleen',
-   'Niklas Laxström',
-   'Pau Giner',
-   'Runa Bhattacharjee',
-   'Santhosh Thottingal',
-   'Siebrand Mazeland',
-   'Sucheta Ghoshal',
-   ),
-   'descriptionmsg' = 'cx-desc',
-   'url' = 'https://www.mediawiki.org/wiki/Extension:ContentTranslation',
-   'license-name' = 'GPL-2.0+',
-);
-
-$dir = __DIR__;
-
-require_once $dir/Resources.php;
-require_once $dir/Autoload.php;
-
-$GLOBALS['wgMessagesDirs']['ContentTranslation'] = $dir/i18n;
-
-$GLOBALS['wgExtensionMessagesFiles']['ContentTranslationAlias'] =
-   $dir/ContentTranslation.alias.php;
-
-// Special pages
-$GLOBALS['wgSpecialPages']['ContentTranslation'] = 'SpecialContentTranslation';
-$GLOBALS['wgSpecialPages']['ContentTranslationStats'] = 
'SpecialContentTranslationStats';
-
-// API modules
-$GLOBALS['wgAPIModules']['cxconfiguration'] = 
'ApiContentTranslationConfiguration';
-$GLOBALS['wgAPIModules']['cxpublish'] = 'ApiContentTranslationPublish';
-$GLOBALS['wgAPIModules']['cxdelete'] = 'ApiContentTranslationDelete';
-$GLOBALS['wgAPIListModules']['contenttranslation'] = 
'ApiQueryContentTranslation';
-$GLOBALS['wgAPIListModules']['contenttranslationstats'] = 
'ApiQueryContentTranslationStats';
-$GLOBALS['wgAPIListModules']['contenttranslationlangtrend'] =
-   'ApiQueryContentTranslationLanguageTrend';
-$GLOBALS['wgAPIListModules']['cxpublishedtranslations' ]= 
'ApiQueryPublishedTranslations';
-// Hooks
-$GLOBALS['wgHooks']['BeforePageDisplay'][] = 
'ContentTranslationHooks::addModules';