Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/223378
Change subject: Consistency tweaks in preparation for adding to translatewiki.net ...................................................................... Consistency tweaks in preparation for adding to translatewiki.net * Move messages out of php file and convert to JSON format * Rename message file for remaining magic words * Update extension credits Change-Id: I074d9a26bc0556e8b791fbb3fc2d23713d165c51 --- A PopupPages.i18n.magic.php D PopupPages.i18n.php M PopupPages.php A i18n/en.json A i18n/qqq.json 5 files changed, 36 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PopupPages refs/changes/78/223378/1 diff --git a/PopupPages.i18n.magic.php b/PopupPages.i18n.magic.php new file mode 100644 index 0000000..2cd3e9e --- /dev/null +++ b/PopupPages.i18n.magic.php @@ -0,0 +1,15 @@ +<?php +/** + * Internationalisation file for the PopupPages extension + * + * @file + * @ingroup Extensions + */ + +$magicWords = array(); + +$magicWords['en'] = array( + 'popup' => array( 0, 'popup' ), + 'popupcloser' => array( 0, 'popup-closer' ), + 'popupputter' => array( 0, 'popup-putter' ), +); diff --git a/PopupPages.i18n.php b/PopupPages.i18n.php deleted file mode 100644 index b9538fd..0000000 --- a/PopupPages.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -/** - * Internationalisation file for the PopupPages extension - * - * @file - * @ingroup Extensions - */ - -$magicWords = array(); - -$magicWords['en'] = array( - 'popup' => array( 0, 'popup' ), - 'popupcloser' => array( 0, 'popup-closer' ), - 'popupputter' => array( 0, 'popup-putter' ), -); - -$messages = array(); - -/* English - * @author john mcclure - */ -$messages['en'] = array( - 'popuppages-desc' => 'Interstitial popup parser functions', - 'popuppages-nopage' => 'Page for interstitial popup not found', - 'popuppages-nopolicy' => 'Display policy for interstitial popup not found', -); - -/** Message documentation (Message documentation) - * @author your name - */ -$messages['qqq'] = array( - 'popuppages-desc' => '{{desc}}', - 'popuppages-nopage' => '{{no page found to display}}', - 'popuppages-nopolicy' => 'cookie-in, cookie-out, groups-in, groups-out', -); diff --git a/PopupPages.php b/PopupPages.php index e1a9ba3..748f596 100644 --- a/PopupPages.php +++ b/PopupPages.php @@ -28,8 +28,12 @@ 'version' => PPPAGE_VERSION, 'url' => 'http://www.mediawiki.org/wiki/Extension:PopupPages', 'author' => 'John McClure', - 'descriptionmsg' => 'Interstitial popup parser functions', + 'descriptionmsg' => 'popuppages-desc', ); + +$wgMessagesDirs['PopupPages'] = __DIR__ . '/i18n'; +$wgExtensionMessagesFiles['PopupPagesMagic'] = __DIR__ . '/PopupPages.i18n.magic.php'; + $wgResourceModules += array( 'ext.popuppages.popup' => array( 'localBasePath' => $popupDir, @@ -48,7 +52,6 @@ $parser->setFunctionHook( 'popupputter', 'PopupPageFunctions::putter' );#, SFH_OBJECT_ARGS ); return true; } -$wgExtensionMessagesFiles['PopupPagesExtension'] = $popupDir . 'PopupPages.i18n.php'; ########################## Class PopupPageFunctions { diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..57705da --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [] + }, + "popuppages-desc": "Adds interstitial popup parser functions", + "popuppages-nopage": "Page for interstitial popup not found", + "popuppages-nopolicy": "Display policy for interstitial popup not found" +} diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..a3f27a3 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [] + }, + "popuppages-desc": "{{desc}}", + "popuppages-nopage": "{{no page found to display}}", + "popuppages-nopolicy": "cookie-in, cookie-out, groups-in, groups-out" +} -- To view, visit https://gerrit.wikimedia.org/r/223378 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I074d9a26bc0556e8b791fbb3fc2d23713d165c51 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PopupPages Gerrit-Branch: master Gerrit-Owner: Raimond Spekking <raimond.spekk...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits