diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2024-08-20 22:52:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-20 22:52:52 +0200 |
commit | e817bc6d3cde6762e48f1bc83efbaa8fdceb022c (patch) | |
tree | 62fd69ecf30590cf6af348dbdd0fc01278a2b201 /build | |
parent | 4f70998e351832d1b5c49eca1af757becbfad95d (diff) | |
parent | cd0217b2bd29538af2076c8eb873d258e51b982e (diff) | |
download | nextcloud-server-e817bc6d3cde6762e48f1bc83efbaa8fdceb022c.tar.gz nextcloud-server-e817bc6d3cde6762e48f1bc83efbaa8fdceb022c.zip |
Merge pull request #47356 from nextcloud/fix/add-webhook_listeners-to-shipped-apps-lists
chore: Add webhook_listeners to list of shipped apps
Diffstat (limited to 'build')
-rw-r--r-- | build/translation-checker.php | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/build/translation-checker.php b/build/translation-checker.php index ea2fd85ee24..399031c12ae 100644 --- a/build/translation-checker.php +++ b/build/translation-checker.php @@ -10,17 +10,30 @@ $directories = [ $isDebug = in_array('--debug', $argv, true) || in_array('-d', $argv, true); +$txConfig = file_get_contents(__DIR__ . '/../.tx/config'); + +$untranslatedApps = [ + 'testing', +]; + +$valid = 0; +$errors = []; $apps = new \DirectoryIterator(__DIR__ . '/../apps'); foreach ($apps as $app) { + if ($app->isDot() || in_array($app->getBasename(), $untranslatedApps, true)) { + continue; + } + if (!file_exists($app->getPathname() . '/l10n')) { + if (!str_contains($txConfig, '[o:nextcloud:p:nextcloud:r:' . $app->getBasename() . ']')) { + $errors[] = $app->getBasename() . "\n" . ' App is not translation synced via transifex and also not marked as untranslated' . "\n"; + } continue; } $directories[] = $app->getPathname() . '/l10n'; } -$errors = []; -$valid = 0; foreach ($directories as $dir) { if (!file_exists($dir)) { continue; @@ -59,10 +72,10 @@ foreach ($directories as $dir) { } if (count($errors) > 0) { - echo sprintf('ERROR: There were %d errors:', count($errors)) . "\n\n"; + echo "\033[0;31m" . sprintf('ERROR: There were %d errors:', count($errors)) . "\033[0m\n\n"; echo implode("\n", $errors); exit(1); } -echo 'OK: ' . $valid . ' files parse' . "\n"; +echo "\033[0;32m" . 'OK: ' . $valid . ' files parse' . "\033[0m\n"; exit(0); |