/** * Generates `config/translatable.php` from the project's omnify locale config. * * Addresses a gap caught while writing the #75–#79 service base E2E tests * in l12: Astrotomic's vendor default config only ships `['en', 'fr', 'es']` * as supported locales. Consumers using `ja` / `vi` / `ko` / etc. hit a * silent footgun — `Translatable::fill(['title:ja' => '...'])` drops the key * because `getLocalesHelper()->has('ja')` returns false, producing NULL * translations at runtime with no error. * * This generator emits a ready-to-commit `config/translatable.php` wired to * the locales declared in `omnify.yaml` under `locale.locales`. It's only * written when the project actually has a schema with translatable fields * (no point in rewriting the config if nothing would consume it). * * The file is marked `overwrite: true` — it's a base file in Omnify's sense: * when locales change in omnify.yaml, the config should follow automatically. * Consumers that need per-project overrides can copy it to a different name * or extend it via Laravel's config merging. */ import type { SchemaReader } from './schema-reader.js'; import type { GeneratedFile, PhpConfig } from './types.js'; export declare function generateTranslatableConfig(reader: SchemaReader, _config: PhpConfig): GeneratedFile[];