diff --git a/buildfiles/generate-locales.php b/buildfiles/generate-locales.php index 9bbb3073..5711feef 100644 --- a/buildfiles/generate-locales.php +++ b/buildfiles/generate-locales.php @@ -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()); -} \ No newline at end of file +}