Skip to content

Commit a38e83e

Browse files
committed
better commands
1 parent 33b4914 commit a38e83e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/Commands/FixGrammarTranslationsCommand.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ public function handle(): int
3838
->toArray();
3939

4040
$this->line(count($keys)." keys to fix found in {$locale}/{$namespace}.php");
41-
if (! $this->confirm('Would you like to continue?', true)) {
42-
continue;
41+
42+
if (count($keys)) {
43+
if (! $this->confirm('Would you like to continue?', true)) {
44+
continue;
45+
}
4346
}
4447

4548
$translations = Translator::fixGrammarTranslations(

src/Commands/TranslateTranslationsCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ public function handle(): int
3838
$keys = Translator::getMissingTranslations($from, $target, $namespace);
3939
}
4040

41-
if (! $this->confirm(count($keys)." keys to translate found in {$target}/{$namespace}.php, would you like to continue?", true)) {
42-
continue;
41+
$this->line(count($keys)." keys to translate found in {$target}/{$namespace}.php");
42+
43+
if (count($keys)) {
44+
if (! $this->confirm('Would you like to continue?', true)) {
45+
continue;
46+
}
4347
}
4448

4549
$translations = Translator::translateTranslations(

0 commit comments

Comments
 (0)