http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56776

Revision: 56776
Author:   avar
Date:     2009-09-22 17:32:32 +0000 (Tue, 22 Sep 2009)

Log Message:
-----------
Also mark ARRAY values as UTF-8

Modified Paths:
--------------
    trunk/extensions/Translate/utils/TranslateYaml.php

Modified: trunk/extensions/Translate/utils/TranslateYaml.php
===================================================================
--- trunk/extensions/Translate/utils/TranslateYaml.php  2009-09-22 17:23:43 UTC 
(rev 56775)
+++ trunk/extensions/Translate/utils/TranslateYaml.php  2009-09-22 17:32:32 UTC 
(rev 56776)
@@ -79,13 +79,15 @@
                           'sub deutf8 {' .
                               'if(ref($_[0]) eq "HASH") {' .
                                   'return { map { deutf8($_) } %{$_[0]} };' .
-                               '} else {' .
-                                   'my $s = $_[0];' .
-                                   'utf8::decode($s);' .
-                                   'return $s;' .
-                               '}' .
-                           '}' .
-                           "' 2>&1";
+                   '} elsif(ref($_[0]) eq "ARRAY") {' .
+                       'return [ map { deutf8($_) } @{$_[0]} ];' .
+                              '} else {' .
+                                  'my $s = $_[0];' .
+                                  'utf8::decode($s);' .
+                                  'return $s;' .
+                              '}' .
+                          '}' .
+                          "' 2>&1";
                $out = wfShellExec( $cmd, &$ret );
                if ( $ret != 0 ) {
                        wfDebugDieBacktrace("The command '$cmd' died in 
execution with exit code '$ret': $out");



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to