From 554103687e22ccdb9a3f8e5cc45c529a8e8c02bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 22 Jan 2024 11:15:55 +0000 Subject: [PATCH] linter fix --- .../Platform/Tasks/DevGenerateTranslations.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php b/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php index 323005de0b..66eee00d0d 100644 --- a/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php +++ b/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php @@ -67,11 +67,11 @@ class DevGenerateTranslations extends Action $language = \explode('.', $file)[0]; $translation = $this->generateTranslation($language, $mainJson[$key]); - if(!empty($translation)) { + if (!empty($translation)) { $json = \json_decode(\file_get_contents($dir . '/' . $file), true); $json[$key] = $translation; \file_put_contents($dir . '/' . $file, \json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | 0)); - + Console::success("Generated {$key} for {$language}"); } } @@ -86,12 +86,12 @@ class DevGenerateTranslations extends Action { $list = Config::getParam('locale-languages'); foreach ($list as $language) { - if($language['code'] === $targetLanguage) { + if ($language['code'] === $targetLanguage) { $languageObject = $language; } } - if(!isset($languageObject)) { + if (!isset($languageObject)) { Console::error("{$targetLanguage} language not found"); return ''; } @@ -125,8 +125,8 @@ class DevGenerateTranslations extends Action $failureDetectors = [ 'sorry', 'confusion', 'country code', 'misunderstanding', 'correct', 'clarify', 'specific', 'cannot', 'unable', 'language', 'appears' ]; - foreach($failureDetectors as $detector) { - if(\str_contains($answer, $detector)) { + foreach ($failureDetectors as $detector) { + if (\str_contains($answer, $detector)) { Console::error("Translation of '{$enTranslation}' for {$targetLanguage} is incorrect: {$answer}"); } }