Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ help:
@echo " pot Create/Update POT files from source files"
@echo " serve Serve a built documentation on http://localhost:8000"
@echo " spell Check spelling, storing output in $(POSPELL_TMP_DIR)"
@echo " progress To compute current progression on the tutorial"
@echo ""


Expand Down Expand Up @@ -202,3 +203,7 @@ clean:
rm -fr $(VENV)
rm -rf $(POSPELL_TMP_DIR)
find -name '*.mo' -delete

.PHONY: progress
progress: venv
$(VENV)/bin/python scripts/print_percentage.py
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Sphinx==2.2.0
blurb
polib
pospell
powrap
python-docs-theme
Expand Down
23 changes: 23 additions & 0 deletions scripts/print_percentage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python

import glob
import os

import polib # fades

PO_DIR = os.path.abspath(
os.path.join(
os.path.dirname(__file__),
'..',
))


def main():
for pofilename in glob.glob(PO_DIR + '**/tutorial/*.po'):
po = polib.pofile(pofilename)
file_per = po.percent_translated()
print(f"{pofilename} ::: {file_per}%")


if __name__ == "__main__":
main()