private function addMsgstrToOutput(array $entry, bool $isPlural, string $output, bool $isObsolete): string
    {
        // checks if there is a key starting with msgstr
        if (\count(\preg_grep('/^msgstr/', \array_keys($entry))) !== 0) {
            if ($isPlural) {
                $noTranslation = true;

                foreach ($entry as $key => $value) {
                    if (\mb_strpos($key, 'msgstr[') === false) {
                        continue;
                    }

                    $output .= $key . ' ';
                    $noTranslation = false;

                    foreach ($value as $i => $t) {
                        $output .= $this->cleanExport($t) . $this->eol;
                    }
                }

                if ($noTranslation) {
                    $output .= 'msgstr[0] ' . $this->cleanExport('') . $this->eol;
                    $output .= 'msgstr[1] ' . $this->cleanExport('') . $this->eol;
                }
            } else {
                foreach ((array) $entry['msgstr'] as $i => $t) {
                    if ($isObsolete) {
                        $output .= '#~ ';
                    }

                    if ($i === 0) {
                        $output .= 'msgstr ';
                    }

                    $output .= $this->cleanExport($t) . $this->eol;
                }
            }
        }

        return $output;
    }
private function addMsgstrToOutput(array $entry, bool $isPlural, string $output, bool $isObsolete): string
    {
        // checks if there is a key starting with msgstr
        if (\count(\preg_grep('/^msgstr/', \array_keys($entry))) !== 0) {
            if ($isPlural) {
                $noTranslation = true;

                foreach ($entry as $key => $value) {
                    if (\mb_strpos($key, 'msgstr[') === false) {
                        continue;
                    }

                    $output .= $key . ' ';
                    $noTranslation = false;

                    foreach ($value as $i => $t) {
                        $output .= $this->cleanExport($t) . $this->eol;
                    }
                }

                if ($noTranslation) {
                    $output .= 'msgstr[0] ' . $this->cleanExport('') . $this->eol;
                    $output .= 'msgstr[1] ' . $this->cleanExport('') . $this->eol;
                }
            } else {
                foreach ((array) $entry['msgstr'] as $i => $t) {
                    if ($isObsolete) {
                        $output .= '#~ ';
                    }

                    if ($i === 0) {
                        $output .= 'msgstr ';
                    }

                    $output .= $this->cleanExport($t) . $this->eol;
                }
            }
        }

        return $output;
    }
private function addMsgstrToOutput ( array $ entry , bool $ isPlural , string $ output , bool $ isObsolete ) : string { // checks if there is a key starting with msgstr if ( \ count ( \ preg_grep ( '/^msgstr/' , \ array_keys ( $ entry ) ) ) !== 0 ) { if ( $ isPlural ) { $ noTranslation = true ; foreach ( $ entry as $ key => $ value ) { if ( \ mb_strpos ( $ key , 'msgstr[' ) === false ) { continue ; } $ output .= $ key . ' ' ; $ noTranslation = false ; foreach ( $ value as $ i => $ t ) { $ output .= $ this -> cleanExport ( $ t ) . $ this -> eol ; } } if ( $ noTranslation ) { $ output .= 'msgstr[0] ' . $ this -> cleanExport ( '' ) . $ this -> eol ; $ output .= 'msgstr[1] ' . $ this -> cleanExport ( '' ) . $ this -> eol ; } } else { foreach ( ( array ) $ entry [ 'msgstr' ] as $ i => $ t ) { if ( $ isObsolete ) { $ output .= '#~ ' ; } if ( $ i === 0 ) { $ output .= 'msgstr ' ; } $ output .= $ this -> cleanExport ( $ t ) . $ this -> eol ; } } } return $ output ; }
Adds key with msgstr to the output.

@param array  $entry
@param bool   $isPlural
@param string $output
@param bool   $isObsolete

@return string
Adds key with msgstr to the output .