Cloned DMOJ
This commit is contained in:
parent
f623974b58
commit
49dc9ff10c
513 changed files with 132349 additions and 39 deletions
53
.github/workflows/makemessages.yml
vendored
Normal file
53
.github/workflows/makemessages.yml
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: makemessages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
makemessages:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Checkout submodules
|
||||
run: |
|
||||
git submodule init
|
||||
git submodule update
|
||||
- name: Install requirements
|
||||
run: |
|
||||
sudo apt-get install gettext
|
||||
curl -O https://artifacts.crowdin.com/repo/deb/crowdin.deb
|
||||
sudo dpkg -i crowdin.deb
|
||||
pip install -r requirements.txt
|
||||
pip install pymysql
|
||||
- name: Collect localizable strings
|
||||
run: |
|
||||
echo "STATIC_ROOT = '/tmp'" > dmoj/local_settings.py
|
||||
python manage.py makemessages -l en -e py,html,txt
|
||||
python manage.py makemessages -l en -d djangojs
|
||||
- name: Upload strings to Crowdin
|
||||
env:
|
||||
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
|
||||
run: |
|
||||
cat > crowdin.yaml <<EOF
|
||||
project_identifier: dmoj
|
||||
|
||||
files:
|
||||
- source: /locale/en/LC_MESSAGES/django.po
|
||||
translation: /locale/%two_letters_code%/LC_MESSAGES/django.po
|
||||
languages_mapping:
|
||||
two_letters_code:
|
||||
zh-CN: zh_Hans
|
||||
sr-CS: sr_Latn
|
||||
- source: /locale/en/LC_MESSAGES/djangojs.po
|
||||
translation: /locale/%two_letters_code%/LC_MESSAGES/djangojs.po
|
||||
languages_mapping:
|
||||
two_letters_code:
|
||||
zh-CN: zh_Hans
|
||||
sr-CS: sr_Latn
|
||||
EOF
|
||||
echo "api_key: ${CROWDIN_API_TOKEN}" >> crowdin.yaml
|
||||
crowdin upload sources
|
Loading…
Add table
Add a link
Reference in a new issue