Skip to content

Commit

Permalink
feat!: remove Transifex calls for FC-0012 - OEP-58 (#34355)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarIthawi committed Mar 14, 2024
1 parent 4659103 commit a10fce3
Show file tree
Hide file tree
Showing 296 changed files with 10 additions and 1,309,443 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ conf/locale/fake*/LC_MESSAGES/*.mo
# this was a mistake in i18n_tools, now fixed.
conf/locale/messages.mo
conf/plugins-locale/
conf/locale/*/LC_MESSAGES/
/*/static/js/i18n/
/*/static/js/xblock.v1-i18n/

### Testing artifacts
Expand Down
69 changes: 0 additions & 69 deletions .tx/config

This file was deleted.

36 changes: 5 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,60 +38,34 @@ technical-docs: ## build the technical docs
guides: swagger ## build the developer guide docs
cd docs/guides; make clean html

# (IS_OPENEDX_TRANSLATIONS_WORKFLOW) is set to "yes" in the `extract-translation-source-files` GitHub actions
# workflow on the `openedx-translations` repository. See (extract translation source files) step here:
# https://github.com/openedx/openedx-translations/blob/main/.github/workflows/extract-translation-source-files.yml
# Related doc: https://docs.openedx.org/en/latest/developers/how-tos/enable-translations-new-repo.html
ifeq ($(IS_OPENEDX_TRANSLATIONS_WORKFLOW),yes)
extract_translations: ## extract localizable strings from sources
i18n_tool extract --no-segment -v
cd conf/locale/en/LC_MESSAGES && msgcat djangojs.po underscore.po -o djangojs.po
cd conf/locale/en/LC_MESSAGES && msgcat django.po wiki.po edx_proctoring_proctortrack.po mako.po -o django.po
cd conf/locale/en/LC_MESSAGES && rm wiki.po edx_proctoring_proctortrack.po mako.po underscore.po
else
extract_translations: ## extract localizable strings from sources
i18n_tool extract -v;
endif

push_translations: ## push source strings to Transifex for translation
i18n_tool transifex push

pull_plugin_translations: ## Pull translations for edx_django_utils.plugins for both lms and cms
rm -rf conf/plugins-locale/plugins # Clean up existing atlas translations
mkdir -p conf/plugins-locale/plugins
python manage.py lms pull_plugin_translations --verbose $(ATLAS_OPTIONS)
python manage.py lms compile_plugin_translations

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
python manage.py lms pull_xblock_translations --verbose $(ATLAS_OPTIONS)
python manage.py lms compile_xblock_translations
python manage.py cms compile_xblock_translations

pull_translations: ## pull translations from Transifex
git clean -fdX conf/locale conf/plugins-locale/studio-frontend
ifeq ($(OPENEDX_ATLAS_PULL),)
i18n_tool transifex pull
i18n_tool extract
i18n_tool dummy
i18n_tool generate --verbose 1
git clean -fdX conf/locale/rtl
git clean -fdX conf/locale/eo
i18n_tool validate --verbose
else
pull_translations: ## pull translations via atlas
# Clean up the existing translations
git clean -fdX conf/locale conf/plugins-locale */static/js/i18n/ */static/js/xblock.v1-i18n/

make pull_xblock_translations
make pull_plugin_translations
find conf/locale -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;
atlas pull $(ATLAS_OPTIONS) \
translations/edx-platform/conf/locale:conf/locale \
translations/studio-frontend/src/i18n/messages:conf/plugins-locale/studio-frontend
i18n_tool generate
endif
python manage.py lms compilemessages
python manage.py lms compilejsi18n
python manage.py cms compilejsi18n


detect_changed_source_translations: ## check if translation files are up-to-date
i18n_tool changed

Expand Down
130 changes: 0 additions & 130 deletions cms/static/js/i18n/am/djangojs.js

This file was deleted.

Loading

0 comments on commit a10fce3

Please sign in to comment.