openedx / openedx/edx-django-utils
feat: Provide i18n `atlas pull` for Django apps (IDAs) plugins | FC-0012
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 28
- Forks
- 31
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 1
Description
This module could feature an atlas_pull_by_module function which can be extracted from the edx-platform repository to benefit other IDAs (Python micro-services).
def atlas_pull_by_modules(module_names, locale_root, pull_options):
"""
Atlas pull translations by module name instead of repository name.
"""
atlas_pull_args = [
# Asterisk (*) is used instead of the repository name because it's not known at runtime.
# The `--expand-glob` option is used to expand match any repository name that has the right module name.
f'translations/*/{module_name}/conf/locale:{module_name}'
for module_name in module_names
]
subprocess.run(
args=['atlas', 'pull', '--expand-glob', *pull_options, *atlas_pull_args],
check=True,
cwd=locale_root,
)
Other classes such as BaseAtlasPullCommand can be extracted to this repository to make the edx-platform less of a monolith while allowing other IDAs to have a pull_plugin_translations Django command:
Related
- https://github.com/openedx/i18n-tools/issues/141
- https://github.com/openedx/edx-platform/pull/33922#discussion_r1470020878
- edx-platform commit - feat: atlas pull plugins translation
- edx-platform:docs/decisions Design for Refactoring Translations pull to use Atlas
FC-0012 Project
This issue was reported during the FC-0012 project which implements the Translation Infrastructure update OEP-58.
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.
Research direction
Start with the referenced edx-platform module openedx/core/djangoapps/plugins/i18n_api.py and review the linked OEP-58 design and related issue. Trace BaseAtlasPullCommand and the proposed atlas_pull_by_modules behavior, then confirm the extracted utilities support a pull_plugin_translations Django command for other IDAs without depending on edx-platform.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- localization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100