Update core 8.3.0
This commit is contained in:
parent
da7a7918f8
commit
cd7a898e66
6144 changed files with 132297 additions and 87747 deletions
|
@ -26,7 +26,7 @@ require_once __DIR__ . '/locale.translation.inc';
|
|||
* @return array
|
||||
* Batch definition array.
|
||||
*/
|
||||
function locale_translation_batch_update_build($projects = array(), $langcodes = array(), $options = array()) {
|
||||
function locale_translation_batch_update_build($projects = [], $langcodes = [], $options = []) {
|
||||
module_load_include('compare.inc', 'locale');
|
||||
$projects = $projects ? $projects : array_keys(locale_translation_get_projects());
|
||||
$langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list());
|
||||
|
@ -38,14 +38,14 @@ function locale_translation_batch_update_build($projects = array(), $langcodes =
|
|||
// Download and import translations.
|
||||
$operations = array_merge($operations, _locale_translation_fetch_operations($projects, $langcodes, $options));
|
||||
|
||||
$batch = array(
|
||||
$batch = [
|
||||
'operations' => $operations,
|
||||
'title' => t('Updating translations'),
|
||||
'progress_message' => '',
|
||||
'error_message' => t('Error importing translation files'),
|
||||
'finished' => 'locale_translation_batch_fetch_finished',
|
||||
'file' => drupal_get_path('module', 'locale') . '/locale.batch.inc',
|
||||
);
|
||||
];
|
||||
return $batch;
|
||||
}
|
||||
|
||||
|
@ -63,18 +63,18 @@ function locale_translation_batch_update_build($projects = array(), $langcodes =
|
|||
* @return array
|
||||
* Batch definition array.
|
||||
*/
|
||||
function locale_translation_batch_fetch_build($projects = array(), $langcodes = array(), $options = array()) {
|
||||
function locale_translation_batch_fetch_build($projects = [], $langcodes = [], $options = []) {
|
||||
$projects = $projects ? $projects : array_keys(locale_translation_get_projects());
|
||||
$langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list());
|
||||
|
||||
$batch = array(
|
||||
$batch = [
|
||||
'operations' => _locale_translation_fetch_operations($projects, $langcodes, $options),
|
||||
'title' => t('Updating translations.'),
|
||||
'progress_message' => '',
|
||||
'error_message' => t('Error importing translation files'),
|
||||
'finished' => 'locale_translation_batch_fetch_finished',
|
||||
'file' => drupal_get_path('module', 'locale') . '/locale.batch.inc',
|
||||
);
|
||||
];
|
||||
return $batch;
|
||||
}
|
||||
|
||||
|
@ -93,14 +93,14 @@ function locale_translation_batch_fetch_build($projects = array(), $langcodes =
|
|||
* Array of batch operations.
|
||||
*/
|
||||
function _locale_translation_fetch_operations($projects, $langcodes, $options) {
|
||||
$operations = array();
|
||||
$operations = [];
|
||||
|
||||
foreach ($projects as $project) {
|
||||
foreach ($langcodes as $langcode) {
|
||||
if (locale_translation_use_remote_source()) {
|
||||
$operations[] = array('locale_translation_batch_fetch_download', array($project, $langcode));
|
||||
$operations[] = ['locale_translation_batch_fetch_download', [$project, $langcode]];
|
||||
}
|
||||
$operations[] = array('locale_translation_batch_fetch_import', array($project, $langcode, $options));
|
||||
$operations[] = ['locale_translation_batch_fetch_import', [$project, $langcode, $options]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue