Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #35 +/- ##
=======================================
Coverage 79.80% 79.80%
=======================================
Files 41 41
Lines 1139 1139
Branches 75 75
=======================================
Hits 909 909
Misses 203 203
Partials 27 27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Update it as per requirement of openedx-platform https://github.com/openedx/openedx-platform/blob/master/openedx/core/djangoapps/plugins/i18n_api.py#L125
88b27aa to
1e74ea1
Compare
There was a problem hiding this comment.
Pull request overview
Updates the repository’s localization extraction workflow to align with the newer openedx-translations expectations by changing where extracted .po files are written and tightening gitignore patterns for locale artifacts.
Changes:
- Add
REPO_ROOTand update XBlock discovery to use it. - Rewrite
extract_translationsto extract per-XBlock catalogs, mergedjangojs.pointodjango.po, and copy results into<module_name>/conf/locale/.... - Update
.gitignoreto ignore all files under**/conf/locale/**/LC_MESSAGES/*(instead of blanket*.po).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Makefile | Reworks extract_translations to generate/copy per-module django.po files and adds REPO_ROOT usage. |
| .gitignore | Narrows ignore rules from all *.po to locale-message directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .PHONY: validate_translations pull_translations push_translations install_transifex_client | ||
|
|
||
|
|
||
| REPO_ROOT := $(shell pwd) |
| mkdir -p $(REPO_ROOT)/$$module_name/$(EXTRACT_DIR); \ | ||
| cp $$xblock/$(EXTRACT_DIR)/django.po $(REPO_ROOT)/$$module_name/$(EXTRACT_DIR)/django.po; \ |
There was a problem hiding this comment.
not helpful in our context
|
Missing PR removes the old Add this to the Makefile: pull_translations: ## pull translations from openedx-translations via atlas
atlas pull \
translations/xblocks-extra/audio/conf/locale:src/audio/conf/locale \
translations/xblocks-extra/feedback/conf/locale:src/feedback/conf/locale \
translations/xblocks-extra/imagemodal/conf/locale:src/imagemodal/conf/locale \
translations/xblocks-extra/qualtricssurvey/conf/locale:src/qualtricssurvey/conf/locale \
translations/xblocks-extra/sql_grader/conf/locale:src/sql_grader/conf/locale \
translations/xblocks-extra/submit_and_compare/conf/locale:src/submit_and_compare/conf/locale
@for xblock in $(XBLOCKS); do \
cd $$xblock && django-admin compilemessages; \
doneAlso note: edx-platform's |
I didn't find the place where this |
@farhan it is a new pull_translations target using atlas, with the correct destination paths |
As per my study Translations targets were added in As per claude How
|
|
@farhan you are right — One narrower point remains: each consolidated XBlock's Python package will need to declare its |
Study the parent story for the implementation of this PR: openedx/xblocks-core#241
Relevant
openedx-translationsPR: openedx/openedx-translations#72135Reference studied code for the translations work: https://github.com/openedx/FeedbackXBlock/blob/master/Makefile#L78
How to test:
pip install edx-i18n-toolsmake extract_translationsat root of repositoryTranslations should be created as per screen shot.