diff --git a/app/tasks/locales.php b/app/tasks/locales.php index dcb1538c75..e4776fc571 100644 --- a/app/tasks/locales.php +++ b/app/tasks/locales.php @@ -18,7 +18,7 @@ $cli $mainLocale = new Locale($mainLanguage); foreach ($mainLocale->getTranslations() as $key => $value) { - if(!empty($value)) { + if (!empty($value)) { $mainTranslations[] = $key; } } @@ -30,31 +30,30 @@ $cli $translations = $locale->getTranslations(); $missing = []; foreach ($mainTranslations as $translation) { - if(empty($translations[$translation])) { + if (empty($translations[$translation])) { $missing[] = $translation; } } - if(\count($missing) <= 0) { + if (\count($missing) <= 0) { $type !== 'json' && Console::success('Locale "' . $language . '" is fully translated.'); } else { $type !== 'json' && Console::error('Locale "' . $language . '" is missing ' . \count($missing) . ' translations.'); - if($type === 'debug') { + if ($type === 'debug') { foreach ($missing as $key) { Console::log('"' . $key . '" missing in "' . $language . '".'); } - } else if ($type === 'json') { + } elseif ($type === 'json') { $results[$language] = $missing; } } } $type !== 'json' && Console::info('To get detailed information about missing translations, run the command with --type=debug parameter. Use --type=json to get JSON formatted results.'); - - if($type === 'json') { + + if ($type === 'json') { \var_dump($results); Console::log(\json_encode($results)); } - });