You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Content Opportunities and briefs are always generated in English regardless of the brand's language #638
Content Opportunities and their briefs are always generated in English, even for brands whose language is not English (e.g. a Turkish-market brand with language: tr gets English titles, descriptions, and briefs).
The cause is that neither generation path ever tells the model the brand's language:
Opportunity generation — the brand query selects only id, name, description, industry; the brands.language / brands.region columns (which exist and are used by volume analysis) are never read. The system prompt contains no output-language instruction, so the model answers in the instruction's language: English.
Brief generation — same gap: the brand select has no language, and the brief system prompt has no language rule. So even a manually translated opportunity would still get an English brief.
grep -c language server/src/routes/content.js returns 0 — the language is never forwarded anywhere in the content pipeline.
The columns exist with defaults region: 'US', language: 'en' — see brands in supabase/schema.sql
Suggested fix
Symmetric ~10-line changes in the two files:
Add language to both brand selects.
Append an explicit instruction to both user prompts (or system prompts), e.g.: Output language: ${brand.language || 'en'} — write every title, description, and brief field in this language. Keep proper nouns and metric names as-is.
No migration and no re-analysis needed — the next generation cycle picks up the language. Existing English rows stay untouched.
Acceptance criteria
A brand with language: tr gets Turkish opportunity titles/descriptions and Turkish briefs on the next generation.
Brands with language: en (the default) see no change.
Proper nouns (brand/competitor names) are not translated.
Activity