Skip to content

Commit 4bc0043

Browse files
committed
fix
1 parent de4671b commit 4bc0043

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Commands/TranslateTranslationsCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function handle(): int
2323
$service = $this->getTranslateService($this->option('service'));
2424
$targets = $this->getLocales(
2525
option: $this->option('to'),
26+
options: array_diff(Translator::getLanguages(), [$from]),
2627
label: 'In what locales would you like to translate?'
2728
);
2829

src/Commands/TranslatorCommandTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ trait TranslatorCommandTrait
1414
{
1515
public function getLocales(
1616
mixed $option,
17+
?array $options = null,
1718
?string $label = null
1819
): array {
19-
$availableLocales = Translator::getLanguages();
20+
$availableLocales = $options ?? Translator::getLanguages();
2021

2122
if ($option) {
2223
if (is_array($option)) {

0 commit comments

Comments
 (0)