mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +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;
|
private $moduleDir;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Path to the Icinga library
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $libDir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The path to the file catalog
|
* The path to the file catalog
|
||||||
*
|
*
|
||||||
@ -110,6 +117,7 @@ class GettextTranslationHelper
|
|||||||
{
|
{
|
||||||
$this->moduleMgr = $bootstrap->getModuleManager()->loadEnabledModules();
|
$this->moduleMgr = $bootstrap->getModuleManager()->loadEnabledModules();
|
||||||
$this->appDir = $bootstrap->getApplicationDir();
|
$this->appDir = $bootstrap->getApplicationDir();
|
||||||
|
$this->libDir = $bootstrap->getLibraryDir('Icinga');
|
||||||
$this->locale = $locale;
|
$this->locale = $locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -396,7 +404,7 @@ class GettextTranslationHelper
|
|||||||
$this->getSourceFileNames($this->moduleDir, $catalog);
|
$this->getSourceFileNames($this->moduleDir, $catalog);
|
||||||
} else {
|
} else {
|
||||||
$this->getSourceFileNames($this->appDir, $catalog);
|
$this->getSourceFileNames($this->appDir, $catalog);
|
||||||
$this->getSourceFileNames(realpath($this->appDir . '/../library/Icinga'), $catalog);
|
$this->getSourceFileNames($this->libDir, $catalog);
|
||||||
}
|
}
|
||||||
} catch (Exception $error) {
|
} catch (Exception $error) {
|
||||||
throw $error;
|
throw $error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user