mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Code formatting
This commit is contained in:
@@ -18,7 +18,7 @@ $cli
|
||||
|
||||
$mainLocale = new Locale($mainLanguage);
|
||||
foreach ($mainLocale->getTranslations() as $key => $value) {
|
||||
if(!empty($value)) {
|
||||
if (!empty($value)) {
|
||||
$mainTranslations[] = $key;
|
||||
}
|
||||
}
|
||||
@@ -30,31 +30,30 @@ $cli
|
||||
$translations = $locale->getTranslations();
|
||||
$missing = [];
|
||||
foreach ($mainTranslations as $translation) {
|
||||
if(empty($translations[$translation])) {
|
||||
if (empty($translations[$translation])) {
|
||||
$missing[] = $translation;
|
||||
}
|
||||
}
|
||||
|
||||
if(\count($missing) <= 0) {
|
||||
if (\count($missing) <= 0) {
|
||||
$type !== 'json' && Console::success('Locale "' . $language . '" is fully translated.');
|
||||
} else {
|
||||
$type !== 'json' && Console::error('Locale "' . $language . '" is missing ' . \count($missing) . ' translations.');
|
||||
|
||||
if($type === 'debug') {
|
||||
if ($type === 'debug') {
|
||||
foreach ($missing as $key) {
|
||||
Console::log('"' . $key . '" missing in "' . $language . '".');
|
||||
}
|
||||
} else if ($type === 'json') {
|
||||
} elseif ($type === 'json') {
|
||||
$results[$language] = $missing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$type !== 'json' && Console::info('To get detailed information about missing translations, run the command with --type=debug parameter. Use --type=json to get JSON formatted results.');
|
||||
|
||||
if($type === 'json') {
|
||||
|
||||
if ($type === 'json') {
|
||||
\var_dump($results);
|
||||
Console::log(\json_encode($results));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user