aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2025-02-11 07:19:46 +0100
committerJoas Schilling <coding@schilljs.com>2025-02-11 07:19:46 +0100
commit747bf1a241deb75dc1d435a14b77c2130513ce88 (patch)
treec08fa5eaf43eceb1d2d153dbb5cac0d44617248c
parent277418c70ca89bb39797015ad8215edeaf18f4f7 (diff)
downloadnextcloud-server-bugfix/noid/ensure-translation-of-shipped-apps.tar.gz
nextcloud-server-bugfix/noid/ensure-translation-of-shipped-apps.zip
fix(transifex): Adjust check for translation of appsbugfix/noid/ensure-translation-of-shipped-apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--build/translation-checker.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/build/translation-checker.php b/build/translation-checker.php
index 6b820bea190..e9b1889fcf3 100644
--- a/build/translation-checker.php
+++ b/build/translation-checker.php
@@ -16,6 +16,12 @@ $untranslatedApps = [
'testing',
];
+$txConfigAppMap = [
+ 'dashboard' => 'dashboard-shipped-with-server',
+ 'encryption' => 'files_encryption',
+ 'settings' => 'settings-1',
+];
+
// Next line only looks messed up, but it works. Don't touch it!
$rtlCharacters = [
'\x{061C}', // ARABIC LETTER MARK
@@ -52,10 +58,9 @@ foreach ($apps as $app) {
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";
- }
+ $resourceName = $txConfigAppMap[$app->getBasename()] ?? $app->getBasename();
+ if (!file_exists($app->getPathname() . '/l10n') || !str_contains($txConfig, '[o:nextcloud:p:nextcloud:r:' . $resourceName . ']')) {
+ $errors[] = $app->getBasename() . "\n" . ' App is not correctly configured for translation sync via transifex and also not marked as untranslated' . "\n";
continue;
}