Commit 951478fb authored by Jess's avatar Jess
Browse files

Issue #2055851 by andypost, sja112, jungle, dawehner, Mac_Weber, borisson_,...

Issue #2055851 by andypost, sja112, jungle, dawehner, Mac_Weber, borisson_, fietserwin, xjm, init90, Gábor Hojtsy, effulgentsia, tim.plunkett: [backport] Remove translation of exception messages
parent cf32b857
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1205,7 +1205,7 @@ function archiver_get_archiver($file) {
  // Archivers can only work on local paths
  $filepath = \Drupal::service('file_system')->realpath($file);
  if (!is_file($filepath)) {
    throw new Exception(t('Archivers can only operate on local files: %file not supported', ['%file' => $file]));
    throw new Exception("Archivers can only operate on local files: '$file' not supported");
  }
  return \Drupal::service('plugin.manager.archiver')->getInstance(['filepath' => $filepath]);
}
+2 −2
Original line number Diff line number Diff line
@@ -1252,7 +1252,7 @@ function install_select_profile(&$install_state) {
    else {
      // The non-interactive installer requires a profile parameter.
      if (!$install_state['interactive']) {
        throw new InstallerException(t('Missing profile parameter.'));
        throw new InstallerException('Missing profile parameter.');
      }
      // Otherwise, display a form to select a profile.
      return install_get_form('Drupal\Core\Installer\Form\SelectProfileForm', $install_state);
@@ -1397,7 +1397,7 @@ function install_select_language(&$install_state) {
        return;
      }
      else {
        throw new InstallerException(t('You must select a language to continue the installation.'));
        throw new InstallerException('You must select a language to continue the installation.');
      }
    }
  }
+3 −6
Original line number Diff line number Diff line
@@ -377,7 +377,7 @@ function drupal_rewrite_settings($settings = [], $settings_file = NULL) {

    // Write the new settings file.
    if (file_put_contents($settings_file, $buffer) === FALSE) {
      throw new Exception(t('Failed to modify %settings. Verify the file permissions.', ['%settings' => $settings_file]));
      throw new Exception("Failed to modify '$settings_file'. Verify the file permissions.");
    }
    else {
      // In case any $settings variables were written, import them into the
@@ -394,7 +394,7 @@ function drupal_rewrite_settings($settings = [], $settings_file = NULL) {
    }
  }
  else {
    throw new Exception(t('Failed to open %settings. Verify the file permissions.', ['%settings' => $settings_file]));
    throw new Exception("Failed to open '$settings_file'. Verify the file permissions.");
  }
}

@@ -555,10 +555,7 @@ function drupal_install_config_directories() {
  // Bail out using a similar error message as in system_requirements().
  if (!\Drupal::service('file_system')->prepareDirectory($config_directories[CONFIG_SYNC_DIRECTORY], FileSystemInterface::CREATE_DIRECTORY)
    && !file_exists($config_directories[CONFIG_SYNC_DIRECTORY])) {
    throw new Exception(t('The directory %directory could not be created. To proceed with the installation, either create the directory or ensure that the installer has the permissions to create it automatically. For more information, see the <a href=":handbook_url">online handbook</a>.', [
      '%directory' => config_get_config_directory(CONFIG_SYNC_DIRECTORY),
      ':handbook_url' => 'https://www.drupal.org/server-permissions',
    ]));
    throw new Exception("The directory '" . config_get_config_directory(CONFIG_SYNC_DIRECTORY) . "' could not be created. To proceed with the installation, either create the directory or ensure that the installer has the permissions to create it automatically. For more information, see the <a href='https://www.drupal.org/server-permissions'>online handbook</a>.");
  }
  elseif (is_writable($config_directories[CONFIG_SYNC_DIRECTORY])) {
    // Put a README.txt into the sync config directory. This is required so that
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ function update_set_schema($module, $schema_version) {
 * example:
 * @code
 * use Drupal\Core\Utility\UpdateException;
 * throw new UpdateException(t('Description of what went wrong'));
 * throw new UpdateException('Description of what went wrong');
 * @endcode
 *
 * If an exception is thrown, the current update and all updates that depend on
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ class Zip implements ArchiverInterface {
  public function __construct($file_path) {
    $this->zip = new \ZipArchive();
    if ($this->zip->open($file_path) !== TRUE) {
      throw new ArchiverException(t('Cannot open %file_path', ['%file_path' => $file_path]));
      throw new ArchiverException("Cannot open '$file_path'");
    }
  }

Loading