File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1717repo = g .get_repo ('PyCampES/python-docs-es' )
1818
1919
20- issues = repo .get_issues (state = 'open ' )
20+ issues = repo .get_issues (state = 'all ' )
2121for issue in issues :
2222 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+
2327 msg = f'There is a similar issue already created at { issue .html_url } .\n Do you want to create it anyways? [y/N] '
2428 answer = input (msg )
2529 if answer != 'y' :
2630 sys .exit (1 )
2731
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+
2839# https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html#github.Repository.Repository.create_issue
2940issue = repo .create_issue (
3041 title = f'Translate `{ pofilename } `' ,
You can’t perform that action at this time.
0 commit comments