-
Notifications
You must be signed in to change notification settings - Fork 0
feat: get translated title for content highlights #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: get translated title for content highlights #21
Conversation
There was a problem hiding this 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
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
a5a5c21 to
1226cb2
Compare
There was a problem hiding this 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.
1226cb2 to
2bbbdac
Compare
Description: Add support to fetch translated titles for content highlights.
JIRA: https://2u-internal.atlassian.net/browse/ENT-11109
Post-review