* Change function name on i18n file for SyntaxHighlight extension to compy with maintenance/language/checkExtensioni18n.php

* Update i18n.db for SyntaxHighlight
This commit is contained in:
Ivan Lanin 2007-04-04 03:55:01 +00:00
parent 8cfe16db82
commit ce5e258e78
2 changed files with 8 additions and 7 deletions

View file

@ -6,7 +6,7 @@
* @addtogroup Extensions
*/
function efSyntaxHighlightMessages() {
function efSyntaxHighlight_GeSHiMessages() {
return array(
/* English (Brion Vibber) */
@ -37,6 +37,7 @@ function efSyntaxHighlightMessages() {
'syntaxhighlight-specify' => 'Anda harus menentukan suatu bahasa seperti ini:',
'syntaxhighlight-supported' => 'Bahasa-bahasa yang didukung oleh pewarnaan sintaks:',
'syntaxhighlight-err-loading' => '(kesalahan pemuatan daftar bahasa yang didukung)',
'syntaxhighlight-err-language' => 'Bahasa tak sah.',
),
/* Italian (BrokenArrow) */

View file

@ -61,14 +61,14 @@ function syntaxHighlightLoadMessages() {
}
global $wgMessageCache;
require_once( dirname( __FILE__ ) . '/SyntaxHighlight_GeSHi.i18n.php' );
foreach( efSyntaxHighlightMessages() as $lang => $messages )
foreach( efSyntaxHighlight_GeSHiMessages() as $lang => $messages )
$wgMessageCache->addMessages( $messages, $lang );
}
function syntaxHighlightHook( $text, $params = array(), $parser ) {
if ( !class_exists( 'GeSHi' ) ) {
require( 'geshi/geshi.php' );
}
}
syntaxHighlightLoadMessages();
return isset( $params['lang'] )
? syntaxHighlightFormat( trim( $text ), $params, $parser )
@ -110,8 +110,8 @@ function syntaxHighlightFormat( $text, $params, $parser ) {
return syntaxHighlightHelp( $error );
} else {
$geshi->set_overall_class( "source-$lang" );
$parser->mOutput->addHeadItem(
"<style><!--\n" .
$parser->mOutput->addHeadItem(
"<style><!--\n" .
$geshi->get_stylesheet( false ) .
"--></style>\n",
"source-$lang" );
@ -124,8 +124,8 @@ function syntaxHighlightFormat( $text, $params, $parser ) {
* @param string $error HTML error message
*/
function syntaxHighlightHelp( $error = false ) {
return syntaxHighlightError(
( $error ? "<p>$error</p>" : '' ) .
return syntaxHighlightError(
( $error ? "<p>$error</p>" : '' ) .
'<p>' . wfMsg( 'syntaxhighlight-specify' ) . ' ' .
'<samp>&lt;source lang=&quot;html&quot;&gt;...&lt;/source&gt;</samp></p>' .
'<p>' . wfMsg( 'syntaxhighlight-supported' ) . '</p>' .