Skip to content

Commit

Permalink
fix: non-relevant directories are added if conf/locale is missing
Browse files Browse the repository at this point in the history
When python-translations is processed; we can have non-relevant directories added
to the translation directory if `make extract_translations` did not generate
the proper English directory at conf/locale

Refs: FC-0012 OEP-58
  • Loading branch information
shadinaif committed Jul 20, 2023
1 parent 03ae5e0 commit 9d9a4cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/extract-translation-source-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ jobs:
# finds the directory containing the english locale usually located in
# */*/conf/locale/en
EN_DIR=$(find . -type d -regex ".+conf\/locale\/en$")
# If the directory is not found, exit with an error. This can happen if we add a repository that doesn't
# comply with OEP-58, or it still doesn't have any translations yet
if [ -z "$EN_DIR" ]; then
echo "Missing English locale directory for ${{ matrix.repo.repo_name }}!"
echo "exiting with error!"
exit 1
fi
# remove translations/${{ matrix.repo.repo_name }}/.git so we don't commit a submodule
rm -rf .git
# finds the django.po and djangojs.po files generated by make
Expand Down

0 comments on commit 9d9a4cf

Please sign in to comment.