perceiving colors differently. Colors comes from the French Wikipedia.
* (bug 32879) Upgrade jQuery to 1.7.1
* jQuery UI upgraded to 1.8.17
+* Extensions can use the 'Language::getMessagesFileName' hook to define new
+ languages using messages files outside of core.
=== Bug fixes in 1.19 ===
* $wgUploadNavigationUrl should be used for file redlinks if.
&$result: Set this and return false to override the internal checks
$user: User the password is being validated for
+'Language::getMessagesFileName':
+$code: The language code or the language we're looking for a messages file for
+&$file: The messages file path, you can override this to change the location.
+
'LanguageGetNamespaces': Provide custom ordering for namespaces or
remove namespaces. Do not use this hook to add namespaces. Use
CanonicalNamespaces for that.
global $IP;
$names = array();
- $dir = opendir( "$IP/languages/messages" );
- while ( false !== ( $file = readdir( $dir ) ) ) {
- $code = self::getCodeFromFileName( $file, 'Messages' );
- if ( $code && isset( $allNames[$code] ) ) {
+ // We do this using a foreach over the codes instead of a directory
+ // loop so that messages files in extensions will work correctly.
+ foreach ( $allNames as $code => $value ) {
+ if ( is_readable( self::getMessagesFileName( $code ) ) ) {
$names[$code] = $allNames[$code];
}
}
- closedir( $dir );
return $names;
}
*/
static function getMessagesFileName( $code ) {
global $IP;
- return self::getFileName( "$IP/languages/messages/Messages", $code, '.php' );
+ $file = self::getFileName( "$IP/languages/messages/Messages", $code, '.php' );
+ wfRunHooks( 'Language::getMessagesFileName', array( $code, &$file ) );
+ return $file;
}
/**