diff options
author | provokateurin <kate@provokateurin.de> | 2024-10-22 13:03:06 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-10-22 13:03:06 +0200 |
commit | f660e4c09fd99805997ce37b265375dd702c9348 (patch) | |
tree | c83bffb8e6a2c2ff3416a3796a65596f0b3b30bf /build | |
parent | 070adc1131fcd5476e4a93ebf28be6f409c5a992 (diff) | |
download | nextcloud-server-f660e4c09fd99805997ce37b265375dd702c9348.tar.gz nextcloud-server-f660e4c09fd99805997ce37b265375dd702c9348.zip |
build: Print RTL limited characters in translation-checker
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'build')
-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 9422f7e5dcb..86646ac47ca 100644 --- a/build/translation-checker.php +++ b/build/translation-checker.php @@ -76,8 +76,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('/[' . 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"; } $json = json_decode($content, true); |