Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-03-30 21:19:41 +0300
committerJoas Schilling <coding@schilljs.com>2021-04-20 17:42:04 +0300
commita4c6749b020d5cb4e63a54b0aa9ca5ebe961ee4d (patch)
tree5bd5a342cec2acbac1e09558cdd96c2c921c6391 /build/translation-checker.php
parent157147cb8eaa1800a8473db547c6964a5205e83d (diff)
Add a check for the pipe character
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'build/translation-checker.php')
-rw-r--r--build/translation-checker.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/build/translation-checker.php b/build/translation-checker.php
index 1f7ec343af5..2c3a7856d81 100644
--- a/build/translation-checker.php
+++ b/build/translation-checker.php
@@ -48,6 +48,11 @@ foreach ($directories as $dir) {
$content = file_get_contents($file->getPathname());
$json = json_decode($content, true);
+ $translations = json_encode($json['translations']);
+ if (strpos($content, '|') !== false) {
+ $errors[] = $file->getPathname() . "\n" . ' ' . 'Contains a | in the translations' . "\n";
+ }
+
if (json_last_error() !== JSON_ERROR_NONE) {
$errors[] = $file->getPathname() . "\n" . ' ' . json_last_error_msg() . "\n";
} else {