Skip to content

Commit

Permalink
translation: Always use the correct path to the Icinga library in the…
Browse files Browse the repository at this point in the history
… translation helper

refs #9615
  • Loading branch information
lippserd committed Jul 31, 2015
1 parent cc0dfed commit 834017f
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -79,6 +79,13 @@ class GettextTranslationHelper
*/
private $moduleDir;

/**
* Path to the Icinga library
*
* @var string
*/
protected $libDir;

/**
* The path to the file catalog
*
Expand Down Expand Up @@ -110,6 +117,7 @@ public function __construct(ApplicationBootstrap $bootstrap, $locale)
{
$this->moduleMgr = $bootstrap->getModuleManager()->loadEnabledModules();
$this->appDir = $bootstrap->getApplicationDir();
$this->libDir = $bootstrap->getLibraryDir('Icinga');
$this->locale = $locale;
}

Expand Down Expand Up @@ -396,7 +404,7 @@ private function createFileCatalog()
$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;
Expand Down

0 comments on commit 834017f

Please sign in to comment.