discourse/plugins/discourse-ai/lib/translation
Natalie Tay 3d47622d0f
FIX: Do not send empty content when detecting language (#34825)
Seeing many errors about

```
DiscourseAi::Completions::Endpoints::Gemini: status: 400 - body: {
  "error": {
    "code": 400,
    "message": "* GenerateContentRequest.contents: contents is not specified\n",
    "status": "INVALID_ARGUMENT"
  }
}
```

This is triggered due to posts with images and no text.

The solution here is to set the locale to site default locale.
2025-09-17 00:52:40 +08:00
..
base_candidates.rb UX: Show a bit more information on translation progress chart (#34643) 2025-09-01 11:10:09 +08:00
base_translator.rb
category_candidates.rb UX: Show a bit more information on translation progress chart (#34643) 2025-09-01 11:10:09 +08:00
category_locale_detector.rb
category_localizer.rb
content_splitter.rb
entry_point.rb FEATURE: Allow re-localization twice a day if post version has changed (#34023) 2025-08-04 10:58:30 +08:00
language_detector.rb FIX: Do not send empty content when detecting language (#34825) 2025-09-17 00:52:40 +08:00
post_candidates.rb UX: Show a bit more information on translation progress chart (#34643) 2025-09-01 11:10:09 +08:00
post_detection_text.rb
post_locale_detector.rb FIX: Do not send empty content when detecting language (#34825) 2025-09-17 00:52:40 +08:00
post_localizer.rb FEATURE: Allow re-localization twice a day if post version has changed (#34023) 2025-08-04 10:58:30 +08:00
post_raw_translator.rb
short_text_translator.rb
topic_candidates.rb UX: Show a bit more information on translation progress chart (#34643) 2025-09-01 11:10:09 +08:00
topic_locale_detector.rb
topic_localizer.rb
topic_title_translator.rb
verbose_logger.rb