http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96650
Revision: 96650
Author: nikerabbit
Date: 2011-09-09 09:03:54 +0000 (Fri, 09 Sep 2011)
Log Message:
-----------
txt2cdb was broken for all language names which had spaces in them.
Fixed the script and committing updated cdb
Reported as bug 28117
Modified Paths:
--------------
trunk/extensions/Babel/names.cdb
trunk/extensions/Babel/txt2cdb.php
Modified: trunk/extensions/Babel/names.cdb
===================================================================
(Binary files differ)
Modified: trunk/extensions/Babel/txt2cdb.php
===================================================================
--- trunk/extensions/Babel/txt2cdb.php 2011-09-09 08:04:18 UTC (rev 96649)
+++ trunk/extensions/Babel/txt2cdb.php 2011-09-09 09:03:54 UTC (rev 96650)
@@ -16,9 +16,11 @@
$fr = fopen( dirname( __FILE__ ) . '/codes.txt', 'r' );
while ( $line = fgets( $fr ) ) {
- $line = explode( ' ', $line );
+ // Format is code1 code2 "language name"
+ $line = explode( ' ', $line, 3 );
$iso1 = trim( $line[0] );
$iso3 = trim( $line[1] );
+ // Strip quotes
$name = substr( trim( $line[2] ), 1, -1 );
if ( $iso1 !== '-' ) {
$codes->set( $iso1, $iso1 );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs