discourse/plugins/discourse-ai/spec/lib/translation
Natalie Tay dfd0c5208c
FIX: Completion rate double-count and normalize (#33963)
This PR fixes 2 things. 

1. If a `post` was written in `ja` (Japanese) and for some reason also
had a `post_localization` that is `ja`, it becomes 200%
2. When getting completion progress for "English (US)", if there exists
a "English (UK)" localization, we want to include that
3. Previously the completion count was also getting `post_localization`
from posts that are not candidates. If the user switches
`ai_translation_backfill_limit_to_public_content` from false to true, it
would include previously localized PMs when it should not.

Follow up: https://github.com/discourse/discourse/pull/33927
2025-07-30 18:09:09 +08:00
..
base_translator_spec.rb
category_candidates_spec.rb FIX: Completion rate double-count and normalize (#33963) 2025-07-30 18:09:09 +08:00
category_locale_detector_spec.rb
category_localizer_spec.rb
content_splitter_spec.rb
entry_point_spec.rb
language_detector_spec.rb
post_candidates_spec.rb FIX: Completion rate double-count and normalize (#33963) 2025-07-30 18:09:09 +08:00
post_detection_text_spec.rb
post_locale_detector_spec.rb
post_localizer_spec.rb
topic_candidates_spec.rb FIX: Completion rate double-count and normalize (#33963) 2025-07-30 18:09:09 +08:00
topic_locale_detector_spec.rb
topic_localizer_spec.rb