mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
translation: Always use the correct path to the Icinga library in the translation helper
refs #9615
This commit is contained in:
parent
cc0dfedb31
commit
834017f6e5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user