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;
    }