openedx / openedx/xblocks-core
Implement localization on xblocks-core, xblocks-extra
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 15
- Avg merge
- 5d 16m
- Merged PRs (30d)
- 7
Description
Summary
Define and document the translation architecture for consolidated XBlock repositories:
- xblocks-contrib
- xblocks-extra
Relevant References
-
openedx-translations:
https://github.com/openedx/openedx-translations/tree/main/translations -
openedx-atlas (CLI to pull translations):
https://github.com/openedx/openedx-atlasGlob pattern support docs:
https://github.com/openedx/openedx-atlas/blob/1eb61a69e8a0f9c0911fc5d334066d3a06b3d425/docs/decisions/0001-support-glob-pattern.rst#L70 -
Archived PR:
https://github.com/openedx/openedx-translations/pull/70340 -
openedx-platform management command:
https://github.com/openedx/openedx-platform/blob/master/common/djangoapps/xblock_django/management/commands/pull_xblock_translations.pyUsage:
make pull_xblock_translations(run inside lms-shell)python manage.py lms pull_xblock_translations --filter=ar,fr_CA
Proposed Strategy
- No shared root-level
confdirectory in consolidated repositories (xblocks-contrib/xblocks-extra) as per current implementation - Each XBlock maintains its own
confdirectory within its module_name - Each XBlock has a separate entry in
openedx-translations/transifex.yml - Update
make extract_translationsinxblocks-*repos to extract translations- It will extract per block
- The daily cron job in
openedx-translationsshould: - Checkoutxblocks-extra/xblocks-contrib- Extract translation source files for each XBlock independently
- Ensure translation path resolution remains compatible with
openedx-platform
Path Compatibility Validation
Current lookup pattern in openedx-platform:
translations/*/{module_name}/conf/locale:{module_name}
Proposed path of xblock translations for consolidated (xblocks-*) repositories:
openedx-translations/translations/xblocks-*/MODULE_NAME/conf/locale/en/LC_MESSAGES/django.po
Example path:
openedx-translations/translations/xblocks-contrib/xblock_pdf/conf/locale/en/LC_MESSAGES/django.po
This path is compatible for openedx-platform lookup pattern.
Example of existing path of Audio xblock:
openedx-translations/translations/AudioXBlock/audio/conf/locale
Cleanup / Migration Tasks
- Verify whether legacy translation paths are auto-removed
- If not, remove obsolete translation directories explicitly
- Validate full extraction + pull flow after migration
Definition of Done
- Architecture finalized for consolidated XBlock repos
- Extraction workflow updated
-
transifex.ymlupdated with per-XBlock entries - Compatibility with
openedx-platformverified - Legacy paths cleaned up
- End-to-end translation flow validated
- Translation works after the deletion of older repositories translations or builtin blocks code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.