From f858a7ab7ab56bb987f7520f9e29fda218c024d7 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Wed, 27 Mar 2024 12:48:18 +0100 Subject: [PATCH] Link to CONTRIBUTING.md from README & minor fixes to spell check script --- CONTRIBUTING.md | 2 +- README.md | 8 +++++++- scripts/check_spelling.py | 24 ++++++++++++------------ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 758eb3d7..8610aa40 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Οδηγός συνεισφοράς στο πρότζεκτ Python-Doc-Gr της κοινότητας PyGreece +# Οδηγός συνεισφοράς στο πρότζεκτ Python-Docs-Gr της κοινότητας PyGreece Eυχαριστούμε πολύ για το ενδιαφέρον σας να συμμετέχετε στη μετάφραση των επίσημων εγγράφων της Python στα Ελληνικά! diff --git a/README.md b/README.md index c975c7b4..d27afb21 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # python-docs-gr -Greek Translation of the Python Documentation + +Μετάφραση στα Ελληνικά του οδηγού χρήσης της Python + +### Πώς μπορώ να συνεισφέρω; + +Για περισσότερες πληροφορίες για το πώς μπορείτε να συνεισφέρετε στην μετάφραση στα Ελληνικά, +δείτε το αρχείο [CONTRIBUTING.md](./CONTRIBUTING.md). ### Συμφωνητικό Συνεισφοράς στην Μετάφραση των Εγγράφων diff --git a/scripts/check_spelling.py b/scripts/check_spelling.py index 33cd2b2f..ec30e77d 100644 --- a/scripts/check_spelling.py +++ b/scripts/check_spelling.py @@ -34,18 +34,18 @@ def check_spell(po_files=None): ) # Write merged dictionary file - output_filename = tempfile.mktemp(suffix="_merged_dict.txt") - with open(output_filename, "w") as f: - for e in entries: - f.write(f"{e}\n") - - # Run pospell either against all files or the file given on the command line - if not po_files: - po_files = Path(".").glob("*/*.po") - - detected_errors = pospell.spell_check( - po_files, personal_dict=output_filename, language="el_EL" - ) + with tempfile.NamedTemporaryFile(suffix="_merged_dict.txt") as output_filename: + with open(output_filename, "w") as f: + for e in entries: + f.write(f"{e}\n") + + # Run pospell either against all files or the file given on the command line + if not po_files: + po_files = Path(".").glob("*/*.po") + + detected_errors = pospell.spell_check( + po_files, personal_dict=output_filename, language="el_EL" + ) return detected_errors