Skip to content

Commit 10a680c

Browse files
authored
Link to CONTRIBUTING.md from README & minor fixes to spell check script (#12)
1 parent dee7d32 commit 10a680c

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Οδηγός συνεισφοράς στο πρότζεκτ Python-Doc-Gr της κοινότητας PyGreece
1+
# Οδηγός συνεισφοράς στο πρότζεκτ Python-Docs-Gr της κοινότητας PyGreece
22

33
Eυχαριστούμε πολύ για το ενδιαφέρον σας να συμμετέχετε στη μετάφραση των επίσημων εγγράφων της Python στα Ελληνικά!
44

scripts/check_spelling.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ def check_spell(po_files=None):
3434
)
3535

3636
# Write merged dictionary file
37-
output_filename = tempfile.mktemp(suffix="_merged_dict.txt")
38-
with open(output_filename, "w") as f:
39-
for e in entries:
40-
f.write(f"{e}\n")
41-
42-
# Run pospell either against all files or the file given on the command line
43-
if not po_files:
44-
po_files = Path(".").glob("*/*.po")
45-
46-
detected_errors = pospell.spell_check(
47-
po_files, personal_dict=output_filename, language="el_EL"
48-
)
37+
with tempfile.NamedTemporaryFile(suffix="_merged_dict.txt") as output_filename:
38+
with open(output_filename, "w") as f:
39+
for e in entries:
40+
f.write(f"{e}\n")
41+
42+
# Run pospell either against all files or the file given on the command line
43+
if not po_files:
44+
po_files = Path(".").glob("*/*.po")
45+
46+
detected_errors = pospell.spell_check(
47+
po_files, personal_dict=output_filename, language="el_EL"
48+
)
4949
return detected_errors
5050

5151

0 commit comments

Comments
 (0)