GettextTranslationHelper: Don't create backup files and cleanup temporary files
fixes #2683
This commit is contained in:
parent
59cadde485
commit
2f8d4739b8
|
@ -121,6 +121,20 @@ class GettextTranslationHelper
|
|||
$this->locale = $locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup temporary files
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
if ($this->catalogPath !== null && file_exists($this->catalogPath)) {
|
||||
unlink($this->catalogPath);
|
||||
}
|
||||
|
||||
if ($this->templatePath !== null && file_exists($this->templatePath)) {
|
||||
unlink($this->templatePath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the config
|
||||
*
|
||||
|
@ -251,7 +265,7 @@ class GettextTranslationHelper
|
|||
{
|
||||
if (is_file($this->tablePath)) {
|
||||
shell_exec(sprintf(
|
||||
'%s --update %s %s 2>&1',
|
||||
'%s --update --backup=none %s %s 2>&1',
|
||||
$this->getConfig()->get('translation', 'msgmerge', '/usr/bin/env msgmerge'),
|
||||
$this->tablePath,
|
||||
$this->templatePath
|
||||
|
|
Loading…
Reference in New Issue