Index: trunk/extensions/Translate/TranslateEditAddons.php |
— | — | @@ -260,17 +260,19 @@ |
261 | 261 | // Take the contents from edit field as a translation |
262 | 262 | $message->database = $translation; |
263 | 263 | $checker = MessageChecks::getInstance(); |
264 | | - $checks = $checker->doChecks( $message, $group->getType(), $code ); |
265 | | - if ( count($checks) ) { |
266 | | - $checkMessages = array(); |
267 | | - foreach ( $checks as $checkParams ) { |
268 | | - array_splice( $checkParams, 1, 0, 'parseinline' ); |
269 | | - $checkMessages[] = call_user_func_array( 'wfMsgExt', $checkParams ); |
| 264 | + if ( $checker->hasChecks( $type ) ) { |
| 265 | + $checks = $checker->doChecks( $message, $group->getType(), $code ); |
| 266 | + if ( count($checks) ) { |
| 267 | + $checkMessages = array(); |
| 268 | + foreach ( $checks as $checkParams ) { |
| 269 | + array_splice( $checkParams, 1, 0, 'parseinline' ); |
| 270 | + $checkMessages[] = call_user_func_array( 'wfMsgExt', $checkParams ); |
| 271 | + } |
| 272 | + |
| 273 | + $boxes[] = TranslateUtils::fieldset( |
| 274 | + wfMsgHtml( self::MSG . 'warnings' ), implode( '<hr />', $checkMessages), |
| 275 | + array( 'class' => 'mw-sp-translate-edit-warnings' ) ); |
270 | 276 | } |
271 | | - |
272 | | - $boxes[] = TranslateUtils::fieldset( |
273 | | - wfMsgHtml( self::MSG . 'warnings' ), implode( '<hr />', $checkMessages), |
274 | | - array( 'class' => 'mw-sp-translate-edit-warnings' ) ); |
275 | 277 | } |
276 | 278 | } |
277 | 279 | |