mirror of
https://bitbucket.org/vertlach/voteny.git
synced 2024-05-16 13:58:15 +03:00
Removing PHP i18n file
Change-Id: If6aeaffece83d86e3d296e9a2d761898c828edec
This commit is contained in:
parent
075db96be1
commit
4775836933
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* This is a backwards-compatibility shim, generated by:
|
|
||||||
* https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
|
|
||||||
*
|
|
||||||
* Beginning with MediaWiki 1.23, translation strings are stored in json files,
|
|
||||||
* and the EXTENSION.i18n.php file only exists to provide compatibility with
|
|
||||||
* older releases of MediaWiki. For more information about this migration, see:
|
|
||||||
* https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
|
|
||||||
*
|
|
||||||
* This shim maintains compatibility back to MediaWiki 1.17.
|
|
||||||
*/
|
|
||||||
$messages = array();
|
|
||||||
if ( !function_exists( 'wfJsonI18nShim3f61e168e7e5a665' ) ) {
|
|
||||||
function wfJsonI18nShim3f61e168e7e5a665( $cache, $code, &$cachedData ) {
|
|
||||||
$codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
|
|
||||||
foreach ( $codeSequence as $csCode ) {
|
|
||||||
$fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
|
|
||||||
if ( is_readable( $fileName ) ) {
|
|
||||||
$data = FormatJson::decode( file_get_contents( $fileName ), true );
|
|
||||||
foreach ( array_keys( $data ) as $key ) {
|
|
||||||
if ( $key === '' || $key[0] === '@' ) {
|
|
||||||
unset( $data[$key] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
|
|
||||||
}
|
|
||||||
|
|
||||||
$cachedData['deps'][] = new FileDependency( $fileName );
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim3f61e168e7e5a665';
|
|
||||||
}
|
|
16
VoteNY.php
16
VoteNY.php
|
@ -22,7 +22,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
|
||||||
// Extension credits that show up on Special:Version
|
// Extension credits that show up on Special:Version
|
||||||
$wgExtensionCredits['parserhook'][] = array(
|
$wgExtensionCredits['parserhook'][] = array(
|
||||||
'name' => 'Vote',
|
'name' => 'Vote',
|
||||||
'version' => '2.6.0',
|
'version' => '2.6.1',
|
||||||
'author' => array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
|
'author' => array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
|
||||||
'descriptionmsg' => 'voteny-desc',
|
'descriptionmsg' => 'voteny-desc',
|
||||||
'url' => 'https://www.mediawiki.org/wiki/Extension:VoteNY'
|
'url' => 'https://www.mediawiki.org/wiki/Extension:VoteNY'
|
||||||
|
@ -40,20 +40,18 @@ $wgGroupPermissions['user']['voteny'] = true; // Registered users can vote
|
||||||
require_once( 'Vote_AjaxFunctions.php' );
|
require_once( 'Vote_AjaxFunctions.php' );
|
||||||
|
|
||||||
// Autoload classes and set up i18n
|
// Autoload classes and set up i18n
|
||||||
$dir = dirname( __FILE__ ) . '/';
|
|
||||||
$wgMessagesDirs['VoteNY'] = __DIR__ . '/i18n';
|
$wgMessagesDirs['VoteNY'] = __DIR__ . '/i18n';
|
||||||
$wgExtensionMessagesFiles['VoteNY'] = $dir . 'Vote.i18n.php';
|
$wgExtensionMessagesFiles['VoteNYMagic'] = __DIR__ . '/VoteNY.i18n.magic.php';
|
||||||
$wgExtensionMessagesFiles['VoteNYMagic'] = $dir . 'VoteNY.i18n.magic.php';
|
$wgAutoloadClasses['Vote'] = __DIR__ . '/VoteClass.php';
|
||||||
$wgAutoloadClasses['Vote'] = $dir . 'VoteClass.php';
|
$wgAutoloadClasses['VoteStars'] = __DIR__ . '/VoteClass.php';
|
||||||
$wgAutoloadClasses['VoteStars'] = $dir . 'VoteClass.php';
|
|
||||||
|
|
||||||
// Set up the new special page, Special:TopRatings, which shows top rated pages
|
// Set up the new special page, Special:TopRatings, which shows top rated pages
|
||||||
// based on given criteria
|
// based on given criteria
|
||||||
$wgAutoloadClasses['SpecialTopRatings'] = $dir . 'SpecialTopRatings.php';
|
$wgAutoloadClasses['SpecialTopRatings'] = __DIR__ . '/SpecialTopRatings.php';
|
||||||
$wgSpecialPages['TopRatings'] = 'SpecialTopRatings';
|
$wgSpecialPages['TopRatings'] = 'SpecialTopRatings';
|
||||||
|
|
||||||
// Hooked functions
|
// Hooked functions
|
||||||
$wgAutoloadClasses['VoteHooks'] = $dir . 'VoteHooks.php';
|
$wgAutoloadClasses['VoteHooks'] = __DIR__ . '/VoteHooks.php';
|
||||||
|
|
||||||
$wgHooks['ParserFirstCallInit'][] = 'VoteHooks::registerParserHook';
|
$wgHooks['ParserFirstCallInit'][] = 'VoteHooks::registerParserHook';
|
||||||
$wgHooks['RenameUserSQL'][] = 'VoteHooks::onUserRename';
|
$wgHooks['RenameUserSQL'][] = 'VoteHooks::onUserRename';
|
||||||
|
@ -67,7 +65,7 @@ $wgResourceModules['ext.voteNY'] = array(
|
||||||
'styles' => 'Vote.css',
|
'styles' => 'Vote.css',
|
||||||
'scripts' => 'Vote.js',
|
'scripts' => 'Vote.js',
|
||||||
'messages' => array( 'voteny-link', 'voteny-unvote-link' ),
|
'messages' => array( 'voteny-link', 'voteny-unvote-link' ),
|
||||||
'localBasePath' => dirname( __FILE__ ),
|
'localBasePath' => __DIR__,
|
||||||
'remoteExtPath' => 'VoteNY',
|
'remoteExtPath' => 'VoteNY',
|
||||||
'position' => 'top' // available since r85616
|
'position' => 'top' // available since r85616
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue