Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

show tutorial progress#32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gilgamezh merged 2 commits into3.7fromshow_tutorial_progress
May 2, 2020
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionsMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff 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 DownExpand 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 deletionsrequirements.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
Sphinx==2.2.0
blurb
polib
pospell
powrap
python-docs-theme
Expand Down
23 changes: 23 additions & 0 deletionsscripts/print_percentage.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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()

[8]ページ先頭

©2009-2025 Movatter.jp