diff --git a/.github/workflows/update-chart.yml b/.github/workflows/update-chart.yml deleted file mode 100644 index b7fc155a71..0000000000 --- a/.github/workflows/update-chart.yml +++ /dev/null @@ -1,23 +0,0 @@ -on: - workflow_dispatch: -jobs: - update-chart: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-python@master - with: - python-version: 3 - - run: pip install gitpython matplotlib - - uses: actions/checkout@master - with: - ref: '3.13' - fetch-depth: 0 - - run: python update_switcher_chart.py - - run: git config --local user.email github-actions@github.com - - run: git config --local user.name "GitHub Action's update-chart job" - - run: git add . - - run: git commit -m 'Update language switcher progress chart' || return 0 - - uses: ad-m/github-push-action@master - with: - branch: '3.13' - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-lint-and-build.yml b/.github/workflows/update-lint-and-build.yml index 48efabf4bf..e25bb63e41 100644 --- a/.github/workflows/update-lint-and-build.yml +++ b/.github/workflows/update-lint-and-build.yml @@ -49,24 +49,9 @@ jobs: # Check for changes in README.md - run: > ! git diff -I'^"POT-Creation-Date: ' -I'^"Language-Team: ' -I'^# Copyright (C) 2001-' --exit-code && echo "SIGNIFICANT_CHANGES=1" >> $GITHUB_ENV || exit 0 - - run: > - ! git diff -G'\!\[[0-9]{2,3}\.[0-9]{2}% przełącznika języków\]' --exit-code README.md && echo "SWITCHER_PROGRESS=1" >> $GITHUB_ENV || exit 0 - run: git add . - run: git commit -m 'Update translation from Transifex' if: env.SIGNIFICANT_CHANGES - - run: pip install gitpython matplotlib - if: env.SWITCHER_PROGRESS - - run: python update_switcher_chart.py - if: env.SWITCHER_PROGRESS - - run: git add . - if: env.SWITCHER_PROGRESS - - run: git commit -m 'Update switcher progress chart' - if: env.SWITCHER_PROGRESS - - uses: ad-m/github-push-action@master - if: env.SIGNIFICANT_CHANGES - with: - branch: ${{ matrix.version }} - github_token: ${{ secrets.GITHUB_TOKEN }} - uses: peter-evans/repository-dispatch@main with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.en.md b/README.en.md index a097de1873..a125a8f4be 100644 --- a/README.en.md +++ b/README.en.md @@ -4,18 +4,15 @@ Polish Translation of Python Documentation from manage_translation import get_resource_language_stats, progress_from_resources, language_switcher, get_number_of_translators stats = get_resource_language_stats() -switcher = progress_from_resources(filter(language_switcher, stats)) total = progress_from_resources(stats) translators = get_number_of_translators() print( f'''![build](https://github.com/python/python-docs-pl/workflows/.github/workflows/update-lint-and-build.yml/badge.svg) -![{switcher:.2f}% Language Switcher](https://img.shields.io/badge/language_switcher-{switcher:.2f}%25-0.svg) ![Total Translation of Documentation](https://img.shields.io/badge/Total-{total:.2f}%25-0.svg) ![{translators} Translators](https://img.shields.io/badge/Translators-{translators}-0.svg)''') ]]] --> ![build](https://github.com/python/python-docs-pl/workflows/.github/workflows/update-lint-and-build.yml/badge.svg) -![100.00% Language Switcher](https://img.shields.io/badge/language_switcher-100.00%25-0.svg) ![Total Translation of Documentation](https://img.shields.io/badge/Total-4.41%25-0.svg) ![24 Translators](https://img.shields.io/badge/Translators-24-0.svg) @@ -32,17 +29,7 @@ If you find a mistake or have a suggestion, * After joining the Project, pick the category you want to fix/translate. You can find more information about using Transifex -[in their help guide.](https://help.transifex.com/en/articles/6318216-translating-with-the-web-editor). - -**Translation Progress** - -![translation progress till Polish is added to the language switcher](language-switcher-progress.svg) - -The Polish language will appear in the language switcher in docs.python.org, -[when these categories will be fully translated](https://www.python.org/dev/peps/pep-0545/#add-translation-to-the-language-switcher): -* `bugs`, -* Everything in the `tutorial` section, -* `library/functions`. +[in their help guide.](https://help.transifex.com/en/articles/6318216-translating-with-the-web-editor) **How to see the newest build of the documentation?** diff --git a/README.md b/README.md index 802e524797..8d0d47a05b 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,18 @@ Polskie tłumaczenie dokumentacji Pythona ======================================== ![build](https://github.com/python/python-docs-pl/workflows/.github/workflows/update-lint-and-build.yml/badge.svg) -![100.00% przełącznika języków](https://img.shields.io/badge/przełącznik_języków-100.00%25-0.svg) ![postęp tłumaczenia całości dokumentacji](https://img.shields.io/badge/całość-4.41%25-0.svg) ![24 tłumaczy](https://img.shields.io/badge/tłumaczy-24-0.svg) @@ -31,23 +28,11 @@ projektu [dokumentacji Pythona](https://explore.transifex.com/python-doc/python- * Naciśnij przycisk „Join this project”, aby dołączyć do projektu. * Utwórz konto Transifex. * Na stronie projektu wybierz język polski. -* Po dołączeniu do zespołu, wybierz zasób, który chcesz poprawić/zaktualizować. +* Po dołączeniu do zespołu wybierz zasób, który chcesz poprawić/zaktualizować. Więcej informacji o używaniu Transifeksa znajdziesz w [jego artykułach pomocy](https://help.transifex.com/en/articles/6318216-translating-with-the-web-editor). -**Postęp tłumaczenia** - -![postęp tłumaczenia do przełącznika języków](language-switcher-progress.svg) - -Język polski pojawi się w przełączniku języków na docs.python.org, -[kiedy w pełni przetłumaczone będą](https://www.python.org/dev/peps/pep-0545/#add-translation-to-the-language-switcher): -* `bugs`, -* wszystkie zasoby z katalogu `tutorial`, -* `library/functions`. - -[Kliknij tutaj, aby zobaczyć co pozostało do przetłumaczenia.](https://github.com/python/python-docs-pl/issues/3) - **Jak obejrzeć najnowszy build dokumentacji?** Pobierz ostatnią zbudowaną dokumentację z listy artefaktów w ostatniej GitHub Action (zakładka Actions). diff --git a/language-switcher-progress.svg b/language-switcher-progress.svg deleted file mode 100644 index b482838597..0000000000 --- a/language-switcher-progress.svg +++ /dev/null @@ -1,1605 +0,0 @@ - - - - - - - - 2024-12-27T16:42:05.910012 - image/svg+xml - - - Matplotlib v3.10.0, https://matplotlib.org/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/update_switcher_chart.py b/update_switcher_chart.py index 17cb87cbc1..7ddca16b3f 100644 --- a/update_switcher_chart.py +++ b/update_switcher_chart.py @@ -1,3 +1,5 @@ +# EOL code, saving as this can be repurposed for a chart with the total translation progress + from datetime import datetime from re import search