{"record":{"id":"d98483359c42a6a7","repo":"filamentphp/filament","slug":"source-is-not-a-valid-translation-source-must","errorCode":null,"errorMessage":"{$source} is not a valid translation source. Must be `vendor` or `app`.","messagePattern":"(.+?) is not a valid translation source\\. Must be `vendor` or `app`\\.","errorType":"console","errorClass":"InvalidOptionException","httpStatus":null,"severity":"error","filePath":"packages/support/src/Commands/CheckTranslationsCommand.php","lineNumber":84,"sourceCode":"        $this->scan('schemas');\n        $this->scan('spark-billing-provider');\n        $this->scan('spatie-laravel-google-fonts-plugin');\n        $this->scan('spatie-laravel-media-library-plugin');\n        $this->scan('spatie-laravel-settings-plugin');\n        $this->scan('spatie-laravel-tags-plugin');\n        $this->scan('support');\n        $this->scan('tables');\n        $this->scan('widgets');\n\n        return self::SUCCESS;\n    }\n\n    protected function scan(string $package): void\n    {\n        $localeRootDirectory = match ($source = $this->option('source')) {\n            'app' => lang_path(\"vendor/{$package}\"),\n            'vendor' => base_path(\"vendor/filament/{$package}/resources/lang\"),\n            default => throw new InvalidOptionException(\"{$source} is not a valid translation source. Must be `vendor` or `app`.\")\n        };\n\n        $filesystem = app(Filesystem::class);\n\n        if (! $filesystem->exists($localeRootDirectory)) {\n            return;\n        }\n\n        collect($filesystem->directories($localeRootDirectory))\n            ->mapWithKeys(static fn (string $directory): array => [$directory => (string) str($directory)->afterLast(DIRECTORY_SEPARATOR)])\n            ->when(\n                $locales = $this->argument('locales'),\n                fn (Collection $availableLocales): Collection => $availableLocales->filter(fn (string $locale): bool => in_array($locale, $locales))\n            )\n            ->each(function (string $locale, string $localeDir) use ($filesystem, $localeRootDirectory, $package): void {\n                $files = $filesystem->allFiles($localeDir);\n                $baseFiles = $filesystem->allFiles(implode(DIRECTORY_SEPARATOR, [$localeRootDirectory, 'en']));\n","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/support/src/Commands/CheckTranslationsCommand.php#L66-L102","documentation":"Error \"{$source} is not a valid translation source. Must be `vendor` or `app`.\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/support/src/Commands/CheckTranslationsCommand.php:84 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}