Skip to content

Commit

Permalink
feat: use atlas in make pull_translations
Browse files Browse the repository at this point in the history
This contribution is part of the [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) which is sparked by the [Translation Infrastructure update OEP-58](https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0058-arch-translations-management.html#specification).
  • Loading branch information
OmarIthawi committed Aug 1, 2023
1 parent 1638924 commit dd0fa2e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DEFAULT_GOAL := help
NODE_BIN=$(CURDIR)/node_modules/.bin
TOX := tox
ATLAS_PULL_LANGS ?= "ar,de,es_419,fa_IR,fr,fr_CA,hi,it,pt,ru,uk,zh_CN,it_IT,pt_PT,de_DE"

.PHONY: accept clean clean_static check_keywords detect_changed_source_translations extract_translations \
help html_coverage migrate open-devstack production-requirements pull_translations quality requirements.js \
Expand Down Expand Up @@ -104,8 +105,17 @@ extract_translations: ## Extract strings to be translated, outputting .po and .m
cd course_discovery && PYTHONPATH="..:${PYTHONPATH}" django-admin.py compilemessages

# This Make target should not be removed since it is relied on by a Jenkins job (`edx-internal/tools-edx-jenkins/translation-jobs.yml`), using `ecommerce-scripts/transifex`.
ifeq ($(OPENEDX_ATLAS_PULL),)
pull_translations: ## Pull translations from Transifex
tx pull -a -f -t --mode reviewed --minimum-perc=1
else
# Experimental: OEP-58 Pulls translations using atlas
pull_translations:
find course_discovery/conf/locale -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;
cd course_discovery/conf \
&& atlas pull --filter=$(ATLAS_PULL_LANGS) \
translations/course-discovery/course_discovery/conf/locale:locale
endif

# This Make target should not be removed since it is relied on by a Jenkins job (`edx-internal/tools-edx-jenkins/translation-jobs.yml`), using `ecommerce-scripts/transifex`.
push_translations: ## Push source translation files (.po) to Transifex
Expand Down

0 comments on commit dd0fa2e

Please sign in to comment.