diff options
author | Joas Schilling <coding@schilljs.com> | 2024-10-23 09:39:57 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-10-23 11:43:37 +0000 |
commit | 99eb553a33224d1e500292499ec78c51fe3e7a3b (patch) | |
tree | 57d195baf47398c892604d7dacd1417bf72448e2 | |
parent | 18397178db5da2edc8f8da52ddc2f3a66eb75615 (diff) | |
download | nextcloud-server-backport/48839/stable30.tar.gz nextcloud-server-backport/48839/stable30.zip |
build: Show the actual stringbackport/48839/stable30
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | build/translation-checker.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/build/translation-checker.php b/build/translation-checker.php index 6f131336ef3..6676a49caa8 100644 --- a/build/translation-checker.php +++ b/build/translation-checker.php @@ -77,8 +77,8 @@ foreach ($directories as $dir) { $content = file_get_contents($file->getPathname()); $language = pathinfo($file->getFilename(), PATHINFO_FILENAME); - if (!in_array($language, $rtlLanguages, true) && preg_match('/[' . implode('', $rtlCharacters) . ']/u', $content, $matches)) { - $errors[] = $file->getPathname() . "\n" . ' ' . 'Contains a RTL limited characters in the translations. Offending Unicode codepoints: ' . implode(', ', array_map(static fn (string $match) => mb_ord($match), $matches)) . "\n"; + if (!in_array($language, $rtlLanguages, true) && preg_match_all('/^(.+[' . implode('', $rtlCharacters) . '].+)$/mu', $content, $matches)) { + $errors[] = $file->getPathname() . "\n" . ' ' . 'Contains a RTL limited characters in the translations. Offending strings:' . "\n" . implode("\n", $matches[0]) . "\n"; } $json = json_decode($content, true); |