Skip to content

Commit

Permalink
move to pybabel
Browse files Browse the repository at this point in the history
  • Loading branch information
shun2wang committed Dec 17, 2023
1 parent 58aa130 commit e1bbfc5
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/translation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,26 @@ jobs:
with:
python-version: "3.10"

- name: Update .po tiles
run: |
sudo pip install Babel
set -x
find -name messages.pot
messages_pot=$(find -name messages.pot)
pybabel update --input-file="$messages_pot" --output-dir="${{ github.workspace }}/psychopy/app/locale"
# - name: Update .po tiles
# run: |
# sudo pip install Babel
# set -x
# find -name messages.pot
# messages_pot=$(find -name messages.pot)
# pybabel update --input-file="$messages_pot" --output-dir="${{ github.workspace }}/psychopy/app/locale"

# - name: Compiling .mo files
# run: |
# set -x
# for x in ${{ github.workspace }}/psychopy/app/locale/*/*/*.po ;\
# do python3 .github/workflows/msgfmt.py --output-file "`dirname "$x"`/`basename "$x" .po`.mo" "$x" ; \
# done

- name: Compiling .mo files
run: |
set -x
for x in ${{ github.workspace }}/psychopy/app/locale/*/*/*.po ;\
do python3 .github/workflows/msgfmt.py --output-file "`dirname "$x"`/`basename "$x" .po`.mo" "$x" ; \
do pybabel compile -i $x ; \
done
- name: Stage all changes
Expand Down

0 comments on commit e1bbfc5

Please sign in to comment.