mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 02:04:38 +00:00
Fixup: paths for localization file existence checks (#710)
This commit is contained in:
@@ -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"));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user