Skip to content

Commit

Permalink
fix: re-pull Atlas translations for mounted edx-platform
Browse files Browse the repository at this point in the history
The new Atlas-based translations system stores important
translations artifacts in edx-platform.

Unfortunately, when edx-platform is bind-mounted, these
translations artifacts are overwritten. This means that
edx-platform developers will see 404s on various i18n-related
assets in Django-rendered LMS and CMS pages.

We work around this in the same way we do for static assets,
egg_info, and node_modules: Just re-generate the translations
artifacts as part of the dev init job. This is a waste of time
and bandwidth, but it's the system we have, for now at least.
  • Loading branch information
kdmccormick committed Mar 21, 2024
1 parent 404332b commit df11483
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tutor/templates/jobs/init/mounted-directories.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,18 @@ npm clean-install
# Regenerate static assets.
openedx-assets build --env=dev

# Pull latest translations via atlas
./manage.py lms pull_plugin_translations --verbose --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }}
./manage.py lms pull_xblock_translations --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }}
atlas pull --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} \
translations/edx-platform/conf/locale:conf/locale \
translations/studio-frontend/src/i18n/messages:conf/plugins-locale/studio-frontend
./manage.py lms compile_xblock_translations
./manage.py cms compile_xblock_translations
./manage.py lms compile_plugin_translations
./manage.py lms compilemessages -v1
./manage.py lms compilejsi18n
./manage.py cms compilejsi18n

set -x
echo "Done setting up bind-mounted edx-platform."

0 comments on commit df11483

Please sign in to comment.