mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
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;
|
$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
|
* Get the config
|
||||||
*
|
*
|
||||||
@ -251,7 +265,7 @@ class GettextTranslationHelper
|
|||||||
{
|
{
|
||||||
if (is_file($this->tablePath)) {
|
if (is_file($this->tablePath)) {
|
||||||
shell_exec(sprintf(
|
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->getConfig()->get('translation', 'msgmerge', '/usr/bin/env msgmerge'),
|
||||||
$this->tablePath,
|
$this->tablePath,
|
||||||
$this->templatePath
|
$this->templatePath
|
||||||
|
Loading…
x
Reference in New Issue
Block a user