feat: get translated title for content highlights#21
Merged
muhammad-ammar merged 1 commit intomasterfrom Jan 12, 2026
Merged
Conversation
There was a problem hiding this comment.
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
ContentTranslationFactoryfor testing translation data - Modified
HighlightedContentSerializerto return translated titles based on language context - Updated
HighlightSetSerializerto prefetch translations for performance optimization - Added
get_serializer_contexttoHighlightSetReadOnlyViewSetto 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.
4130718 to
1bc346f
Compare
irfanuddinahmad
approved these changes
Jan 9, 2026
a5a5c21 to
1226cb2
Compare
There was a problem hiding this comment.
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.
1226cb2 to
2bbbdac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description: Add support to fetch translated titles for content highlights.
JIRA: https://2u-internal.atlassian.net/browse/ENT-11109
Post-review