discourse-ai/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.rb FEATURE: allow seeing configured LLM on feature page (#1460) 2025-06-24 17:42:47 +10:00
category_locale_detector.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.rb FIX: Localize description excerpts as they have limits (#1490) 2025-07-08 10:36:41 +08:00
content_splitter.rb DEV: Split content based on llmmodel's max_output_tokens (#1456) 2025-06-23 21:11:20 +08:00
entry_point.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.rb FIX: Pass topic to context (#1488) 2025-07-07 14:59:48 +08:00
locale_normalizer.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.rb FIX: Ignore captions and quotes when detecting locale and update prompts (#1483) 2025-07-03 22:57:48 +08:00
post_locale_detector.rb FIX: Ignore captions and quotes when detecting locale and update prompts (#1483) 2025-07-03 22:57:48 +08:00
post_localizer.rb DEV: Split content based on llmmodel's max_output_tokens (#1456) 2025-06-23 21:11:20 +08:00
post_raw_translator.rb DEV: Move AI translation feature into an AI Feature (#1424) 2025-06-13 10:17:27 +08:00
short_text_translator.rb DEV: Move AI translation feature into an AI Feature (#1424) 2025-06-13 10:17:27 +08:00
topic_locale_detector.rb FIX: Ignore captions and quotes when detecting locale and update prompts (#1483) 2025-07-03 22:57:48 +08:00
topic_localizer.rb DEV: Move AI translation feature into an AI Feature (#1424) 2025-06-13 10:17:27 +08:00
topic_title_translator.rb DEV: Move AI translation feature into an AI Feature (#1424) 2025-06-13 10:17:27 +08:00
verbose_logger.rb FEATURE: Automatic translation and localization of posts, topics, categories (#1376) 2025-05-29 17:28:06 +08:00