Chris@0: moduleHandler()->loadInclude('locale', 'inc', 'locale.compare'); Chris@0: Chris@0: // Check translation status of all translatable project in all languages. Chris@0: // First we clear the cached list of projects. Although not strictly Chris@0: // necessary, this is helpful in case the project list is out of sync. Chris@0: locale_translation_flush_projects(); Chris@0: locale_translation_check_projects(); Chris@0: Chris@0: // Execute a batch if required. A batch is only used when remote files Chris@0: // are checked. Chris@0: if (batch_get()) { Chris@0: return batch_process('admin/reports/translations'); Chris@0: } Chris@0: Chris@0: return $this->redirect('locale.translate_status'); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Shows the string search screen. Chris@0: * Chris@0: * @return array Chris@0: * The render array for the string search screen. Chris@0: */ Chris@0: public function translatePage() { Chris@0: return [ Chris@0: 'filter' => $this->formBuilder()->getForm('Drupal\locale\Form\TranslateFilterForm'), Chris@0: 'form' => $this->formBuilder()->getForm('Drupal\locale\Form\TranslateEditForm'), Chris@0: ]; Chris@0: } Chris@0: Chris@0: }