r93754 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93753‎ | r93754 | r93755 >
Date:14:37, 2 August 2011
Author:siebrand
Status:ok
Tags:
Comment:
Update braces.
Modified paths:
  • /trunk/extensions/Translate/FFS.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/FFS.php
@@ -1074,7 +1074,11 @@
10751075 $json = shell_exec( "python -c'import simplejson as json; execfile(\"$filename\"); print json.dumps(msg)'" );
10761076 self::$data[$this->group->getId()] = json_decode( $json, true );
10771077 }
1078 - if ( !isset( self::$data[$this->group->getId()][$code] ) ) self::$data[$this->group->getId()][$code] = array();
 1078+
 1079+ if ( !isset( self::$data[$this->group->getId()][$code] ) ) {
 1080+ self::$data[$this->group->getId()][$code] = array();
 1081+ }
 1082+
10791083 return array( 'MESSAGES' => self::$data[$this->group->getId()][$code] );
10801084 }
10811085
@@ -1092,10 +1096,15 @@
10931097 $collection->loadTranslations();
10941098 $ok = false;
10951099 foreach ( $collection as $messages ) {
1096 - if ( $messages->translation() != '' ) $ok = true;
 1100+ if ( $messages->translation() != '' ) {
 1101+ $ok = true;
 1102+ }
10971103 }
1098 - if ( !$ok ) return;
10991104
 1105+ if ( !$ok ) {
 1106+ return;
 1107+ }
 1108+
11001109 $authors = $this->doAuthors( $collection );
11011110 if ( $authors != '' ) {
11021111 fwrite( $this->fw, "$authors" );
@@ -1121,11 +1130,15 @@
11221131 $messages = array();
11231132
11241133 foreach ( $collection as $message ) {
1125 - if ( $message->translation() == '' ) continue;
 1134+ if ( $message->translation() == '' ) {
 1135+ continue;
 1136+ }
 1137+
11261138 $translation = str_replace( '\\', '\\\\', $message->translation() );
11271139 $translation = str_replace( '\'', '\\\'', $translation );
11281140 $translation = str_replace( "\n", '\n', $translation );
11291141 $translation = str_replace( TRANSLATE_FUZZY, '', $translation );
 1142+
11301143 $messages[$message->key()] = $translation;
11311144 }
11321145

Status & tagging log