diff options
author | Joas Schilling <coding@schilljs.com> | 2017-04-25 14:35:51 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-04-25 14:35:51 +0200 |
commit | 7ea492b69a24435c4aa62567cf31a0a246afc517 (patch) | |
tree | 2ae3aad1f1101aa009d152d4c1487f09686f73c2 /build | |
parent | 5be1010d454f258f2a1529f3827c1add248866cf (diff) | |
download | nextcloud-server-7ea492b69a24435c4aa62567cf31a0a246afc517.tar.gz nextcloud-server-7ea492b69a24435c4aa62567cf31a0a246afc517.zip |
Loop over the apps directory and add the task
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'build')
-rw-r--r-- | build/translation-checker.php | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/build/translation-checker.php b/build/translation-checker.php index 296a20243da..5532fb9f65b 100644 --- a/build/translation-checker.php +++ b/build/translation-checker.php @@ -22,29 +22,17 @@ $directories = [ __DIR__ . '/../core/l10n', __DIR__ . '/../settings/l10n', - __DIR__ . '/../apps/admin_audit/l10n', - __DIR__ . '/../apps/comments/l10n', - __DIR__ . '/../apps/dav/l10n', - __DIR__ . '/../apps/encryption/l10n', - __DIR__ . '/../apps/federatedfilesharing/l10n', - __DIR__ . '/../apps/federation/l10n', - __DIR__ . '/../apps/files/l10n', - __DIR__ . '/../apps/files_external/l10n', - __DIR__ . '/../apps/files_sharing/l10n', - __DIR__ . '/../apps/files_trashbin/l10n', - __DIR__ . '/../apps/files_versions/l10n', - __DIR__ . '/../apps/lookup_server_connector/l10n', - __DIR__ . '/../apps/provisioning_api/l10n', - __DIR__ . '/../apps/sharebymail/l10n', - __DIR__ . '/../apps/systemtags/l10n', - __DIR__ . '/../apps/testing/l10n', - __DIR__ . '/../apps/theming/l10n', - __DIR__ . '/../apps/twofactor_backupcodes/l10n', - __DIR__ . '/../apps/updatenotification/l10n', - __DIR__ . '/../apps/user_ldap/l10n', - __DIR__ . '/../apps/workflowengine/l10n', ]; +$apps = new \DirectoryIterator(__DIR__ . '/../apps'); +foreach ($apps as $app) { + if (!file_exists($app->getPathname() . '/l10n')) { + continue; + } + + $directories[] = $app->getPathname() . '/l10n'; +} + $errors = []; foreach ($directories as $dir) { if (!file_exists($dir)) { @@ -73,9 +61,9 @@ foreach ($directories as $dir) { echo "\n\n"; if (count($errors) > 0) { echo sprintf('ERROR: There were %d errors:', count($errors)) . "\n"; - echo implode("\n", $errors); + echo implode("\n", $errors) . "\n"; exit(1); } -echo 'OK: all files parse'; +echo 'OK: all files parse' . "\n"; exit(0); |