Skip to content

Conversation

@muhammad-ammar
Copy link
Member

@muhammad-ammar muhammad-ammar commented Jan 9, 2026

Description: Add support to fetch translated titles for content highlights.
JIRA: https://2u-internal.atlassian.net/browse/ENT-11109

Post-review

  • Squash commits into discrete sets of changes
  • Ensure that once the changes have been deployed to stage, prod is manually deployed

Copilot AI review requested due to automatic review settings January 9, 2026 06:36
@muhammad-ammar muhammad-ammar requested review from a team as code owners January 9, 2026 06:36
@muhammad-ammar muhammad-ammar marked this pull request as draft January 9, 2026 06:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds multilingual support for content highlights, enabling the API to return translated titles for highlighted content based on a language query parameter.

Key Changes

  • Added ContentTranslationFactory for testing translation data
  • Modified HighlightedContentSerializer to return translated titles based on language context
  • Updated HighlightSetSerializer to prefetch translations for performance optimization
  • Added get_serializer_context to HighlightSetReadOnlyViewSet to pass language from query parameters
  • Comprehensive test coverage for multilingual functionality

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
enterprise_catalog/apps/catalog/tests/factories.py Added ContentTranslationFactory for creating test translation data
enterprise_catalog/apps/api/v1/constants.py Added DEFAULT_TRANSLATION_LANGUAGE and AVAILABLE_TRANSLATION_LANGUAGES constants
enterprise_catalog/apps/api/v1/serializers.py Modified serializers to support translated titles with prefetch optimization
enterprise_catalog/apps/api/v1/views/curation/highlights.py Added language parameter support in read-only viewset
enterprise_catalog/apps/api/v1/tests/test_serializers.py Added comprehensive tests for serializer translation logic
enterprise_catalog/apps/api/v1/tests/test_curation_views.py Added integration tests for multilingual API endpoints

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@muhammad-ammar muhammad-ammar force-pushed the ammar/get_translated_title_for_content_highlights branch 4 times, most recently from 4130718 to 1bc346f Compare January 9, 2026 10:06
@muhammad-ammar muhammad-ammar force-pushed the ammar/get_translated_title_for_content_highlights branch 5 times, most recently from a5a5c21 to 1226cb2 Compare January 12, 2026 05:51
@muhammad-ammar muhammad-ammar marked this pull request as ready for review January 12, 2026 05:53
Copilot AI review requested due to automatic review settings January 12, 2026 05:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@muhammad-ammar muhammad-ammar force-pushed the ammar/get_translated_title_for_content_highlights branch from 1226cb2 to 2bbbdac Compare January 12, 2026 06:13
@muhammad-ammar muhammad-ammar merged commit 8680292 into master Jan 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants