mirror of
https://github.com/Hutchy68/pivot.git
synced 2024-12-08 10:15:32 +01:00
Merge pull request #6 from Hutchy68/language-stuff
Pivot will only support MW version 1.23 >, remove lang shim
This commit is contained in:
commit
b1377818bb
@ -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';
|
||||
}
|
@ -212,8 +212,9 @@ class pivotTemplate extends BaseTemplate {
|
||||
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||
<?php } ?>
|
||||
<?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?>
|
||||
<h5 class="subtitle"><?php $this->html('subtitle') ?></h5>
|
||||
<div class="clear_both"></div>
|
||||
<h5 id="sitesub" class="subtitle"><?php $this->html('subtitle') ?></h5>
|
||||
<div id="contentSub" class="clear_both"></div>
|
||||
<div id="bodyContent" class="mw-bodytext">
|
||||
<?php
|
||||
switch ($wgPivotFeatures['usePivotTabs']) {
|
||||
case true:
|
||||
@ -225,6 +226,8 @@ class pivotTemplate extends BaseTemplate {
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<div class="clear_both"></div>
|
||||
</div>
|
||||
<div id="categories" class="row">
|
||||
<div class="small-12 columns">
|
||||
<div class="group"><?php $this->html('catlinks'); ?></div>
|
||||
|
11
i18n/qqq.json
Normal file
11
i18n/qqq.json
Normal 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"
|
||||
}
|
@ -18,7 +18,7 @@ if ( ! defined('MEDIAWIKI'))
|
||||
|
||||
$wgExtensionCredits['skin'][] = array(
|
||||
'path' => __FILE__,
|
||||
'name' => 'Pivot',
|
||||
'name' => 'skinname-pivot',
|
||||
'url' => 'http://github.com/hutchy68/pivot/',
|
||||
'author' => array(
|
||||
'Tom Hutchison',
|
||||
@ -34,8 +34,6 @@ $wgAutoloadClasses['SkinPivot'] = __DIR__.'/Pivot.skin.php';
|
||||
|
||||
$wgMessagesDirs['SkinPivot'] = __DIR__ . '/i18n';
|
||||
|
||||
$wgExtensionMessagesFiles['SkinPivot'] = __DIR__ . '/Pivot.i18n.php';
|
||||
|
||||
$wgResourceModules['skins.pivot'] = array(
|
||||
'styles' => array(
|
||||
'pivot/assets/stylesheets/normalize.css',
|
||||
|
Loading…
Reference in New Issue
Block a user