Skip to content

fix(content): generate opportunities in brand language - #369

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
Sam-syntax35:fix/content-opportunity-language
Jul 7, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
Sam-syntax35:fix/content-opportunity-language

Conversation

@Sam-syntax35

Copy link
Copy Markdown
Contributor

Summary

Fixes content opportunity generation so it respects the brand's configured language instead of always generating English.

Changes

  • Select language when fetching the brand.
  • Import and use getLanguageName() to resolve the language name.
  • Pass a language instruction to the LLM prompt so opportunity titles and descriptions are generated in the brand's language.
  • Leave internal enum values (type, impact) unchanged.

Fixes #363

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix — matches the issue exactly: language added to the brand select, getLanguageName resolves it (falls back to English for an unset language, so no regression), and the IMPORTANT: Write … in ${langName} directive is appended to the prompt, mirroring the prompt / topic-suggestion flows. The type/impact enums are left untouched, and Prettier's happy. LGTM! 🎉

Worth a quick manual sanity-check generating opportunities on a Turkish (or other non-English) brand, but the pattern's proven.

@gkhngyk
gkhngyk merged commit 2d1d557 into ansvisor:main Jul 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(content): opportunities are generated in English regardless of the brand's language

2 participants