diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2024-10-23 14:57:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-23 14:57:56 +0200 |
commit | 7639d721f2eb29453c830dcb7bb39b261730c54b (patch) | |
tree | bb0ae9aace3f14de2f6bb6eb3933ae3c86dfc34e | |
parent | 067617d82353aed224e51bea0d0c1681e165de85 (diff) | |
parent | ff2f346579e21c4f409d82b889bed8189355e9f3 (diff) | |
download | nextcloud-server-7639d721f2eb29453c830dcb7bb39b261730c54b.tar.gz nextcloud-server-7639d721f2eb29453c830dcb7bb39b261730c54b.zip |
Merge pull request #48857 from nextcloud/backport/48839/stable29
[stable29] build: Print RTL limited characters in translation-checker
-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 b6d947ecbf0..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)) { - $errors[] = $file->getPathname() . "\n" . ' ' . 'Contains a RTL limited character in the translations.' . "\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); |