translation: Always use the correct path to the Icinga library in the translation helper

refs #9615
This commit is contained in:
Eric Lippmann 2015-07-31 11:30:26 +02:00
parent cc0dfedb31
commit 834017f6e5
1 changed files with 9 additions and 1 deletions

View File

@ -79,6 +79,13 @@ class GettextTranslationHelper
*/
private $moduleDir;
/**
* Path to the Icinga library
*
* @var string
*/
protected $libDir;
/**
* The path to the file catalog
*
@ -110,6 +117,7 @@ class GettextTranslationHelper
{
$this->moduleMgr = $bootstrap->getModuleManager()->loadEnabledModules();
$this->appDir = $bootstrap->getApplicationDir();
$this->libDir = $bootstrap->getLibraryDir('Icinga');
$this->locale = $locale;
}
@ -396,7 +404,7 @@ class GettextTranslationHelper
$this->getSourceFileNames($this->moduleDir, $catalog);
} else {
$this->getSourceFileNames($this->appDir, $catalog);
$this->getSourceFileNames(realpath($this->appDir . '/../library/Icinga'), $catalog);
$this->getSourceFileNames($this->libDir, $catalog);
}
} catch (Exception $error) {
throw $error;