discourse-ai/spec/lib/translation
Natalie Tay d54cd1f602
DEV: Normalize locales that are similar (e.g. en and en_GB) so they do not get translated (#1495)
This commit
- normalizes locales like en_GB and variants to en. With this, the feature will not translate en_GB posts to en (or similarly pt_BR to pt_PT)
- consolidates whether the feature is enabled in `DiscourseAi::Translation.enabled?`
- similarly for backfill in  `DiscourseAi::Translation.backfill_enabled?`
  - turns off backfill if `ai_translation_backfill_max_age_days` is 0 to keep true to what it says. Set it to a high number to backfill everything
2025-07-09 22:21:51 +08:00
..
base_translator_spec.rb DEV: Split content based on llmmodel's max_output_tokens (#1456) 2025-06-23 21:11:20 +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 FIX: Localize description excerpts as they have limits (#1490) 2025-07-08 10:36:41 +08:00
content_splitter_spec.rb DEV: Split content based on llmmodel's max_output_tokens (#1456) 2025-06-23 21:11:20 +08:00
entry_point_spec.rb DEV: Normalize locales that are similar (e.g. en and en_GB) so they do not get translated (#1495) 2025-07-09 22:21:51 +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 DEV: Normalize locales that are similar (e.g. en and en_GB) so they do not get translated (#1495) 2025-07-09 22:21:51 +08:00
post_detection_text_spec.rb FIX: Ignore captions and quotes when detecting locale and update prompts (#1483) 2025-07-03 22:57:48 +08:00
post_locale_detector_spec.rb FIX: Ignore captions and quotes when detecting locale and update prompts (#1483) 2025-07-03 22:57:48 +08:00
post_localizer_spec.rb DEV: Indicate backfill rate for translations is hourly (#1451) 2025-06-21 15:45:09 +08:00
topic_locale_detector_spec.rb FIX: Ignore captions and quotes when detecting locale and update prompts (#1483) 2025-07-03 22:57:48 +08:00
topic_localizer_spec.rb DEV: Move AI translation feature into an AI Feature (#1424) 2025-06-13 10:17:27 +08:00