70 $authors = self::extractAuthors( $data );
71 $data = self::extractMessagePart( $data );
72 $messages = (array)FormatJson::decode( $data,
true );
76 if ( isset( $messages[
'root'] ) ) {
77 $messages = $this->group->getMangler()->mangleArray( $messages[
'root'] );
79 $messages = $this->group->getMangler()->mangleArray( $messages );
83 'MESSAGES' => $messages,
84 'AUTHORS' => $authors,
85 'METADATA' => $metadata,
95 $mangler = $this->group->getMangler();
98 foreach ( $collection as $key => $m ) {
99 $value = $m->translation();
100 if ( $value ===
null ) {
104 if ( $m->hasTag(
'fuzzy' ) ) {
105 $value = str_replace( TRANSLATE_FUZZY,
'', $value );
108 $key = $mangler->unmangle( $key );
109 $messages[$key] = $value;
113 if ( !count( $messages ) ) {
116 $header = $this->header( $collection->code, $collection->
getAuthors() );
117 return $header . FormatJson::encode( $messages,
"\t", FormatJson::UTF8_OK ) .
");\n";