aboutsummaryrefslogtreecommitdiffstats
path: root/build/translation-checker.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-10-23 09:39:57 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-10-23 11:44:48 +0000
commitff2f346579e21c4f409d82b889bed8189355e9f3 (patch)
treebb0ae9aace3f14de2f6bb6eb3933ae3c86dfc34e /build/translation-checker.php
parent21eb62c1556cabf7bebcb25defc9f2da8a8e5094 (diff)
downloadnextcloud-server-backport/48839/stable29.tar.gz
nextcloud-server-backport/48839/stable29.zip
build: Show the actual stringbackport/48839/stable29
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'build/translation-checker.php')
-rw-r--r--build/translation-checker.php4
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);