blob: 8ef161dfc3867ba1575690fb61051c142d564ad9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<?php
/**
* GentooToolbox
*
* @ingroup Extensions
* @author Alex Legler <a3li@gentoo.org>
* @version 1.0
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
if (!defined('MEDIAWIKI')) {
echo "This is an extension to the MediaWiki package and cannot be run standalone.\n";
die(-1);
}
if (!defined('SMW_VERSION')) {
echo "Semantic MediaWiki not found.\n";
die(-1);
}
define('GTBX_VERSION', '0.0.1');
$wgExtensionCredits['semantic'][] = array(
'path' => __FILE__,
'name' => 'Gentoo Toolbox: Translation properties',
'version' => GTBX_VERSION,
'author' => 'Alex Legler',
'url' => 'https://wiki.gentoo.org/',
);
$wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => 'Gentoo Toolbox',
'version' => GTBX_VERSION,
'author' => 'Alex Legler',
'url' => 'https://wiki.gentoo.org/',
);
$dir = dirname(__FILE__) . '/';
// Translation Properties
$wgExtensionMessagesFiles['GTBX_TranslationProperties'] = $dir . '/properties/TranslationProperties.i18n.php';
$wgAutoloadClasses['GTBXTranslationProperties'] = $dir . '/properties/TranslationProperties.body.php';
$wgHooks['smwInitProperties'][] = 'GTBXTranslationProperties::setupProperties';
$wgHooks['SMWStore::updateDataBefore'][] = 'GTBXTranslationProperties::updateDataBefore';
// LocalizedMessage
$wgAutoloadClasses['GTBXLocalizedMsg'] = $dir . '/localizedmsg/LocalizedMsg.php';
$wgHooks['ParserFirstCallInit'][] = 'GTBXLocalizedMsg::SetUpLocalizedMsgParserFunction';
|