File tree Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 5454 if : github.event_name == 'pull_request'
5555 run : |
5656 curl -Lo index.html-public https://github.com/python-docs-translations/dashboard/raw/refs/heads/gh-pages/index.html
57- diff --color=always -u index.html-public index.html || :
58- cat index.html
57+ diff --color=always -u index.html-public build/ index.html || :
58+ cat build/ index.html
5959 - run : uv run generate_metadata.py # generates metadata.html
6060 - run : cp metadata.html warnings* build
6161 - name : Deploy metadata view 🚀
Original file line number Diff line number Diff line change 1515import build_status
1616import contribute
1717from completion import branches_from_devguide , get_completion , TranslatorsData
18- from counts import get_counts
1918from repositories import Language , get_languages_and_repos
2019
2120generation_time = datetime .now (timezone .utc )
@@ -114,12 +113,9 @@ class LanguageProjectData:
114113 )
115114
116115 lang_template = env .get_template ('language.html.jinja' )
117- for language_data in completion_progress :
118- language = language_data .language
119- code = language .code
120-
121- html = lang_template .render (language = language_data )
122-
116+ for project in completion_progress :
117+ code = project .language .code
118+ html = lang_template .render (project = project )
123119 Path (f'build/{ code } .html' ).write_text (html )
124120
125121 Path ('build/style.css' ).write_bytes (Path ('src/style.css' ).read_bytes ())
Original file line number Diff line number Diff line change 33
44<head >
55 <meta charset =" utf-8" >
6- {# <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">#}
6+ <meta name =" viewport" content =" width=device-width, initial-scale=1, shrink-to-fit=no" >
77 <meta name =" description" content =" " >
88 <meta name =" author" content =" " >
99
2929 <a class =" nav-link" href =" https://devguide.python.org/" >Translating</a >
3030 </li >
3131 <li class =" nav-item" >
32- <a class =" nav-link" href =" / metadata.html" >Metadata</a >
32+ <a class =" nav-link" href =" metadata.html" >Metadata</a >
3333 </li >
3434 <li class =" nav-item" >
35- <a class =" nav-link" href =" / chart.html" >Chart</a >
35+ <a class =" nav-link" href =" chart.html" >Chart</a >
3636 </li >
3737 </ul >
3838 </div >
Original file line number Diff line number Diff line change 55 <div class =" row" >
66 {% for project in completion_progress | sort (attribute ='completion,translators.number' ) | reverse %}
77 <div class =" col-sm-6 col-md-4 col-lg-3 d-flex" >
8- <a href =" / {{ project.language.code }}.html" class =" card mb-3 w-100" >
8+ <a href =" {{ project.language.code }}.html" class =" card mb-3 w-100" >
99 <div class =" card-body" >
1010 <h5 class =" card-title" >{{ project.language.name }} ({{ project.language.code }})</h5 >
1111 <h6 class =" card-subtitle mb-2 text-muted" >Completion: {{ '{:.2f}%'.format(project.completion) }}</h6 >
Original file line number Diff line number Diff line change 11{% extends "base.html.jinja" %}
22
33{% block main %}
4- <h1 >{{ language.name }}</h1 >
4+ {% if project .built %}
5+ <h1 ><a href =" https://docs.python.org/{{ project.language.code }}/3" >{{ project.language.name }}</a ></h1 >
6+ {% else %}
7+ <h1 >{{ project.language.name }}</h1 >
8+ {% endif %}
59{% endblock %}
You can’t perform that action at this time.
0 commit comments