trypost/app/Http/Requests/App/Workspace
Paulo Castellano aaa4db1dbb feat: add workspace content_language setting for AI generation
Users can now pick the language AI uses for captions, hashtags,
descriptions, AND on-image / on-screen text — independent of the
app UI locale. A user with pt-BR UI who writes for an English
audience gets English content, and vice versa.

- New content_language column on workspaces (added to the existing
  create_workspaces_table migration since we're pre-production),
  defaulting to 'en'. Fillable on the model.
- Dropdown in Settings → Workspace → Brand, side-by-side with Tone.
  Options: English, Português (Brasil), Español. Short helper copy
  explains what the setting controls.
- Validation: sometimes|string|in:en,pt-BR,es — optional on update
  so existing callers that don't post the field keep the current
  value (DB default handles fresh workspaces).
- System prompt now uses $content_language (sourced from the
  workspace) instead of app()->getLocale(). The rule was also
  strengthened: the AI must always write in this language regardless
  of what language the user types instructions in, and must instruct
  image/video tools to render on-media text in this language too.
- Image and video Blade prompts received a new line forcing any text
  rendered inside the generated media to use $content_language.
- GenerateImage tool and VideoGenerationService pass the workspace's
  content_language into their respective prompt templates.

Previously the caption would be in Portuguese (since it followed the
user's input language) but the image could render with English text
because there was no explicit constraint. Now the whole pipeline is
aligned to one per-workspace language.
2026-04-16 10:37:03 -03:00
..
StoreWorkspaceRequest.php refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
UpdateWorkspaceRequest.php feat: add workspace content_language setting for AI generation 2026-04-16 10:37:03 -03:00