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
path: root/build
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-06-10 16:54:14 +0300
committerGitHub <noreply@github.com>2022-06-10 16:54:14 +0300
commit148498bba574587d66bc18c0f1685ec5e332f3ba (patch)
treea31fc8e5425a8ba29d462ab6a7d021e19f7575f5 /build
parent6ee4e0b94c15a784e8a22ee790664f0d21caa02b (diff)
parent50c697dbd4a8f8ab2f372944c0a55ad89f201f40 (diff)
Merge pull request #32741 from nextcloud/Valdnet-patch-2
l10n: Delete apostrophe
Diffstat (limited to 'build')
-rw-r--r--build/translation-checker.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/build/translation-checker.php b/build/translation-checker.php
index 53c139a1d63..7bc80d53cdb 100644
--- a/build/translation-checker.php
+++ b/build/translation-checker.php
@@ -23,6 +23,8 @@ $directories = [
__DIR__ . '/../core/l10n',
];
+$isDebug = in_array('--debug', $argv, true) || in_array('-d', $argv, true);
+
$apps = new \DirectoryIterator(__DIR__ . '/../apps');
foreach ($apps as $app) {
if (!file_exists($app->getPathname() . '/l10n')) {
@@ -50,7 +52,7 @@ foreach ($directories as $dir) {
$translations = json_encode($json['translations']);
if (strpos($translations, '|') !== false) {
- $errors[] = $file->getPathname() . "\n" . ' ' . 'Contains a | in the translations' . "\n";
+ $errors[] = $file->getPathname() . "\n" . ' ' . 'Contains a | in the translations.' . "\n";
}
if (json_last_error() !== JSON_ERROR_NONE) {
@@ -58,6 +60,16 @@ foreach ($directories as $dir) {
} else {
$valid++;
}
+
+ if ($isDebug && $file->getFilename() === 'en_GB.json') {
+ $sourceStrings = json_encode(array_keys($json['translations']));
+
+ if (strpos($sourceStrings, '\u2019') !== false) {
+ $errors[] = $file->getPathname() . "\n"
+ . ' ' . 'Contains a unicode single quote "’" in the english source string, please replace with normal single quotes.' . "\n"
+ . ' ' . 'Please note that this only updates after a sync to transifex.' . "\n";
+ }
+ }
}
}