Browse Source
fix(transifex): Adjust check for translation of apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/50753/head
Joas Schilling
8 months ago
No known key found for this signature in database
GPG Key ID: F72FA5B49FFA96B0
1 changed files with
9 additions and
4 deletions
-
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; |
|
|
|
} |
|
|
|
|
|
|
|