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

Commitb933497

Browse files
authored
Merge pull request#88 from PyCampES/script-create-issues
2 parents92607b0 +b1d75fd commitb933497

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

‎scripts/create_issue.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
importos
2+
importsys
3+
4+
importpolib
5+
fromgithubimportGithub
6+
7+
8+
iflen(sys.argv)!=2:
9+
print('Specify PO filename')
10+
sys.exit(1)
11+
12+
pofilename=sys.argv[1]
13+
percentage=polib.pofile(pofilename).percent_translated()
14+
15+
g=Github(os.environ.get('GITHUB_TOKEN'))
16+
17+
repo=g.get_repo('PyCampES/python-docs-es')
18+
# https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html#github.Repository.Repository.create_issue
19+
issue=repo.create_issue(
20+
title=f'Translate `{pofilename}`',
21+
body=f'''This file is at{percentage}% translated. It needs to reach 100% translated.
22+
23+
Please, comment here if you want this file to be assigned to you and an member will assign it to you as soon as possible, so you can start working on it.
24+
25+
Remember to follow the steps in our [Contributing Guide](https://python-docs-es.readthedocs.io/es/3.7/CONTRIBUTING.html)''',
26+
)
27+
print(f'Issue created at{issue.html_url}')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp