Index: trunk/extensions/Translate/scripts/poimport.php |
— | — | @@ -81,7 +81,8 @@ |
82 | 82 | $group = MessageGroups::getGroup( $id ); |
83 | 83 | |
84 | 84 | $messages = $group->initCollection( $code ); |
85 | | - $group->fillCollection( $messages ); |
| 85 | + $messages->setInfile( $group->load( $code ) ); |
| 86 | + $messages->loadTranslations(); |
86 | 87 | |
87 | 88 | return $messages; |
88 | 89 | } |
— | — | @@ -144,11 +145,17 @@ |
145 | 146 | $translation = TRANSLATE_FUZZY . $translation; |
146 | 147 | } |
147 | 148 | |
148 | | - if ( $translation !== (string) $contents[$key]->translation ) { |
| 149 | + $oldtranslation = (string) $contents[$key]->translation(); |
| 150 | + |
| 151 | + if ( $translation !== $oldtranslation ) { |
149 | 152 | if ( $translation === '' ) { |
150 | 153 | STDOUT( "Skipping empty translation in the po file for $key!" ); |
151 | 154 | } else { |
152 | | - STDOUT( "Translation of $key differs:\n$translation\n" ); |
| 155 | + if ( $oldtranslation === '' ) { |
| 156 | + STDOUT( "New translation for $key" ); |
| 157 | + } else { |
| 158 | + STDOUT( "Translation of $key differs:\n$translation\n" ); |
| 159 | + } |
153 | 160 | $changes["$key/$code"] = $translation; |
154 | 161 | } |
155 | 162 | } |