src/I18n/GettextMessageSource.php
protected function loadMessagesFromFile($messageFile, $category)
    {
        $gettextFile = $this->getGettextFile($messageFile);
        if ($gettextFile === null) {
            return reject(new Reaction\Exceptions\Error("Message file '{$messageFile}' not found"));
        }
        $messages = $gettextFile->load($category);
        if (!is_array($messages)) {
            $messages = [];
        }

        return resolve($messages);
    }
protected function loadMessagesFromFile($messageFile, $category)
    {
        $gettextFile = $this->getGettextFile($messageFile);
        if ($gettextFile === null) {
            return reject(new Reaction\Exceptions\Error("Message file '{$messageFile}' not found"));
        }
        $messages = $gettextFile->load($category);
        if (!is_array($messages)) {
            $messages = [];
        }

        return resolve($messages);
    }
Loads the message translation for the specified language and category or returns null if file doesn't exist.

@param string $messageFile path to message file
@param string $category the message category
@return ExtendedPromiseInterface with array array of messages or null if file not found