/** * Returns an array of phrases used by JavaScript files in a specific area of magento. * * @param string $area of magento to search, such as 'frontend' or 'adminthml' * @return string[] */ protected function _getJavascriptPhrases($area) { $jsPhrases = []; foreach ($this->_utilityFiles->getJsFilesForArea($area) as $file) { $this->_parser->parse($file); $jsPhrases = array_merge($jsPhrases, $this->_parser->getPhrases()); } return $jsPhrases; }