filamentphp/filament · error · InvalidOptionException
{$source} is not a valid translation source. Must be `vendor
Error message
{$source} is not a valid translation source. Must be `vendor` or `app`. What it means
Error "{$source} is not a valid translation source. Must be `vendor` or `app`." thrown in filamentphp/filament.
Source
Thrown at packages/support/src/Commands/CheckTranslationsCommand.php:84
$this->scan('schemas');
$this->scan('spark-billing-provider');
$this->scan('spatie-laravel-google-fonts-plugin');
$this->scan('spatie-laravel-media-library-plugin');
$this->scan('spatie-laravel-settings-plugin');
$this->scan('spatie-laravel-tags-plugin');
$this->scan('support');
$this->scan('tables');
$this->scan('widgets');
return self::SUCCESS;
}
protected function scan(string $package): void
{
$localeRootDirectory = match ($source = $this->option('source')) {
'app' => lang_path("vendor/{$package}"),
'vendor' => base_path("vendor/filament/{$package}/resources/lang"),
default => throw new InvalidOptionException("{$source} is not a valid translation source. Must be `vendor` or `app`.")
};
$filesystem = app(Filesystem::class);
if (! $filesystem->exists($localeRootDirectory)) {
return;
}
collect($filesystem->directories($localeRootDirectory))
->mapWithKeys(static fn (string $directory): array => [$directory => (string) str($directory)->afterLast(DIRECTORY_SEPARATOR)])
->when(
$locales = $this->argument('locales'),
fn (Collection $availableLocales): Collection => $availableLocales->filter(fn (string $locale): bool => in_array($locale, $locales))
)
->each(function (string $locale, string $localeDir) use ($filesystem, $localeRootDirectory, $package): void {
$files = $filesystem->allFiles($localeDir);
$baseFiles = $filesystem->allFiles(implode(DIRECTORY_SEPARATOR, [$localeRootDirectory, 'en']));
View on GitHub (pinned to 53483fa934)
When it happens
Trigger: Thrown at packages/support/src/Commands/CheckTranslationsCommand.php:84 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of filamentphp/filament@53483fa934 (2026-08-17).
Data as JSON: /api/errors/d98483359c42a6a7.
Report an issue: GitHub.