diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..bd76799c --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,69 @@ +name: Test + +on: + push: + branches: + - 3.* + - main + pull_request: + +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + submodules: "true" + fetch-depth: 2 + - name: Setup python + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + with: + python-version: "3.12" + cache: "pip" + - name: Configure dpkg/apt + uses: abbbi/github-actions-tune@81fb919e588c20b7ab52b2cac097d2efd765c714 # v1 + - name: Disable triggers from postgresql-common + run: sudo sed -i '/postgresql-common/d' /var/lib/dpkg/triggers/File + - name: Install system deps + run: | + sudo apt-get update + sudo apt-get install -y hunspell hunspell-el gettext language-pack-el locales-all + - name: Install python deps + run: | + python -m pip install -r requirements.txt + - name: List packages and versions + run: | + pip list + pospell --version + powrap --version + - name: Get list with updated .po archives (PR-only) + if: github.event_name == 'pull_request' + id: changed-po-files + uses: tj-actions/changed-files@2d756ea4c53f7f6b397767d8723b3a10a9f35bf2 # v44 + with: + files: | + **/*.po + - name: Create list with .po files to check + id: po-files-to-check + env: + PO_FILES_TO_CHECK: ${{ steps.changed-po-files.conclusion == 'skipped' && '**/*.po' || steps.changed-po-files.outputs.all_changed_files }} + run: | + echo "po_files_to_check=$PO_FILES_TO_CHECK" >> $GITHUB_OUTPUT + echo "any_po_files_to_check=`test -n \"$PO_FILES_TO_CHECK\" && echo true || echo false`" >> $GITHUB_OUTPUT + - name: Show outputs of the previous steps for debuging purposes + env: + CHANGED_PO_FILES: ${{ toJson(steps.changed-po-files) }} + PO_FILES_TO_CHECK: ${{ toJson(steps.po-files-to-check) }} + run: | + echo "steps.changed-po-files=$PO_FILES_TO_CHECK" + echo "steps.po-files-to-change.$CHANGED_PO_FILES" + - name: Powrap + if: steps.po-files-to-check.outputs.any_po_files_to_check == 'true' + run: powrap --check --quiet ${{ steps.po-files-to-check.outputs.po_files_to_check }} + - name: Pospell + if: steps.po-files-to-check.outputs.any_po_files_to_check == 'true' + run: python scripts/check_spelling.py ${{ steps.po-files-to-check.outputs.po_files_to_check }} diff --git a/about.po b/about.po index dc19b72f..1d3d5584 100644 --- a/about.po +++ b/about.po @@ -9,22 +9,25 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-03-14 12:51+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2024-03-31 19:50+0000\n" +"Last-Translator: Theofanis Petkos \n" +"Language-Team: PyGreece \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: about.rst:3 msgid "About these documents" -msgstr "" +msgstr "Σχετικά με τα έγγραφα" #: about.rst:6 msgid "" "These documents are generated from `reStructuredText`_ sources by `Sphinx`_, " "a document processor specifically written for the Python documentation." msgstr "" +"Αυτά τα έγραφα έχουν δημιουργηθεί από τα `reStructuredText`_ sources του " +"`Sphinx`_, έναν επεξεργαστή εγγράφων που έχει δημιουργηθεί ειδικά για τα " +"έγγραφα της Python." #: about.rst:15 msgid "" @@ -33,32 +36,42 @@ msgid "" "look at the :ref:`reporting-bugs` page for information on how to do so. New " "volunteers are always welcome!" msgstr "" +"Η ανάπτυξη των εγγράφων και των εργαλείων τους είναι εξ' ολοκλήρου " +"εθελοντική προσπάθεια, όπως και η ίδια η Python. Εάν θέλετε να συνεισφέρετε, " +"ρίξτε μια ματιά στη σελίδα :ref:`reporting-bugs` για πληροφορίες σχετικές με " +"το πως να το κάνετε. Καινούριοι εθελοντές είναι πάντα ευπρόσδεκτοι!" #: about.rst:20 msgid "Many thanks go to:" -msgstr "" +msgstr "Πολλές ευχαριστίες πηγαίνουν στους:" #: about.rst:22 msgid "" "Fred L. Drake, Jr., the creator of the original Python documentation toolset " "and writer of much of the content;" msgstr "" +"Fred L. Drake, Jr., τον δημιουργό των αρχικών εργαλείων των εγγράφων της " +"Python και συντάκτη αρκετού περιεχομένου'" #: about.rst:24 msgid "" "the `Docutils `_ project for creating " "reStructuredText and the Docutils suite;" msgstr "" +"το `Docutils `_ πρότζεκτ για την " +"δημιουργία των εφαρμογών reStructuredText και Docutils'" #: about.rst:26 msgid "" "Fredrik Lundh for his Alternative Python Reference project from which Sphinx " "got many good ideas." msgstr "" +"Fredrik Lundh για το δικό του Alternative Python Reference πρότζεκτ από το " +"οποίο το Sphinx πήρε πολύ καλές ιδέες." #: about.rst:31 msgid "Contributors to the Python Documentation" -msgstr "" +msgstr "Συντελεστές στα έγγραφα της Python" #: about.rst:33 msgid "" @@ -66,9 +79,14 @@ msgid "" "library, and the Python documentation. See :source:`Misc/ACKS` in the " "Python source distribution for a partial list of contributors." msgstr "" +"Πολλοί άνθρωποι έχουν συνεισφέρει στη γλώσσα Python, την βιβλιοθήκη της " +"Python, και τα έγγραφα της Python. Δείτε :source:`Misc/ACKS` στις πηγές " +"διανομής της Python για μια λίστα των συντελεστών." #: about.rst:37 msgid "" "It is only with the input and contributions of the Python community that " "Python has such wonderful documentation -- Thank You!" msgstr "" +"Μόνο με τη συμβολή και τις συνεισφορές της κοινότητας της Python, η Python " +"έχει τέτοια υπέροχα έγγραφα -- Σας ευχαριστούμε!" diff --git a/dictionaries/about.txt b/dictionaries/about.txt new file mode 100644 index 00000000..083b700b --- /dev/null +++ b/dictionaries/about.txt @@ -0,0 +1 @@ +L \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 9e489c6e..0c8fcfbd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -poutils==0.13.0 +poutils==0.15.4 +pospell==1.3 diff --git a/scripts/check_spelling.py b/scripts/check_spelling.py index ec30e77d..2bad7d96 100644 --- a/scripts/check_spelling.py +++ b/scripts/check_spelling.py @@ -34,17 +34,18 @@ def check_spell(po_files=None): ) # Write merged dictionary file - 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") + with tempfile.NamedTemporaryFile(suffix="_merged_dict.txt") as named_tmp_file: + for e in entries: + named_tmp_file.write(f"{e}\n".encode()) + named_tmp_file.flush() + named_tmp_file.seek(0) # 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" + po_files, personal_dict=named_tmp_file.name, language="el_GR" ) return detected_errors