File tree 3 files changed +29
-0
lines changed
3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 34
34
@echo " pot Create/Update POT files from source files"
35
35
@echo " serve Serve a built documentation on http://localhost:8000"
36
36
@echo " spell Check spelling, storing output in $( POSPELL_TMP_DIR) "
37
+ @echo " progress To compute current progression on the tutorial"
37
38
@echo " "
38
39
39
40
@@ -202,3 +203,7 @@ clean:
202
203
rm -fr $(VENV )
203
204
rm -rf $(POSPELL_TMP_DIR )
204
205
find -name ' *.mo' -delete
206
+
207
+ .PHONY : progress
208
+ progress : venv
209
+ $(VENV ) /bin/python scripts/print_percentage.py
Original file line number Diff line number Diff line change 1
1
Sphinx == 2.2.0
2
2
blurb
3
+ polib
3
4
pospell
4
5
powrap
5
6
python-docs-theme
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+
3
+ import glob
4
+ import os
5
+
6
+ import polib # fades
7
+
8
+ PO_DIR = os .path .abspath (
9
+ os .path .join (
10
+ os .path .dirname (__file__ ),
11
+ '..' ,
12
+ ))
13
+
14
+
15
+ def main ():
16
+ for pofilename in glob .glob (PO_DIR + '**/tutorial/*.po' ):
17
+ po = polib .pofile (pofilename )
18
+ file_per = po .percent_translated ()
19
+ print (f"{ pofilename } ::: { file_per } %" )
20
+
21
+
22
+ if __name__ == "__main__" :
23
+ main ()
You can’t perform that action at this time.
0 commit comments