Skip to content

Implement localization on xblocks-contrib, xblocks-extra #241

@farhan

Description

@farhan

Summary

Define and document the translation architecture for consolidated XBlock repositories:

  • xblocks-contrib
  • xblocks-extra

Relevant References


Proposed Strategy

  1. No shared root-level conf directory in consolidated repositories (xblocks-contrib / xblocks-extra) as per current implementation
  2. Each XBlock maintains its own conf directory within its module_name
  3. Each XBlock has a separate entry in openedx-translations/transifex.yml
  4. Update make extract_translations in xblocks-* repos to extract translations
    • It will extract per block
  5. The daily cron job in openedx-translations should: - Checkout xblocks-extra / xblocks-contrib
    • Extract translation source files for each XBlock independently
  6. 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.yml updated with per-XBlock entries
  • Compatibility with openedx-platform verified
  • Legacy paths cleaned up
  • End-to-end translation flow validated
  • Translation works after the deletion of older repositories translations or builtin blocks code

Metadata

Metadata

Assignees

Labels

epicLarge unit of work, consisting of multiple tasks
No fields configured for Feature.

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions