Index: trunk/extensions/Translate/ffs/PhpVariables.php |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | $data = file_get_contents( $this->filename ); |
100 | 100 | |
101 | 101 | $matches = array(); |
102 | | - $regex = '/^\$(.*?)\s*=\s*[\'"](.*?)[\'"];(\s*#.*?)?$/mus'; |
| 102 | + $regex = '/^\$(.*?)\s*=\s*[\'"](.*?)[\'"];.*?$/mus'; |
103 | 103 | preg_match_all( $regex, $data, $matches, PREG_SET_ORDER ); |
104 | 104 | $messages = array(); |
105 | 105 | foreach ( $matches as $_ ) { |
— | — | @@ -165,12 +165,12 @@ |
166 | 166 | protected function exportMessages( $handle, MessageCollection $collection ) { |
167 | 167 | $mangler = $this->group->getMangler(); |
168 | 168 | foreach ( $collection->keys() as $item ) { |
169 | | - $value = $collection[$item]->translation; |
170 | | - if ( $value === null ) continue; |
171 | 169 | |
172 | 170 | $key = $mangler->unmangle($item); |
173 | 171 | $key = stripcslashes( $key ); |
174 | 172 | |
| 173 | + $value = $collection[$item]->translation; |
| 174 | + if ( $value === null ) $value = $collection[$item]->definition; |
175 | 175 | $value = str_replace( TRANSLATE_FUZZY, '', $value ); |
176 | 176 | $value = addcslashes( $value, "'" ); |
177 | 177 | |