Using the extAddMessages function for all the internationalised extensions.

This commit is contained in:
Rotem Liss 2006-07-15 18:06:26 +00:00
parent 7b90e823f0
commit b3a6f399c7
2 changed files with 10 additions and 8 deletions

View file

@ -56,14 +56,15 @@ for ( $i = 0; $i < count( $wgCiteErrors['user'] ); ++$i )
define( $wgCiteErrors['user'][$i], $i + 1 );
# Internationalisation file
if ( !function_exists( 'extAddMessages' ) ) {
require( dirname(__FILE__) . '/../ExtensionFunctions.php' );
}
require_once( 'Cite.i18n.php' );
function wfCite() {
# Add messages
global $wgMessageCache, $wgCiteMessages;
foreach( $wgCiteMessages as $key => $value ) {
$wgMessageCache->addMessages( $wgCiteMessages[$key], $key );
}
global $wgCiteMessages;
extAddMessages( $wgCiteMessages );
class Cite {
/**#@+

View file

@ -23,6 +23,9 @@ $wgExtensionCredits['specialpage'][] = array(
);
# Internationalisation file
if ( !function_exists( 'extAddMessages' ) ) {
require( dirname(__FILE__) . '/../ExtensionFunctions.php' );
}
require_once( 'SpecialCite.i18n.php' );
$wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'wfSpecialCiteNav';
@ -35,10 +38,8 @@ extAddSpecialPage( dirname(__FILE__) . '/SpecialCite_body.php', 'Cite', 'Special
function wfSpecialCite() {
# Add messages
global $wgMessageCache, $wgSpecialCiteMessages;
foreach( $wgSpecialCiteMessages as $key => $value ) {
$wgMessageCache->addMessages( $wgSpecialCiteMessages[$key], $key );
}
global $wgSpecialCiteMessages;
extAddMessages( $wgSpecialCiteMessages );
}
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {