diff --git a/README.rst b/README.rst index 14a53202a..8d936cd86 100644 --- a/README.rst +++ b/README.rst @@ -21,42 +21,61 @@ Maintained versions: * - Version - Sync status - Translation progress + - Total strings * - `3.13 `_ - .. image:: https://github.com/python/python-docs-pt-br/workflows/python-313/badge.svg :target: https://github.com/python/python-docs-pt-br/actions?workflow=python-313 - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-pt-br%2Fraw%2F3.13%2Fstats.json&query=translation&label=pt_BR :alt: Brazilian Portuguese translation status for Python 3.13 :target: https://app.transifex.com/python-doc/python-newest/ + - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Frffontenelle%2Fpython-docs-pt-br%2Fraw%2F3.13%2Fstats.json&query=total&label=3.13 + :alt: Total strings for Python 3.13 + :target: https://app.transifex.com/python-doc/python-newest/ * - `3.12 `_ - .. image:: https://github.com/python/python-docs-pt-br/workflows/python-312/badge.svg :target: https://github.com/python/python-docs-pt-br/actions?workflow=python-312 - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-pt-br%2Fraw%2F3.12%2Fstats.json&query=translation&label=pt_BR :alt: Brazilian Portuguese translation status for Python 3.12 :target: https://app.transifex.com/python-doc/python-312/ + - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Frffontenelle%2Fpython-docs-pt-br%2Fraw%2F3.12%2Fstats.json&query=total&label=3.12 + :alt: Total strings for Python 3.12 + :target: https://app.transifex.com/python-doc/python-312/ * - `3.11 `_ - .. image:: https://github.com/python/python-docs-pt-br/workflows/python-311/badge.svg :target: https://github.com/python/python-docs-pt-br/actions?workflow=python-311 - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-pt-br%2Fraw%2F3.11%2Fstats.json&query=translation&label=pt_BR :alt: Brazilian Portuguese translation status for Python 3.11 :target: https://app.transifex.com/python-doc/python-311/ + - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Frffontenelle%2Fpython-docs-pt-br%2Fraw%2F3.11%2Fstats.json&query=total&label=3.11 + :alt: Total strings for Python 3.11 + :target: https://app.transifex.com/python-doc/python-311/ * - `3.10 `_ - .. image:: https://github.com/python/python-docs-pt-br/workflows/python-310/badge.svg :target: https://github.com/python/python-docs-pt-br/actions?workflow=python-310 - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-pt-br%2Fraw%2F3.10%2Fstats.json&query=translation&label=pt_BR :alt: Brazilian Portuguese translation status for Python 3.10 :target: https://app.transifex.com/python-doc/python-310/ + - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Frffontenelle%2Fpython-docs-pt-br%2Fraw%2F3.10%2Fstats.json&query=total&label=3.10 + :alt: Total strings for Python 3.10 + :target: https://app.transifex.com/python-doc/python-310/ * - `3.9 `_ - .. image:: https://github.com/python/python-docs-pt-br/workflows/python-39/badge.svg :target: https://github.com/python/python-docs-pt-br/actions?workflow=python-39 - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-pt-br%2Fraw%2F3.9%2Fstats.json&query=translation&label=pt_BR :alt: Brazilian Portuguese translation status for Python 3.9 :target: https://app.transifex.com/python-doc/python-39/ + - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Frffontenelle%2Fpython-docs-pt-br%2Fraw%2F3.9%2Fstats.json&query=total&label=3.9 + :alt: Total strings for Python 3.9 + :target: https://app.transifex.com/python-doc/python-39/ * - `3.8 `_ - .. image:: https://github.com/python/python-docs-pt-br/workflows/python-38/badge.svg :target: https://github.com/python/python-docs-pt-br/actions?workflow=python-38 - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-pt-br%2Fraw%2F3.8%2Fstats.json&query=translation&label=pt_BR :alt: Brazilian Portuguese translation status for Python 3.8 :target: https://app.transifex.com/python-doc/python-38/ + - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Frffontenelle%2Fpython-docs-pt-br%2Fraw%2F3.8%2Fstats.json&query=total&label=3.8 + :alt: Total strings for Python 3.8 + :target: https://app.transifex.com/python-doc/python-38/ EOL versions: @@ -66,12 +85,16 @@ EOL versions: * - Version - Sync status - Translation progress + - Total strings * - `3.7 `_ - .. image:: https://github.com/python/python-docs-pt-br/workflows/python-37/badge.svg :target: https://github.com/python/python-docs-pt-br/actions?workflow=python-37 - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-pt-br%2Fraw%2F3.7%2Fstats.json&query=translation&label=pt_BR :alt: Brazilian Portuguese translation status for Python 3.7 :target: https://app.transifex.com/python-doc/python-37/ + - .. image:: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2Frffontenelle%2Fpython-docs-pt-br%2Fraw%2F3.7%2Fstats.json&query=total&label=3.7 + :alt: Total strings for Python 3.7 + :target: https://app.transifex.com/python-doc/python-37/ Translation priorities ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/scripts/tx_stats.py b/scripts/tx_stats.py index 92edb0ca6..1d6223b31 100755 --- a/scripts/tx_stats.py +++ b/scripts/tx_stats.py @@ -27,10 +27,11 @@ url = data['links'].get('next') for resourse in data['data']: translated = translated + resourse['attributes']['translated_strings'] - total = total + resourse['attributes']['total_strings'] + total = total + resourse['attributes']['total_strings'] p = '{:.2%}'.format(translated/total) print(json.dumps({ 'translation':p, + 'total':total, 'updated_at':datetime.now(timezone.utc).isoformat(timespec='seconds') + 'Z', }))