Because of some changes, it's difficult to know which messages are duplicate and which are not specified, therefore some scripts do not work properly; also, I didn't understand diffLanguage.php, therefore I still didn't fix.
* (bug 6919) Add English alias magic words for Tatar (tt) language file.
* (bug 6753) Fixed broken Kazakh linktrail (kk)
* (bug 6700) Added Kazakh language variants to Names.php
+* (bug 6827) some i18n specific maintenance scripts fails after merge of localisation-work branch
== Languages updated ==
require_once( 'commandLine.inc' );
-$wgLang = Language::factory( 'en' );
-foreach( array_keys( $wgLang->getAllMessages() ) as $key ) {
+$wgEnglishLang = Language::factory( 'en' );
+foreach( array_keys( $wgEnglishLang->getAllMessages() ) as $key ) {
echo "$key\n";
}
/** */
require_once('commandLine.inc');
-if ( 'en' == $wgLanguageCode ) {
+die( "This script currently *does not work*, please wait for fix." );
+
+if ( $wgLang->getCode() == 'en' ) {
print "Current selected language is English. Cannot check translations.\n";
exit();
}
$count = $total = 0;
-$msgarray = 'wgAllMessages' . ucfirst( $wgLanguageCode );
+$wgEnglishLang = Language::factory( 'en' );
+$wgEnglishMessages = $wgEnglishLang->getAllMessages();
+$wgLocalMessages = $wgLang->getAllMessages();
-foreach ( $wgAllMessagesEn as $code => $msg ) {
+foreach ( $wgEnglishMessages as $code => $msg ) {
++$total;
- if ( ! array_key_exists( $code, $$msgarray ) ) {
+ if ( !isset( $wgLocalMessages[$code] ) ) {
print "'{$code}' => \"$msg\",\n";
++$count;
}
require_once( "commandLine.inc" );
$wgMessageCache->disableTransform();
$messages = array();
-foreach ( $wgAllMessagesEn as $key => $englishValue )
+$wgEnglishLang = Language::factory( 'en' );
+foreach ( $wgEnglishLang->getAllMessages() as $key => $englishValue )
{
$messages[$key] = wfMsg( $key );
}
<?php
/**
* Prints out messages that are the same as the message with the corrisponding
- * key in the Language.php file
+ * key in the English file
*
* @package MediaWiki
* @subpackage Maintenance
require_once('commandLine.inc');
-if ( 'en' == $wgLanguageCode ) {
+echo "Note: the script also lists the messages which are not defined in this language file, please wait for the bugfix.\n\n";
+
+if ( $wgLang->getCode() == 'en' ) {
print "Current selected language is English. Cannot check translations.\n";
exit();
}
$count = $total = 0;
-$msgarray = 'wgAllMessages' . ucfirst( $wgLanguageCode );
+$wgEnglishLang = Language::factory( 'en' );
+$wgEnglishMessages = $wgEnglishLang->getAllMessages();
+$wgLocalMessages = $wgLang->getAllMessages();
-foreach ( $$msgarray as $code => $msg ) {
+foreach ( $wgEnglishMessages as $code => $msg ) {
++$total;
- if ( @$wgAllMessagesEn[$code] == $msg ) {
+ if ( $wgLocalMessages[$code] == $wgEnglishMessages[$code] ) {
echo "* $code\n";
++$count;
}
require_once('commandLine.inc');
-if ( 'en' == $wgLanguageCode ) {
+if ( $wgLang->getCode() == 'en' ) {
print "Current selected language is English. Cannot check translations.\n";
exit();
}
$count = $total = 0;
-$msgarray = 'wgAllMessages' . ucfirst( $wgLanguageCode );
+$wgEnglishLang = Language::factory( 'en' );
+$wgEnglishMessages = $wgEnglishLang->getAllMessages();
+$wgLocalMessages = $wgLang->getAllMessages();
-foreach ( $$msgarray as $code => $msg ) {
+foreach ( $wgLocalMessages as $code => $msg ) {
++$total;
- if ( ! array_key_exists( $code, $wgAllMessagesEn ) ) {
+ if ( !isset( $wgEnglishMessages[$code] ) ) {
print "* $code\n";
++$count;
}