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

feat: Special support for XBlocks #593

Merged
Merged
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
16 changes: 16 additions & 0 deletions .github/workflows/extract-translation-source-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,22 @@ jobs:
# extract_translations into EN_DIR and adds them
DJANGO_PATH=$(find $EN_DIR -name 'django.po')
DJANGOJS_PATH=$(find $EN_DIR -name 'djangojs.po')
############## Special support for XBlocks
# if both files are not found, then it can be an XBlock (thus, text.po and textjs.po files)
if [ -z "$DJANGO_PATH" ] && [ -z "$DJANGOJS_PATH" ]; then
DJANGO_PATH=$(find $EN_DIR -name 'text.po')
DJANGOJS_PATH=$(find $EN_DIR -name 'textjs.po')
# Rename the files to django.po and djangojs.po, if exists
if [ -n "$DJANGO_PATH" ]; then
mv $DJANGO_PATH $(dirname $DJANGO_PATH)/django.po
DJANGO_PATH=$(dirname $DJANGO_PATH)/django.po
fi
if [ -n "$DJANGOJS_PATH" ]; then
mv $DJANGOJS_PATH $(dirname $DJANGOJS_PATH)/djangojs.po
DJANGOJS_PATH=$(dirname $DJANGOJS_PATH)/djangojs.po
fi
fi
############## End of - Special support for XBlocks
# use (-f) to force add the files even if they are ignored in the source repo
git add $DJANGO_PATH $DJANGOJS_PATH -f -v
# Check the git statuses of the translation source files
Expand Down