Commit 18480688 authored by webchick's avatar webchick
Browse files

Issue #2344967 by Gábor Hojtsy: Fixed Localization update does not update...

Issue #2344967 by Gábor Hojtsy: Fixed Localization update does not update configuration translations.
parent f722c3c3
...@@ -277,6 +277,8 @@ public function validateForm(array &$form, FormStateInterface $form_state) { ...@@ -277,6 +277,8 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
*/ */
public function submitForm(array &$form, FormStateInterface $form_state) { public function submitForm(array &$form, FormStateInterface $form_state) {
$this->moduleHandler->loadInclude('locale', 'fetch.inc'); $this->moduleHandler->loadInclude('locale', 'fetch.inc');
$this->moduleHandler->loadInclude('locale', 'bulk.inc');
$langcodes = array_filter($form_state->getValue('langcodes')); $langcodes = array_filter($form_state->getValue('langcodes'));
$projects = array_filter($form_state->getValue('projects_update')); $projects = array_filter($form_state->getValue('projects_update'));
...@@ -294,8 +296,13 @@ public function submitForm(array &$form, FormStateInterface $form_state) { ...@@ -294,8 +296,13 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
batch_set($batch); batch_set($batch);
} }
else { else {
// Set a batch to download and import translations.
$batch = locale_translation_batch_fetch_build($projects, $langcodes, $options); $batch = locale_translation_batch_fetch_build($projects, $langcodes, $options);
batch_set($batch); batch_set($batch);
// Set a batch to update configuration as well.
if ($batch = locale_config_batch_update_components($options, $langcodes)) {
batch_set($batch);
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment