Skip to content

Commit

Permalink
fix command
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Sep 6, 2024
1 parent 0bc371f commit 76fdb2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Commands/ShowDeadTranslationsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function handleLocale(string $locale): array

return progress(
"Scanning files: {$locale}",
array_combine($namespaces, $namespaces),
$namespaces,
function (string $namespace, Progress $progress) use ($locale) {
$progress->hint($namespace);

Expand Down
4 changes: 2 additions & 2 deletions src/Commands/ShowMissingTranslationsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public function handle(): int

$rows = collect(Translator::getAllMissingTranslations($reference))
->flatMap(
fn (array $namespaces, string $locale) => collect($namespaces)
fn ($namespaces, string $locale) => $namespaces
->flatMap(function (array $keys, string $namespace) use ($locale, $namespaces) {
$values = array_map(fn (string $key) => [$locale, "{$namespace}.$key"], $keys);

if (array_key_last($namespaces) !== $namespace) {
if ($namespaces->keys()->last() !== $namespace) {
$values[] = [new TableSeparator, new TableSeparator];
}

Expand Down

0 comments on commit 76fdb2f

Please sign in to comment.