1
0
mirror of https://github.com/Hutchy68/pivot.git synced 2024-11-22 02:19:03 +01:00

Pivot will only support MW version 1.23 >, remove lang shim

This commit is contained in:
Tom Hutchison 2015-11-04 14:24:05 -05:00
parent a98d04e3ac
commit c0ac4549ad
4 changed files with 17 additions and 40 deletions

View File

@ -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( 'wfJsonI18nShimd9f8f6c360c3cca9' ) ) {
function wfJsonI18nShimd9f8f6c360c3cca9( $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'][] = 'wfJsonI18nShimd9f8f6c360c3cca9';
}

View File

@ -212,8 +212,9 @@ class pivotTemplate extends BaseTemplate {
<!-- Go to www.addthis.com/dashboard to customize your tools --> <!-- Go to www.addthis.com/dashboard to customize your tools -->
<?php } ?> <?php } ?>
<?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?> <?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?>
<h5 class="subtitle"><?php $this->html('subtitle') ?></h5> <h5 id="sitesub" class="subtitle"><?php $this->html('subtitle') ?></h5>
<div class="clear_both"></div> <div id="contentSub" class="clear_both"></div>
<div id="bodyContent" class="mw-bodytext">
<?php <?php
switch ($wgPivotFeatures['usePivotTabs']) { switch ($wgPivotFeatures['usePivotTabs']) {
case true: case true:
@ -225,6 +226,8 @@ class pivotTemplate extends BaseTemplate {
break; break;
} }
?> ?>
<div class="clear_both"></div>
</div>
<div id="categories" class="row"> <div id="categories" class="row">
<div class="small-12 columns"> <div class="small-12 columns">
<div class="group"><?php $this->html('catlinks'); ?></div> <div class="group"><?php $this->html('catlinks'); ?></div>

11
i18n/qqq.json Normal file
View File

@ -0,0 +1,11 @@
{
"@metadata": {
"authors": [
"Tom Hutchison"
]
},
"skinname-pivot": "name of skin",
"pivot-desc": "description of skin",
"pivot-browsermsg": "old versions of IE not supported message",
"pivot-menutitle": "menu title"
}

View File

@ -18,7 +18,7 @@ if ( ! defined('MEDIAWIKI'))
$wgExtensionCredits['skin'][] = array( $wgExtensionCredits['skin'][] = array(
'path' => __FILE__, 'path' => __FILE__,
'name' => 'Pivot', 'name' => 'skinname-pivot',
'url' => 'http://github.com/hutchy68/pivot/', 'url' => 'http://github.com/hutchy68/pivot/',
'author' => array( 'author' => array(
'Tom Hutchison', 'Tom Hutchison',
@ -34,8 +34,6 @@ $wgAutoloadClasses['SkinPivot'] = __DIR__.'/Pivot.skin.php';
$wgMessagesDirs['SkinPivot'] = __DIR__ . '/i18n'; $wgMessagesDirs['SkinPivot'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['SkinPivot'] = __DIR__ . '/Pivot.i18n.php';
$wgResourceModules['skins.pivot'] = array( $wgResourceModules['skins.pivot'] = array(
'styles' => array( 'styles' => array(
'pivot/assets/stylesheets/normalize.css', 'pivot/assets/stylesheets/normalize.css',