<?php

/**
 * Directory to store serialized cache files in. Defaults to $wgCacheDirectory.
 * It's OK to share this directory among wikis as long as the wiki you run
 * update.php on has all extensions the other wikis using the same directory
 * have.
 * NOTE: If this variable and $wgCacheDirectory are both false, this extension
 *       WILL NOT WORK.
 */
$wgLocalisationUpdateDirectory = false;

/**
 * Default repository source to use.
 * @since 2014-03
 */
$wgLocalisationUpdateRepository = 'github';

/**
 * Available repository sources.
 * @since 2014-03
 */
$wgLocalisationUpdateRepositories = array();
$wgLocalisationUpdateRepositories['github'] = array(
	'mediawiki' =>
		'https://raw.github.com/wikimedia/mediawiki/master/%PATH%',
	'extension' =>
		'https://raw.github.com/wikimedia/mediawiki-extensions-%NAME%/master/%PATH%',
	'skin' =>
		'https://raw.github.com/wikimedia/mediawiki-skins-%NAME%/master/%PATH%',
);

// Example for local filesystem configuration
#$wgLocalisationUpdateRepositories['local'] = array(
#	'mediawiki' =>
#		'file:///resources/projects/mediawiki/master/%PATH%',
#	'extension' =>
#		'file:///resources/projects/mediawiki-extensions/extensions/%NAME%/%PATH%',
#	'skin' =>
#		'file:///resources/projects/mediawiki-skins/skins/%NAME%/%PATH%',
#);

$wgExtensionCredits['other'][] = array(
	'path' => __FILE__,
	'name' => 'LocalisationUpdate',
	'author' => array( 'Tom Maaswinkel', 'Niklas Laxström', 'Roan Kattouw' ),
	'version' => '[https://www.mediawiki.org/wiki/MLEB MLEB 2015.04]',
	'url' => 'https://www.mediawiki.org/wiki/Extension:LocalisationUpdate',
	'descriptionmsg' => 'localisationupdate-desc',
);

$wgHooks['LocalisationCacheRecache'][] = 'LocalisationUpdate::onRecache';
$wgHooks['LocalisationCacheRecacheFallback'][] = 'LocalisationUpdate::onRecacheFallback';
$GLOBALS['wgHooks']['UnitTestsList'][] = 'LocalisationUpdate::setupUnitTests';

$dir = __DIR__;
$wgMessagesDirs['LocalisationUpdate'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['LocalisationUpdate'] = "$dir/LocalisationUpdate.i18n.php";

require "$dir/Autoload.php";
