mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 12:26:15 +02:00
fix grocy locale generation if no data/config.php is present
This commit is contained in:
parent
a41584258a
commit
151722ea38
|
|
@ -9,7 +9,9 @@ define("GROCY_DATAPATH", __DIR__ . '/../data');
|
|||
// Load composer dependencies
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
// Load config files
|
||||
require_once GROCY_DATAPATH . '/config.php';
|
||||
if(file_exists(GROCY_DATAPATH . '/config.php')) {
|
||||
require_once GROCY_DATAPATH . '/config.php';
|
||||
}
|
||||
require_once __DIR__ . '/../config-dist.php'; // For not in own config defined values we use the default ones
|
||||
|
||||
echo "Searching for localizations in " . __DIR__ . '/../localization/* \n';
|
||||
|
|
@ -27,4 +29,4 @@ foreach($translations as $lang) {
|
|||
$ls = LocalizationService::getInstance($culture, true);
|
||||
$ls->LoadLocalizations(false);
|
||||
file_put_contents(__DIR__ .'/../public/js/locales/grocy/'.$culture.'.json', $ls->GetPoAsJsonString());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user