We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 74cd6e2 + 61e3fa0 commit 2055516Copy full SHA for 2055516
1 file changed
build/translation-checker.php
@@ -76,8 +76,8 @@
76
$content = file_get_contents($file->getPathname());
77
78
$language = pathinfo($file->getFilename(), PATHINFO_FILENAME);
79
- if (!in_array($language, $rtlLanguages, true) && preg_match('/[' . implode('', $rtlCharacters) . ']/u', $content)) {
80
- $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";
81
}
82
83
$json = json_decode($content, true);
0 commit comments