Skip to content

Commit

Permalink
fix: base locale should fail
Browse files Browse the repository at this point in the history
  • Loading branch information
nerg4l committed Jan 21, 2024
1 parent e4ebbcb commit 060c021
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Console/Commands/FindMissingTranslationStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ class FindMissingTranslationStrings extends Command
public function handle(LostInTranslation $lit)
{
$locale = $this->argument('locale');
$baseLocale = config('lost-in-translation.locale');

if ($locale === $baseLocale) {
$this->error("Locale `{$locale}` must be different from `{$baseLocale}`.");

return;
}

$files = Collection::make(config('lost-in-translation.paths'))
->map(function (string $path) {
Expand Down

0 comments on commit 060c021

Please sign in to comment.