Skip to content
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

chore: pull_translations: use less Makefile commands and move it to Python | FC-0012 #34257

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ pull_plugin_translations: ## Pull translations from Transifex for edx_django_ut
pull_xblock_translations: ## pull xblock translations via atlas
rm -rf conf/plugins-locale/xblock.v1 # Clean up existing atlas translations
rm -rf lms/static/i18n/xblock.v1 cms/static/i18n/xblock.v1 # Clean up existing xblock compiled translations
mkdir -p conf/plugins-locale/xblock.v1/ lms/static/js/xblock.v1-i18n cms/static/js
python manage.py lms pull_xblock_translations --verbose $(ATLAS_OPTIONS)
python manage.py lms compile_xblock_translations
cp -r lms/static/js/xblock.v1-i18n cms/static/js
python manage.py cms compile_xblock_translations

pull_translations: ## pull translations from Transifex
git clean -fdX conf/locale
Expand Down
1 change: 1 addition & 0 deletions openedx/core/djangoapps/plugins/i18n_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def ensure_empty_directory(self, directory):
Ensure the pull directory is empty before running atlas pull.
"""
plugin_translations_root = directory
os.makedirs(plugin_translations_root, exist_ok=True)
if os.listdir(plugin_translations_root):
raise CommandError(f'"{plugin_translations_root}" should be empty before running atlas pull.')

Expand Down
Loading