Skip to content

When using Gemini the translation does not work #1886

@PatrickHuiskens

Description

@PatrickHuiskens

What's happening?

When using Gemini 2.5 flash lite, it will return an error like

Lingo.dev: [Failed Files]

❌ locales/en-GB/translation.json (nl-NL → en-GB)

 Unexpected token 'O', "OK{"source"... is not valid JSON

My fix was adding this to the prompt: Return ONLY raw JSON. Do not include conversational filler, markdown formatting, or status messages like 'OK'.

Exact Reproduction Steps

  1. Setup Lingo
  2. "id": "google",
    "model": "gemini-2.5-flash-lite"
  3. Run translations

Expected

Correct translations file

Actual

Lingo.dev: [Failed Files]

❌ locales/en-GB/translation.json (nl-NL → en-GB)

 Unexpected token 'O', "OK{"source"... is not valid JSON

Screenshots/Videos

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions