Merge branch 'DMOJ:master' into revamp #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: compilemessages | |
on: | |
push: | |
paths: | |
- 'locale/**' | |
pull_request: | |
paths: | |
- 'locale/**' | |
jobs: | |
compilemessages: | |
runs-on: blacksmith-4vcpu-ubuntu-2204 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.7 | |
uses: useblacksmith/setup-python@v6 | |
with: | |
python-version: '3.7' | |
- name: Checkout submodules | |
run: | | |
git submodule init | |
git submodule update | |
- name: Install requirements | |
run: | | |
sudo apt-get install gettext | |
pip install -r requirements.txt | |
pip install pymysql | |
- name: Check .po file validity | |
run: | | |
fail=0 | |
while read -r file; do | |
if ! msgfmt --check-format "$file"; then | |
fail=$((fail + 1)) | |
fi | |
done < <(find locale -name '*.po') | |
exit "$fail" | |
shell: bash | |
- name: Compile messages | |
run: | | |
echo "STATIC_ROOT = '/tmp'" > dmoj/local_settings.py | |
python manage.py compilemessages |