aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.drone.yml1
-rw-r--r--build/translation-checker.php34
2 files changed, 12 insertions, 23 deletions
diff --git a/.drone.yml b/.drone.yml
index 6dccfa6d4d8..69893719778 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -543,6 +543,7 @@ pipeline:
matrix:
include:
- TESTS: signed-off-check
+ - TESTS: translation-check
- TESTS: htaccess-checker
- TESTS: nodb-codecov
- TESTS: db-codecov
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);