-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (50 loc) · 1.49 KB
/
checkTranslatorsComments.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Check that all translatable strings have translators comments
on:
push:
# Run this workflow if push tag or in master branch
tags: ["*"]
branches: [ main , master ]
pull_request:
branches:
- main
workflow_dispatch:
jobs:
buildPotFileAndCheckTranslatorsComments:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install scons markdown
sudo apt update
sudo apt install gettext
- name: Generate the .pot file
run: scons pot
- name: Download NVDA's checkPot.py
run: curl https://raw.githubusercontent.com/nvaccess/nvda/master/tests/checkPot.py -O
- name: Run checkPot
id: runCheckPot
#run: |
# from . import checkPot
# checkPot.EXPECTED_MESSAGES_WITHOUT_COMMENTS = set()
# res = checkPot.checkPot('$(ls *.pot)')
# exit(res)
#shell: python
run: |
python -c "import checkPot;checkPot.EXPECTED_MESSAGES_WITHOUT_COMMENTS = set();exit(checkPot.checkPot('$(ls *.pot)'))"
echo "nb_errors=$?" >> "$GITHUB_OUTPUT"
- name: Notify
run: |
if [[ ${{ steps.runCheckPot.outputs.nb_errors }} == 0 ]];
then
echo "Translators comments: PASS"
exit 0;
else
echo "Translators comments: FAIL"
exit 1;
fi