Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
@ -104,22 +104,22 @@ function locale_translation_batch_status_finished($success, $results) {
|
|||
else {
|
||||
$message = \Drupal::translation()->formatPlural(count($results['failed_files']), 'One translation files could not be checked. See the log for details.', '@count translation files could not be checked. See the log for details.');
|
||||
}
|
||||
drupal_set_message($message, 'error');
|
||||
\Drupal::messenger()->addError($message);
|
||||
}
|
||||
if (isset($results['files'])) {
|
||||
drupal_set_message(\Drupal::translation()->formatPlural(
|
||||
\Drupal::messenger()->addStatus(\Drupal::translation()->formatPlural(
|
||||
count($results['files']),
|
||||
'Checked available interface translation updates for one project.',
|
||||
'Checked available interface translation updates for @count projects.'
|
||||
));
|
||||
}
|
||||
if (!isset($results['failed_files']) && !isset($results['files'])) {
|
||||
drupal_set_message(t('Nothing to check.'));
|
||||
\Drupal::messenger()->addStatus(t('Nothing to check.'));
|
||||
}
|
||||
\Drupal::state()->set('locale.translation_last_checked', REQUEST_TIME);
|
||||
}
|
||||
else {
|
||||
drupal_set_message(t('An error occurred trying to check available interface translation updates.'), 'error');
|
||||
\Drupal::messenger()->addError(t('An error occurred trying to check available interface translation updates.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,11 +238,13 @@ function locale_translation_http_check($uri) {
|
|||
$logger = \Drupal::logger('locale');
|
||||
try {
|
||||
$actual_uri = NULL;
|
||||
$response = \Drupal::service('http_client_factory')->fromOptions(['allow_redirects' => [
|
||||
'on_redirect' => function(RequestInterface $request, ResponseInterface $response, UriInterface $request_uri) use (&$actual_uri) {
|
||||
$actual_uri = (string) $request_uri;
|
||||
}
|
||||
]])->head($uri);
|
||||
$response = \Drupal::service('http_client_factory')->fromOptions([
|
||||
'allow_redirects' => [
|
||||
'on_redirect' => function (RequestInterface $request, ResponseInterface $response, UriInterface $request_uri) use (&$actual_uri) {
|
||||
$actual_uri = (string) $request_uri;
|
||||
},
|
||||
],
|
||||
])->head($uri);
|
||||
$result = [];
|
||||
|
||||
// Return the effective URL if it differs from the requested.
|
||||
|
@ -290,7 +292,7 @@ function locale_translation_http_check($uri) {
|
|||
* File object if download was successful. FALSE on failure.
|
||||
*/
|
||||
function locale_translation_download_source($source_file, $directory = 'temporary://') {
|
||||
if ($uri = system_retrieve_file($source_file->uri, $directory)) {
|
||||
if ($uri = system_retrieve_file($source_file->uri, $directory, FALSE, FILE_EXISTS_REPLACE)) {
|
||||
$file = clone($source_file);
|
||||
$file->type = LOCALE_TRANSLATION_LOCAL;
|
||||
$file->uri = $uri;
|
||||
|
|
Reference in a new issue