mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 13:26:14 +02:00
Fixup: paths for localization file existence checks (#710)
This commit is contained in:
parent
a6dd794ce8
commit
4f8ef2859e
|
|
@ -67,27 +67,27 @@ class LocalizationService
|
||||||
$this->PoUserStrings->setDomain('grocy/userstrings');
|
$this->PoUserStrings->setDomain('grocy/userstrings');
|
||||||
|
|
||||||
$this->Po = Translations::fromPoFile(__DIR__ . "/../localization/$culture/strings.po");
|
$this->Po = Translations::fromPoFile(__DIR__ . "/../localization/$culture/strings.po");
|
||||||
if (file_exists("/../localization/$culture/chore_assignment_types.po"))
|
if (file_exists(__DIR__ . "/../localization/$culture/chore_assignment_types.po"))
|
||||||
{
|
{
|
||||||
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/chore_assignment_types.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/chore_assignment_types.po"));
|
||||||
}
|
}
|
||||||
if (file_exists("/../localization/$culture/component_translations.po"))
|
if (file_exists(__DIR__ . "/../localization/$culture/component_translations.po"))
|
||||||
{
|
{
|
||||||
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/component_translations.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/component_translations.po"));
|
||||||
}
|
}
|
||||||
if (file_exists("/../localization/$culture/demo_data.po"))
|
if (file_exists(__DIR__ . "/../localization/$culture/demo_data.po"))
|
||||||
{
|
{
|
||||||
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/demo_data.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/demo_data.po"));
|
||||||
}
|
}
|
||||||
if (file_exists("/../localization/$culture/stock_transaction_types.po"))
|
if (file_exists(__DIR__ . "/../localization/$culture/stock_transaction_types.po"))
|
||||||
{
|
{
|
||||||
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/stock_transaction_types.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/stock_transaction_types.po"));
|
||||||
}
|
}
|
||||||
if (file_exists("/../localization/$culture/chore_period_types.po"))
|
if (file_exists(__DIR__ . "/../localization/$culture/chore_period_types.po"))
|
||||||
{
|
{
|
||||||
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/chore_period_types.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/chore_period_types.po"));
|
||||||
}
|
}
|
||||||
if (file_exists("/../localization/$culture/userfield_types.po"))
|
if (file_exists(__DIR__ . "/../localization/$culture/userfield_types.po"))
|
||||||
{
|
{
|
||||||
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/userfield_types.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/userfield_types.po"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user