protected function runGettext($arguments) { // Build command $command = 'xgettext'; $command .= ' ' . join(' ', $arguments); $status = 0; $output = system($command, $status); if ($status !== 0) { throw new ExtractionException(sprintf('Gettext command "%s" failed with error code %s and output: %s', $command, $status, $output)); } return $output; }