Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -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/<lang>/webhook_listeners.po
source_file = translationfiles/templates/webhook_listeners.pot
source_lang = en
type = PO

[o:nextcloud:p:nextcloud:r:workflowengine]
file_filter = translationfiles/<lang>/workflowengine.po
source_file = translationfiles/templates/workflowengine.pot
Expand Down
21 changes: 17 additions & 4 deletions build/translation-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
1 change: 1 addition & 0 deletions core/shipped.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"user_status",
"viewer",
"weather_status",
"webhook_listeners",
"workflowengine"
],
"defaultEnabled": [
Expand Down