From 772c1d04ed7e30e300707f7d94f13aecb2f11bea Mon Sep 17 00:00:00 2001 From: thepetk Date: Sun, 31 Mar 2024 20:50:32 +0100 Subject: [PATCH 01/14] Translate about.po as test --- about.po | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/about.po b/about.po index dc19b72f..4c070975 100644 --- a/about.po +++ b/about.po @@ -9,22 +9,24 @@ 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 +35,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 +78,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 έχει τέτοια υπέροχα έγγραφα -- Σας ευχαριστούμε!" \ No newline at end of file From ef9480d927b4cc84e1dcaacc923a6db23f60fe40 Mon Sep 17 00:00:00 2001 From: thepetk Date: Sun, 31 Mar 2024 20:50:40 +0100 Subject: [PATCH 02/14] Update requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9e489c6e..2f149dea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -poutils==0.13.0 +poutils==0.15.4 +pospell==1.3 \ No newline at end of file From a64bb7ffacdc0c30aea7179097f5b1975e336fb6 Mon Sep 17 00:00:00 2001 From: thepetk Date: Sun, 31 Mar 2024 20:50:52 +0100 Subject: [PATCH 03/14] Update check_spelling --- scripts/check_spelling.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 From 8bc51f8782c7589edc96446cb8c25d49d8573f9f Mon Sep 17 00:00:00 2001 From: thepetk Date: Sun, 31 Mar 2024 20:51:15 +0100 Subject: [PATCH 04/14] Add about.txt dictionary --- dictionaries/about.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 dictionaries/about.txt 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 From 758df6e055f4cc830579863649b930589c6d2581 Mon Sep 17 00:00:00 2001 From: thepetk Date: Sun, 31 Mar 2024 20:51:22 +0100 Subject: [PATCH 05/14] add main workflow --- .github/workflows/main.yaml | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..0b013d70 --- /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.11" + 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: Muestra outputs de steps anteriores para debugueo + 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_spell.py ${{ steps.po-files-to-check.outputs.po_files_to_check }} From 6172db2ed3e138a293e488107ac531c67b8f1a30 Mon Sep 17 00:00:00 2001 From: thepetk Date: Sun, 31 Mar 2024 20:54:34 +0100 Subject: [PATCH 06/14] Rewrap about.po --- about.po | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/about.po b/about.po index 4c070975..2ae9b6a5 100644 --- a/about.po +++ b/about.po @@ -25,8 +25,9 @@ msgid "" "These documents are generated from `reStructuredText`_ sources by `Sphinx`_, " "a document processor specifically written for the Python documentation." msgstr "" -"Αυτά τα έγραφα έχουν δημιουργηθεί από τα `reStructuredText`_ sources του `Sphinx`_, " -"έναν επεξεργαστή εγγράφων που έχει δημιουργηθεί ειδικά για τα έγγραφα της Python." +"Αυτά τα έγραφα έχουν δημιουργηθεί από τα `reStructuredText`_ sources του " +"`Sphinx`_, έναν επεξεργαστή εγγράφων που έχει δημιουργηθεί ειδικά για τα " +"έγγραφα της Python." #: about.rst:15 msgid "" @@ -35,10 +36,10 @@ 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` για πληροφορίες σχετικές με το πως να το κάνετε. Οι νέοι " -"εθελοντές είναι πάντα ευπρόσδεκτοι!" +"Η ανάπτυξη των εγγράφων και των εργαλείων τους είναι εξ' ολοκλήρου " +"εθελοντική προσπάθεια, όπως και η ίδια η Python. Εάν θέλετε να συνεισφέρετε, " +"ρίξτε μια ματιά στη σελίδα :ref:`reporting-bugs` για πληροφορίες σχετικές με " +"το πως να το κάνετε. Οι νέοι εθελοντές είναι πάντα ευπρόσδεκτοι!" #: about.rst:20 msgid "Many thanks go to:" @@ -49,24 +50,24 @@ 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 " -"και συντάκτη αρκετού περιεχομένου'" +"Fred L. Drake, Jr., τον δημιουργό των αρχικών εργαλείων των εγγράφων της " +"Python και συντάκτη αρκετού περιεχομένου'" #: about.rst:24 msgid "" "the `Docutils `_ project for creating " "reStructuredText and the Docutils suite;" msgstr "" -"το `Docutils `_ πρότζεκτ για την δημιουργία των " -"εφαρμογών reStructuredText και Docutils'" +"το `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 " -"πήρε πολύ καλές ιδέες." +"Fredrik Lundh για το δικό του Alternative Python Reference πρότζεκτ από το " +"οποίο το Sphinx πήρε πολύ καλές ιδέες." #: about.rst:31 msgid "Contributors to the Python Documentation" @@ -78,14 +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 για τη μερική λίστα των συντελεστών." +"Πολλοί άνθρωποι έχουν συνεισφέρει στη γλώσσα 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 έχει τέτοια υπέροχα έγγραφα -- Σας ευχαριστούμε!" \ No newline at end of file +"Μόνο με τη συμβολή και τις συνεισφορές της κοινότητας της Python, η Python " +"έχει τέτοια υπέροχα έγγραφα -- Σας ευχαριστούμε!" From 25178aa74c83317abe4d93a2869536e23ad3eaa6 Mon Sep 17 00:00:00 2001 From: thepetk Date: Sun, 31 Mar 2024 20:56:53 +0100 Subject: [PATCH 07/14] fix workflow step --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0b013d70..e8421b38 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -66,4 +66,4 @@ jobs: 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_spell.py ${{ steps.po-files-to-check.outputs.po_files_to_check }} + run: python scripts/check_spelling.py ${{ steps.po-files-to-check.outputs.po_files_to_check }} From 8b237598cd94917d06217f942fbe32f331bd42e1 Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Tue, 2 Apr 2024 15:19:35 +0100 Subject: [PATCH 08/14] Update requirements.txt Co-authored-by: Lysandros Nikolaou --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2f149dea..0c8fcfbd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ poutils==0.15.4 -pospell==1.3 \ No newline at end of file +pospell==1.3 From c7b345aea64f65b7af204659c930b04937b7e858 Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Tue, 2 Apr 2024 15:19:46 +0100 Subject: [PATCH 09/14] Update .github/workflows/main.yaml Co-authored-by: Lysandros Nikolaou --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e8421b38..e560dffe 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -22,7 +22,7 @@ jobs: - name: Setup python uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: - python-version: "3.11" + python-version: "3.12" cache: "pip" - name: Configure dpkg/apt uses: abbbi/github-actions-tune@81fb919e588c20b7ab52b2cac097d2efd765c714 # v1 From bfe23894d4a8e3e2aef3c78ffa268c8b18cb5e36 Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Tue, 2 Apr 2024 15:20:06 +0100 Subject: [PATCH 10/14] Update about.po Co-authored-by: Lysandros Nikolaou --- about.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/about.po b/about.po index 2ae9b6a5..423ac64d 100644 --- a/about.po +++ b/about.po @@ -39,7 +39,7 @@ msgstr "" "Η ανάπτυξη των εγγράφων και των εργαλείων τους είναι εξ' ολοκλήρου " "εθελοντική προσπάθεια, όπως και η ίδια η Python. Εάν θέλετε να συνεισφέρετε, " "ρίξτε μια ματιά στη σελίδα :ref:`reporting-bugs` για πληροφορίες σχετικές με " -"το πως να το κάνετε. Οι νέοι εθελοντές είναι πάντα ευπρόσδεκτοι!" +"το πως να το κάνετε. Καινούριοι εθελοντές είναι πάντα ευπρόσδεκτοι!" #: about.rst:20 msgid "Many thanks go to:" From 3e6d3d19463fe2961eec5dc82fd2618e2fc49d7a Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Tue, 2 Apr 2024 15:20:18 +0100 Subject: [PATCH 11/14] Update about.po Co-authored-by: Lysandros Nikolaou --- about.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/about.po b/about.po index 423ac64d..6755ef2e 100644 --- a/about.po +++ b/about.po @@ -79,7 +79,7 @@ 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, και τα έγγραφα της Python. Δείτε :source:`Misc/ACKS` στις πηγές " "διανομής της Python για τη μερική λίστα των συντελεστών." From c7d972dc04a158264afced7ac27a7475f4d446db Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Tue, 2 Apr 2024 15:20:29 +0100 Subject: [PATCH 12/14] Update about.po Co-authored-by: Lysandros Nikolaou --- about.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/about.po b/about.po index 6755ef2e..d7f6cf12 100644 --- a/about.po +++ b/about.po @@ -81,7 +81,7 @@ msgid "" msgstr "" "Πολλοί άνθρωποι έχουν συνεισφέρει στη γλώσσα Python, την βιβλιοθήκη " "της Python, και τα έγγραφα της Python. Δείτε :source:`Misc/ACKS` στις πηγές " -"διανομής της Python για τη μερική λίστα των συντελεστών." +"διανομής της Python για μια λίστα των συντελεστών." #: about.rst:37 msgid "" From 88b9638bf444595d9b9d2e2b624c47a527f3c00f Mon Sep 17 00:00:00 2001 From: thepetk Date: Tue, 2 Apr 2024 15:28:12 +0100 Subject: [PATCH 13/14] Update workflow --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e560dffe..bd76799c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -54,7 +54,7 @@ jobs: 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: Muestra outputs de steps anteriores para debugueo + - 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) }} From a5c4c57d8d1b5121000644a30f00aa2771503b7f Mon Sep 17 00:00:00 2001 From: thepetk Date: Tue, 2 Apr 2024 15:31:58 +0100 Subject: [PATCH 14/14] Update about.po --- about.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/about.po b/about.po index d7f6cf12..1d3d5584 100644 --- a/about.po +++ b/about.po @@ -79,8 +79,8 @@ 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, την βιβλιοθήκη της " +"Python, και τα έγγραφα της Python. Δείτε :source:`Misc/ACKS` στις πηγές " "διανομής της Python για μια λίστα των συντελεστών." #: about.rst:37