File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 3434 @echo " pot Create/Update POT files from source files"
3535 @echo " serve Serve a built documentation on http://localhost:8000"
3636 @echo " spell Check spelling, storing output in $( POSPELL_TMP_DIR) "
37+ @echo " progress To compute current progression on the tutorial"
3738 @echo " "
3839
3940
@@ -202,3 +203,7 @@ clean:
202203 rm -fr $(VENV )
203204 rm -rf $(POSPELL_TMP_DIR )
204205 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 11Sphinx == 2.2.0
22blurb
3+ polib
34pospell
45powrap
56python-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