diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-15 19:37:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 19:37:51 +0200 |
commit | aed5eb55af64ad08f591adc09cbcd8abfa993ec1 (patch) | |
tree | 7cd32b6acc25bd647b09a1c8f879605a34f957b1 /build | |
parent | cc258ad51afedb6ebabc112d627e2f9bfd0c5763 (diff) | |
parent | 5ffe9fc7dbc8eab5b053830b16ba7aefce42be4a (diff) | |
download | nextcloud-server-aed5eb55af64ad08f591adc09cbcd8abfa993ec1.tar.gz nextcloud-server-aed5eb55af64ad08f591adc09cbcd8abfa993ec1.zip |
Merge pull request #21843 from nextcloud/debt/noid/less-verbose-translation-checker
Make translation-checker.php less verbose
Diffstat (limited to 'build')
-rw-r--r-- | build/translation-checker.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/build/translation-checker.php b/build/translation-checker.php index 5532fb9f65b..1f7ec343af5 100644 --- a/build/translation-checker.php +++ b/build/translation-checker.php @@ -21,7 +21,6 @@ $directories = [ __DIR__ . '/../core/l10n', - __DIR__ . '/../settings/l10n', ]; $apps = new \DirectoryIterator(__DIR__ . '/../apps'); @@ -34,6 +33,7 @@ foreach ($apps as $app) { } $errors = []; +$valid = 0; foreach ($directories as $dir) { if (!file_exists($dir)) { continue; @@ -49,21 +49,18 @@ foreach ($directories as $dir) { $json = json_decode($content, true); if (json_last_error() !== JSON_ERROR_NONE) { - echo '[Error] Could not parse: ' . $file->getPathname() . "\n"; - echo ' ' . json_last_error_msg() . "\n"; $errors[] = $file->getPathname() . "\n" . ' ' . json_last_error_msg() . "\n"; } else { - echo '[OK] ' . $file->getPathname() . "\n"; + $valid++; } } } -echo "\n\n"; if (count($errors) > 0) { - echo sprintf('ERROR: There were %d errors:', count($errors)) . "\n"; - echo implode("\n", $errors) . "\n"; + echo sprintf('ERROR: There were %d errors:', count($errors)) . "\n\n"; + echo implode("\n", $errors); exit(1); } -echo 'OK: all files parse' . "\n"; +echo 'OK: ' . $valid . ' files parse' . "\n"; exit(0); |