File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 17
17
repo = g .get_repo ('PyCampES/python-docs-es' )
18
18
19
19
20
- issues = repo .get_issues (state = 'open ' )
20
+ issues = repo .get_issues (state = 'all ' )
21
21
for issue in issues :
22
22
if pofilename in issue .title :
23
+
24
+ print (f'Skipping { pofilename } . There is a similar issue already created at { issue .html_url } ' )
25
+ sys .exit (1 )
26
+
23
27
msg = f'There is a similar issue already created at { issue .html_url } .\n Do you want to create it anyways? [y/N] '
24
28
answer = input (msg )
25
29
if answer != 'y' :
26
30
sys .exit (1 )
27
31
32
+ if any ([
33
+ pofile .translated_nb == pofile .po_file_size ,
34
+ pofile .untranslated_nb == 0 ,
35
+ ]):
36
+ print (f'Skipping { pofilename } . The file is 100% translated already.' )
37
+ sys .exit (1 )
38
+
28
39
# https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html#github.Repository.Repository.create_issue
29
40
issue = repo .create_issue (
30
41
title = f'Translate `{ pofilename } `' ,
You can’t perform that action at this time.
0 commit comments