discourse-ai/spec/lib/translation
Natalie Tay d7a2af5505
DEV: Prevent multiple translation per post (#1443)
We're seeing an aggressive number of translations being enqueued for a single post and locale. Historically, we trigger translation on `cooked` not `raw`, but that has changed a while back.

```
# from AiApiAuditLog, the same post is getting translated to the same locale within a few secs of each other
zh_CN - 2025-06-17 13:02:31 UTC
zh_CN - 2025-06-17 13:02:34 UTC
zh_CN - 2025-06-17 13:02:35 UTC
zh_CN - 2025-06-17 13:02:36 UTC
zh_CN - 2025-06-17 13:02:38 UTC
zh_CN - 2025-06-17 13:02:39 UTC
zh_CN - 2025-06-17 13:02:40 UTC
zh_CN - 2025-06-17 13:02:40 UTC
zh_CN - 2025-06-17 13:02:43 UTC
zh_CN - 2025-06-17 13:02:44 UTC
```

This PR prevents this from happening.
2025-06-18 13:24:02 +08:00
..
base_translator_spec.rb DEV: Move examples out of prompt (#1438) 2025-06-17 16:12:52 +08:00
category_locale_detector_spec.rb DEV: Also detect locale of categories and do not translate if already in the locale (#1413) 2025-06-06 22:41:48 +08:00
category_localizer_spec.rb DEV: Add topic and post id when using completions for traceability to AiApiAuditLog (#1414) 2025-06-06 23:24:24 +08:00
content_splitter_spec.rb FEATURE: Automatic translation and localization of posts, topics, categories (#1376) 2025-05-29 17:28:06 +08:00
entry_point_spec.rb DEV: Prevent multiple translation per post (#1443) 2025-06-18 13:24:02 +08:00
language_detector_spec.rb DEV: Move AI translation feature into an AI Feature (#1424) 2025-06-13 10:17:27 +08:00
locale_normalizer_spec.rb FEATURE: Automatic translation and localization of posts, topics, categories (#1376) 2025-05-29 17:28:06 +08:00
post_locale_detector_spec.rb FEATURE: Automatic translation and localization of posts, topics, categories (#1376) 2025-05-29 17:28:06 +08:00
post_localizer_spec.rb DEV: Move AI translation feature into an AI Feature (#1424) 2025-06-13 10:17:27 +08:00
topic_locale_detector_spec.rb FEATURE: Automatic translation and localization of posts, topics, categories (#1376) 2025-05-29 17:28:06 +08:00
topic_localizer_spec.rb DEV: Move AI translation feature into an AI Feature (#1424) 2025-06-13 10:17:27 +08:00