From b4deb67ea78a56c966b9258020b807777fdaba35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 20 Aug 2024 16:40:16 +0200 Subject: [PATCH 1/2] chore: Add webhook_listeners to list of shipped apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As well as CODEOWNERS and l10n Signed-off-by: Côme Chilliet --- .github/CODEOWNERS | 1 + .tx/config | 6 ++++++ core/shipped.json | 1 + 3 files changed, 8 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f1983388e2fda..e448bf922ced7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -26,6 +26,7 @@ /apps/user_ldap/appinfo/info.xml @come-nc @blizzz /apps/user_status/appinfo/info.xml @Antreesy @nickvergessen /apps/weather_status/appinfo/info.xml @julien-nc @juliushaertl +/apps/webhook_listeners/appinfo/info.xml @come-nc @julien-nc /apps/workflowengine/appinfo/info.xml @blizzz @juliushaertl # Frontend expertise diff --git a/.tx/config b/.tx/config index ce9e61368232e..6b53e28877bfc 100644 --- a/.tx/config +++ b/.tx/config @@ -176,6 +176,12 @@ source_file = translationfiles/templates/weather_status.pot source_lang = en type = PO +[o:nextcloud:p:nextcloud:r:webhook_listeners] +file_filter = translationfiles//webhook_listeners.po +source_file = translationfiles/templates/webhook_listeners.pot +source_lang = en +type = PO + [o:nextcloud:p:nextcloud:r:workflowengine] file_filter = translationfiles//workflowengine.po source_file = translationfiles/templates/workflowengine.pot diff --git a/core/shipped.json b/core/shipped.json index d56cbf6f71000..36a3ec50a258a 100644 --- a/core/shipped.json +++ b/core/shipped.json @@ -49,6 +49,7 @@ "user_status", "viewer", "weather_status", + "webhook_listeners", "workflowengine" ], "defaultEnabled": [ From 08eb488e69d0729f740a86c3249635ed50256804 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 20 Aug 2024 16:45:12 +0200 Subject: [PATCH 2/2] fix(CI): Add a check that all server apps are translated Signed-off-by: Joas Schilling --- build/translation-checker.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/build/translation-checker.php b/build/translation-checker.php index ea2fd85ee242f..399031c12ae45 100644 --- a/build/translation-checker.php +++ b/build/translation-checker.php @@ -10,17 +10,30 @@ $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 @@ } 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);