Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
feat: add atlas pull support
Browse files Browse the repository at this point in the history
Refs: FC-0012 OEP-58
  • Loading branch information
shadinaif committed Nov 15, 2023
1 parent 8209a41 commit bce186c
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ FROM ubuntu:focal as app
ENV DEBIAN_FRONTEND noninteractive
# System requirements.
RUN apt update && \
apt-get install -qy \
apt-get install -qy \
curl \
gettext \
git \
language-pack-en \
build-essential \
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,13 @@ compile_translations: requirements.tox
fake_translations: extract_translations dummy_translations compile_translations

pull_translations:
ifeq ($(OPENEDX_ATLAS_PULL),)
cd ecommerce && tx pull -a -f -t --mode reviewed
else
find ecommerce/conf/locale -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;
atlas pull $(OPENEDX_ATLAS_ARGS) translations/ecommerce/ecommerce/conf/locale:ecommerce/conf/locale
python manage.py compilemessages
endif

push_translations:
cd ecommerce && tx push -s
Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ markdown==2.6.9
mysqlclient<1.5
newrelic
ndg-httpsclient
openedx-atlas
path.py==7.2
paypalrestsdk
premailer==2.9.2
Expand Down
2 changes: 2 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ oauthlib==3.2.2
# getsmarter-api-clients
# requests-oauthlib
# social-auth-core
openedx-atlas==0.5.0
# via -r requirements/base.in
packaging==23.1
# via drf-yasg
paramiko==3.2.0
Expand Down
4 changes: 3 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ edx-drf-extensions==8.13.0
# edx-rbac
edx-ecommerce-worker==3.3.4
# via -r requirements/test.txt
edx-i18n-tools==0.9.2
edx-i18n-tools==1.3.0
# via -r requirements/test.txt
edx-opaque-keys==2.3.0
# via
Expand Down Expand Up @@ -570,6 +570,8 @@ oauthlib==3.2.2
# getsmarter-api-clients
# requests-oauthlib
# social-auth-core
openedx-atlas==0.5.0
# via -r requirements/base.in
packaging==23.1
# via
# -r requirements/docs.txt
Expand Down
2 changes: 2 additions & 0 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ oauthlib==3.2.2
# getsmarter-api-clients
# requests-oauthlib
# social-auth-core
openedx-atlas==0.5.0
# via -r requirements/base.in
packaging==23.1
# via drf-yasg
paramiko==3.2.0
Expand Down
4 changes: 3 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ edx-drf-extensions==8.13.0
# edx-rbac
edx-ecommerce-worker==3.3.4
# via -r requirements/base.txt
edx-i18n-tools==0.9.2
edx-i18n-tools==1.3.0
# via -r requirements/test.in
edx-opaque-keys==2.3.0
# via
Expand Down Expand Up @@ -549,6 +549,8 @@ oauthlib==3.2.2
# getsmarter-api-clients
# requests-oauthlib
# social-auth-core
openedx-atlas==0.5.0
# via -r requirements/base.in
packaging==23.1
# via
# -r requirements/base.txt
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ deps =
allowlist_externals =
/bin/bash
changedir =
dummy_translations,compile_translations,detect_changed_translations,validate_translations: ecommerce
extract_translations,dummy_translations,compile_translations,detect_changed_translations,validate_translations: ecommerce
commands =
static: python manage.py collectstatic --noinput --verbosity 0
static: python manage.py compress --force
Expand All @@ -64,8 +64,7 @@ commands =

pylint: pylint -j 0 --rcfile=pylintrc ecommerce e2e

extract_translations: python manage.py makemessages -l en -v1 -d django --ignore="docs/*" --ignore="src/*" --ignore="i18n/*" --ignore="assets/*" --ignore="node_modules/*" --ignore="ecommerce/static/bower_components/*" --ignore="ecommerce/static/build/*"
extract_translations: python manage.py makemessages -l en -v1 -d djangojs --ignore="docs/*" --ignore="src/*" --ignore="i18n/*" --ignore="assets/*" --ignore="node_modules/*" --ignore="ecommerce/static/bower_components/*" --ignore="ecommerce/static/build/*"
extract_translations: i18n_tool extract --no-merge --no-segment

dummy_translations: i18n_tool dummy
compile_translations: python ../manage.py compilemessages
Expand Down

0 comments on commit bce186c

Please sign in to comment.