protected function _parseFile(SplFileInfo $file)
{
- $e = explode('.', $file);
- $ext = $file->getExtension();
-
- if (!in_array($ext, $this->_extensions)) {
+ if (!in_array($file->getExtension(), $this->_extensions)) {
return;
}
-
$this->_toTranslate = array_merge($this->_toTranslate, self::extractTextsToTranslate($file));
}
return count($this->_toTranslate) > 0;
}
-
/**
*
* @return array
public static function saveTranslations($data, $path)
{
- $phpCode = '<?php return ' . var_export($data, true) . ';';
- file_put_contents($path, $phpCode);
+ file_put_contents($path, '<?php return ' . var_export($data, true) . ';');
}
}