Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update i18n to json #17

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions Booty.i18n.php → Booty.i18n.magic.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
* @file
* @ingroup Extensions
*/
$messages = array();

/** English
* @author Andru Vallance
*/
$messages[ 'en' ] = array(
'herounit' => "Hero Unit"
);

$magicWords = array();

/** English (English) */
$magicWords['en'] = array(
'herounit' => array( 1, 'herounit' ),
);
10 changes: 6 additions & 4 deletions Booty.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@
* @License: GPLv2 (http://www.gnu.org/copyleft/gpl.html)
*/


$GLOBALS['wgExtensionCredits']['parserhook'][] = array(
'name' => 'Booty',
'namemsg' => 'skinname-booty'
'author' => 'Andru Vallance',
'description' => 'Booty is a modern mobile-first responsive MediaWiki theme built on Bootstrap 3. Designed primarily for ease of customisation to create new skins, but with an initial set of clean templates which can be used as-is. Using [[Extension:Skinny]] allows defining skin variations and options on a per-page basis for awesome skin customisation.',
'descriptionmsg' => 'booty-desc'
'url' => 'https://github.com/andru/booty'
);

$cd = dirname(__FILE__);

$GLOBALS['wgAutoloadClasses']['Booty'] = $cd . '/Booty.class.php';
$GLOBALS['wgAutoloadClasses']['SkinBooty'] = $cd . '/base/Skin.php';
$GLOBALS['wgAutoloadClasses']['BootyTemplate'] = $cd . '/base/Template.php';

$GLOBALS['wgExtensionMessagesFiles'][ 'Booty' ] = $cd . '/Booty.i18n.php';
$GLOBALS['wgMessagesDirs']['Booty'] = __DIR__ . '/i18n';
$GLOBALS['wgExtensionMessagesFiles']['BootyMagic'] = __DIR__ . '/Booty.i18n.magic.php';

$GLOBALS['wgValidSkinNames']['booty'] = 'Booty';

Expand All @@ -42,4 +44,4 @@

Booty::init();

};
};
10 changes: 10 additions & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"@metadata": {
"authors": [
"Andru Vallance"
]
},
"skinname-booty ": "Booty",
"booty-desc": "Booty is a modern mobile-first responsive MediaWiki theme built on Bootstrap 3. Designed primarily for ease of customisation to create new skins, but with an initial set of clean templates which can be used as-is. Using [[Extension:Skinny]] allows defining skin variations and options on a per-page basis for awesome skin customisation.",
"herounit": "Hero Unit"
}
7 changes: 7 additions & 0 deletions i18n/qqq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"@metadata": {
"authors": []
},
"skinname-booty": "{{optional}}",
"booty-desc": "{{desc|what=skin|name=Booty|url=https://www.mediawiki.org/wiki/Skin:Booty}}"
}