From d8ddc7295cef4791ba4bfd5a8d2b1a597e5e6f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Mon, 17 Nov 2025 15:22:37 -0500 Subject: [PATCH 1/4] avoid identical text for all links --- templates/index.html.jinja | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/index.html.jinja b/templates/index.html.jinja index 904ed59a3..5e8a0ebf9 100644 --- a/templates/index.html.jinja +++ b/templates/index.html.jinja @@ -14,15 +14,15 @@

{% if project.built %} - View + View {{ project.language.name }} • {% endif %} {% if project.contribution_link %} - Contribute + Contribute to {{ project.language.name }} {% elif project.uses_platform %} - Contribute + Contribute to {{ project.language.name }} {% else %} - Contribute + Contribute to {{ project.language.name }} {% endif %}

From 52d48ac7ac80e9666095245e4e926211e77ce41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Dec 2025 16:58:08 -0500 Subject: [PATCH 2/4] rework things - move logic from template to code - use list instead of decorative characters (style tbd) - use aria labels to distinguish identical links --- contribute.py | 1 + generate.py | 2 -- templates/index.html.jinja | 20 +++++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/contribute.py b/contribute.py index 568d99a08..aa38bd5d0 100644 --- a/contribute.py +++ b/contribute.py @@ -22,4 +22,5 @@ def get_contrib_link(language: str, repo: str | None) -> str | None: and 'https://explore.transifex.com/python-doc/python-newest/' ) or (repo and f'https://github.com/{repo}') + or 'https://devguide.python.org/documentation/translations/translating/' ) diff --git a/generate.py b/generate.py index 88d05e8ad..7aaa1e9ea 100644 --- a/generate.py +++ b/generate.py @@ -81,7 +81,6 @@ def get_project_data( change, built, translated_name=languages_built.get(language.code, ''), - uses_platform=language.code in contribute.pulling_from_transifex, contribution_link=contribute.get_contrib_link(language.code, repo), ) @@ -95,7 +94,6 @@ class LanguageProjectData: change: float built: bool translated_name: str - uses_platform: bool contribution_link: str | None diff --git a/templates/index.html.jinja b/templates/index.html.jinja index a151411cd..1a57a7d96 100644 --- a/templates/index.html.jinja +++ b/templates/index.html.jinja @@ -13,17 +13,19 @@

30-day progress: {{ '{:.2f}%'.format(project.change) }}

+