From 11eaf68adf9a734fe1498e6348850b486f666900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 7 Oct 2022 07:55:40 +0000 Subject: [PATCH] Fix bug in json type locales check --- app/tasks/locales.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/tasks/locales.php b/app/tasks/locales.php index d93136b403..dcb1538c75 100644 --- a/app/tasks/locales.php +++ b/app/tasks/locales.php @@ -45,11 +45,7 @@ $cli Console::log('"' . $key . '" missing in "' . $language . '".'); } } else if ($type === 'json') { - if(!(\array_key_exists($language, $results))) { - $results[$language] = []; - } - - $results[$language] = $key; + $results[$language] = $missing; } } } @@ -57,6 +53,7 @@ $cli $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') { + \var_dump($results); Console::log(\json_encode($results)); }