Index: trunk/extensions/Translate/TranslateEditAddons.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | |
44 | 44 | private static function doBox( $msg, $code, $title = false ) { |
45 | 45 | global $wgUser, $wgLang; |
46 | | - if (!$msg ) { return ''; } |
| 46 | + if ( $msg === null ) { return ''; } |
47 | 47 | |
48 | 48 | $name = TranslateUtils::getLanguageName( $code, false, $wgLang->getCode() ); |
49 | 49 | $code = strtolower( $code ); |
— | — | @@ -144,12 +144,11 @@ |
145 | 145 | $title = Title::makeTitle( NS_MEDIAWIKI, $key . '/' . $wgTranslateDocumentationLanguageCode ); |
146 | 146 | $edit = $wgUser->getSkin()->makeKnownLinkObj( $title, wfMsgHtml( self::MSG . 'contribute' ), 'action=edit' ); |
147 | 147 | $info = TranslateUtils::getMessageContent( $key, $wgTranslateDocumentationLanguageCode ); |
148 | | - if ( !$info ) { |
| 148 | + if ( $info === null ) { |
149 | 149 | $info = $group->getMessage( $key, $wgTranslateDocumentationLanguageCode ); |
150 | 150 | } |
151 | 151 | $class = 'mw-sp-translate-edit-info'; |
152 | | - |
153 | | - if ( !$info ) { |
| 152 | + if ( $info === null ) { |
154 | 153 | $info = wfMsg( self::MSG . 'no-information' ); |
155 | 154 | $class = 'mw-sp-translate-edit-noinfo'; |
156 | 155 | } |
— | — | @@ -185,8 +184,8 @@ |
186 | 185 | |
187 | 186 | |
188 | 187 | // Some syntactic checks |
189 | | - $translation = $object->textbox1 ? $object->textbox1 : $xx; |
190 | | - if ( $translation ) { |
| 188 | + $translation = ($object->textbox1 !== null) ? $object->textbox1 : $xx; |
| 189 | + if ( $translation !== null ) { |
191 | 190 | $message = new TMessage( $key, $en ); |
192 | 191 | $message->database = $translation; |
193 | 192 | $checks = MessageChecks::doChecks( $message ); |
Index: trunk/extensions/Translate/Message.php |
— | — | @@ -300,7 +300,7 @@ |
301 | 301 | * @return Translated string or null if there isn't translation. |
302 | 302 | */ |
303 | 303 | public function translation() { |
304 | | - return $this->database() ? $this->database() : $this->infile(); |
| 304 | + return ($this->database() !== null) ? $this->database() : $this->infile(); |
305 | 305 | } |
306 | 306 | |
307 | 307 | /** |