diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 0a601cc..710a298 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -960,8 +960,8 @@ function install_verify_completed_task() { $task = unserialize($result->fetchField()); } } - // Do not trigger an error if the database query fails, since the database - // might not be set up yet. + // Do not trigger an error if the database query fails, since the database + // might not be set up yet. catch (Exception $e) { } if (isset($task)) { @@ -1485,7 +1485,7 @@ function install_select_language_form($form, &$form_state, $files = array()) { if (empty($files)) { $form['help'] = array( '#markup' => '

Translations will be downloaded from the Drupal Translation website. ' . - 'If you do not want this, select English and continue the installation. For more information, see the online handbook.

', + 'If you do not want this, select English and continue the installation. For more information, see the online handbook.

', ); } $form['actions'] = array('#type' => 'actions'); @@ -2010,7 +2010,7 @@ function install_check_translations($install_state) { // If the translations directory is not readable, throw an error. if (!$readable) { $requirements['translations directory readable'] = array( - 'title' => st('Translations directory'), + 'title' => st('Translations directory'), 'value' => st('The translations directory is not readable.'), 'severity' => REQUIREMENT_ERROR, 'description' => st('The installer requires read permissions to %translations_directory at all times. If you are unsure how to grant file permissions, consult the online handbook.', array('%translations_directory' => $translations_directory, '@handbook_url' => 'http://drupal.org/server-permissions')), @@ -2019,7 +2019,7 @@ function install_check_translations($install_state) { // If translations directory is not writable, throw an error. if (!$writable) { $requirements['translations directory writable'] = array( - 'title' => st('Translations directory'), + 'title' => st('Translations directory'), 'value' => st('The translations directory is not writable.'), 'severity' => REQUIREMENT_ERROR, 'description' => st('The installer requires write permissions to %translations_directory during the installation process. If you are unsure how to grant file permissions, consult the online handbook.', array('%translations_directory' => $translations_directory, '@handbook_url' => 'http://drupal.org/server-permissions')), @@ -2027,7 +2027,7 @@ function install_check_translations($install_state) { } else { $requirements['translations directory writable'] = array( - 'title' => st('Translations directory'), + 'title' => st('Translations directory'), 'value' => st('The translations directory is writable.'), ); } @@ -2051,7 +2051,7 @@ function install_check_translations($install_state) { // error. if (!$translation_available) { $requirements['translation available'] = array( - 'title' => st('Translation'), + 'title' => st('Translation'), 'value' => st('The %language translation is not available.', array('%language' => $language)), 'severity' => REQUIREMENT_ERROR, 'description' => st('The %language translation file is not available at the translation server. Choose a different language or select English and translate your website later.', array('%language' => $language, '!url' => check_url($_SERVER['SCRIPT_NAME']))), @@ -2059,7 +2059,7 @@ function install_check_translations($install_state) { } else { $requirements['translation available'] = array( - 'title' => st('Translation'), + 'title' => st('Translation'), 'value' => st('The %language translation is available.', array('%language' => $language)), ); } @@ -2070,7 +2070,7 @@ function install_check_translations($install_state) { if (!$translation_downloaded) { $requirements['translation downloaded'] = array( - 'title' => st('Translation'), + 'title' => st('Translation'), 'value' => st('The %language translation could not be downloaded.', array('%language' => $language)), 'severity' => REQUIREMENT_ERROR, 'description' => st('The %language translation file could not be downloaded. Choose a different language or select English and translate your website later.', array('%language' => $language, '!url' => check_url($_SERVER['SCRIPT_NAME']))), diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index de60da8..2c5f667 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -87,77 +87,77 @@ public function rename($name, $new_name) { * Implements Drupal\Core\Config\StorageInterface::listAll(). */ public function listAll($prefix = '') { - $names = array_keys($this->getAllFolders()); - if (!$prefix) { - return $names; - } - else { - $return = array(); - foreach ($names as $index => $name) { - if (strpos($name, $prefix) === 0 ) { - $return[$index] = $names[$index]; - } + $names = array_keys($this->getAllFolders()); + if (!$prefix) { + return $names; + } + else { + $return = array(); + foreach ($names as $index => $name) { + if (strpos($name, $prefix) === 0 ) { + $return[$index] = $names[$index]; } - return $return; } + return $return; } + } - /** - * Returns a map of all config object names and their folders. - * - * @return array - * An array mapping config object names with directories. - */ - protected function getAllFolders() { - if (!isset($this->folders)) { - $this->folders = $this->getComponentNames('profile', array(drupal_get_profile())); - $this->folders += $this->getComponentNames('module', array_keys(drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules', 'name', 0))); - $this->folders += $this->getComponentNames('theme', array_keys(drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info$/', 'themes'))); - } - return $this->folders; + /** + * Returns a map of all config object names and their folders. + * + * @return array + * An array mapping config object names with directories. + */ + protected function getAllFolders() { + if (!isset($this->folders)) { + $this->folders = $this->getComponentNames('profile', array(drupal_get_profile())); + $this->folders += $this->getComponentNames('module', array_keys(drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules', 'name', 0))); + $this->folders += $this->getComponentNames('theme', array_keys(drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info$/', 'themes'))); } + return $this->folders; + } - /** - * Get all configuration names and folders for a list of modules or themes. - * - * @param string $type - * Type of components: 'module' | 'theme' | 'profile' - * @param array $list - * Array of theme or module names. - * - * @return array - * Folders indexed by configuration name. - */ - public function getComponentNames($type, array $list) { - $extension = '.' . $this->getFileExtension(); - $folders = array(); - foreach ($list as $name) { - $directory = $this->getComponentFolder($type, $name); - if (file_exists($directory)) { - $files = glob($directory . '/*' . $extension); - foreach ($files as $filename) { - $name = basename($filename, $extension); - $folders[$name] = $directory; - } + /** + * Get all configuration names and folders for a list of modules or themes. + * + * @param string $type + * Type of components: 'module' | 'theme' | 'profile' + * @param array $list + * Array of theme or module names. + * + * @return array + * Folders indexed by configuration name. + */ + public function getComponentNames($type, array $list) { + $extension = '.' . $this->getFileExtension(); + $folders = array(); + foreach ($list as $name) { + $directory = $this->getComponentFolder($type, $name); + if (file_exists($directory)) { + $files = glob($directory . '/*' . $extension); + foreach ($files as $filename) { + $name = basename($filename, $extension); + $folders[$name] = $directory; } } - return $folders; } + return $folders; + } - /** - * Get folder inside each component that contains the files. - * - * @param string $type - * Component type: 'module' | 'theme' | 'profile' - * @param string $name - * Component name. - * - * @return string - * The configuration folder name for this component. - */ - protected function getComponentFolder($type, $name) { - return drupal_get_path($type, $name) . '/config'; - } + /** + * Get folder inside each component that contains the files. + * + * @param string $type + * Component type: 'module' | 'theme' | 'profile' + * @param string $name + * Component name. + * + * @return string + * The configuration folder name for this component. + */ + protected function getComponentFolder($type, $name) { + return drupal_get_path($type, $name) . '/config'; + } /** * Overrides Drupal\Core\Config\FileStorage::deleteAll(). diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 5690736..b265025 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -87,7 +87,7 @@ function locale_translate_import_form($form, &$form_state) { '#type' => 'checkbox', '#states' => array( 'checked' => array( - ':input[name="customized"]' => array('checked' => TRUE), + ':input[name="customized"]' => array('checked' => TRUE), ), ), ); @@ -185,7 +185,7 @@ function locale_translate_export_form($form, &$form_state) { '#tree' => TRUE, '#states' => array( 'invisible' => array( - ':input[name="langcode"]' => array('value' => LANGUAGE_SYSTEM), + ':input[name="langcode"]' => array('value' => LANGUAGE_SYSTEM), ), ), ); @@ -614,13 +614,13 @@ function locale_translate_batch_finished($success, $results) { if ($success) { $additions = $updates = $deletes = $skips = $config = 0; if (isset($results['failed_files'])) { - if (module_exists('dblog')) { - $message = format_plural(count($results['failed_files']), 'One translation file could not be imported. See the log for details.', '@count translation files could not be imported. See the log for details.', array('@url' => url('admin/reports/dblog'))); - } - else { - $message = format_plural(count($results['failed_files']), 'One translation files could not be imported. See the log for details.', '@count translation files could not be imported. See the log for details.'); - } - drupal_set_message($message, 'error'); + if (module_exists('dblog')) { + $message = format_plural(count($results['failed_files']), 'One translation file could not be imported. See the log for details.', '@count translation files could not be imported. See the log for details.', array('@url' => url('admin/reports/dblog'))); + } + else { + $message = format_plural(count($results['failed_files']), 'One translation files could not be imported. See the log for details.', '@count translation files could not be imported. See the log for details.'); + } + drupal_set_message($message, 'error'); } if (isset($results['files'])) { $skipped_files = array(); @@ -802,11 +802,11 @@ function locale_config_batch_build(array $names, array $langcodes, $options = ar $operations[] = array('locale_config_batch_refresh_name', array($name, $langcodes)); } $batch = array( - 'operations' => $operations, - 'title' => $t('Updating configuration translations'), - 'init_message' => $t('Starting configuration update'), - 'error_message' => $t('Error updating configuration translations'), - 'file' => drupal_get_path('module', 'locale') . '/locale.bulk.inc', + 'operations' => $operations, + 'title' => $t('Updating configuration translations'), + 'init_message' => $t('Starting configuration update'), + 'error_message' => $t('Error updating configuration translations'), + 'file' => drupal_get_path('module', 'locale') . '/locale.bulk.inc', ); if (!empty($options['finish_feedback'])) { $batch['completed'] = 'locale_config_batch_finished'; diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 9fd46d0..2bfe55c 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -1338,8 +1338,8 @@ function _locale_rebuild_js($langcode = NULL) { return TRUE; case 'rebuilt': watchdog('locale', 'JavaScript translation file %file.js was lost.', array('%file' => $locale_javascripts[$language->langcode]), WATCHDOG_WARNING); - // Proceed to the 'created' case as the JavaScript translation file has - // been created again. + // Proceed to the 'created' case as the JavaScript translation file has + // been created again. case 'created': watchdog('locale', 'Created JavaScript translation file for the language %language.', array('%language' => $language->name)); return TRUE;