protected function getErrorText($errorCode)
    {
        if (is_array($errorCode)) {
            $code = array_shift($errorCode);
            $result = vsprintf($this->getErrorText($code), $errorCode);
        } else {
            $config = $this->app->make('config');
            $dictionary = [
                self::E_PACKAGE_INSTALLED => t("You've already installed that package."),
                self::E_PACKAGE_NOT_FOUND => t('Invalid Package.'),
                self::E_PACKAGE_VERSION => t('This package requires concrete5 version %s or greater.'),
                self::E_PACKAGE_DOWNLOAD => t('An error occurred while downloading the package.'),
                self::E_PACKAGE_SAVE => t('concrete5 was not able to save the package after download.'),
                self::E_PACKAGE_UNZIP => t('An error occurred while trying to unzip the package.'),
                self::E_PACKAGE_INSTALL => t('An error occurred while trying to install the package.'),
                self::E_PACKAGE_MIGRATE_BACKUP => t('Unable to backup old package directory to %s', $config->get('concrete.misc.package_backup_directory')),
                self::E_PACKAGE_INVALID_APP_VERSION => t('This package isn\'t currently available for this version of concrete5. Please contact the maintainer of this package for assistance.'),
                self::E_PACKAGE_THEME_ACTIVE => t('This package contains the active site theme, please change the theme before uninstalling.'),
            ];
            if (isset($dictionary[$errorCode])) {
                $result = $dictionary[$errorCode];
            } else {
                $result = (string) $errorCode;
            }
        }

        return $result;
    }