protected function setJsTranslation(array $scripts)
    {
        if (!empty($this->langcode) && !is_file($this->translation->getContextJsFile())) {
            foreach ($scripts as $key => $script) {
                if (strpos($key, 'system/modules/') === 0
                    && strpos($key, '/vendor/') === false
                    && !empty($script['file'])) {
                    $string = file_get_contents($script['file']);
                    $this->translation->createJsTranslation($string);
                }
            }
        }
    }