r29196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29195‎ | r29196 | r29197 >
Date:22:08, 2 January 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Don't warn if there is no translation yet
Modified paths:
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -161,14 +161,16 @@
162162 }
163163
164164 // Some syntactic checks
165 - $message = new TMessage( $key, $en );
166 - $message->database = $object->textbox1 ? $object->textbox1 : $xx;
167 - $checks = MessageChecks::doChecks( $message );
168 - if ( count($checks) ) {
169 - $boxes[] = TranslateUtils::fieldset( wfMsgHtml( self::MSG . 'warnings' ), implode( '<hr />', $checks) );
 165+ $translation = $object->textbox1 ? $object->textbox1 : $xx;
 166+ if ( $translation ) {
 167+ $message = new TMessage( $key, $en );
 168+ $message->database = $translation;
 169+ $checks = MessageChecks::doChecks( $message );
 170+ if ( count($checks) ) {
 171+ $boxes[] = TranslateUtils::fieldset( wfMsgHtml( self::MSG . 'warnings' ), implode( '<hr />', $checks) );
 172+ }
170173 }
171174
172 -
173175 $group->reset();
174176 return implode("\n\n", $boxes);
175177 }

Status & tagging log