diff options
author | provokateurin <kate@provokateurin.de> | 2024-10-22 13:03:06 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-10-23 11:44:48 +0000 |
commit | 21eb62c1556cabf7bebcb25defc9f2da8a8e5094 (patch) | |
tree | a4ea3c9d615476a722258a9146dc7ceab9b1b4d1 | |
parent | 067617d82353aed224e51bea0d0c1681e165de85 (diff) | |
download | nextcloud-server-21eb62c1556cabf7bebcb25defc9f2da8a8e5094.tar.gz nextcloud-server-21eb62c1556cabf7bebcb25defc9f2da8a8e5094.zip |
build: Print RTL limited characters in translation-checker
Signed-off-by: provokateurin <kate@provokateurin.de>
-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..6f131336ef3 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('/[' . 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); |