Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 32 additions & 40 deletions template.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,44 @@
<meta charset="UTF-8">
<meta name="description" content="Python Docs Translation Dashboard">
<base target="_blank">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
</head>
<body>
<body class="container">
<h1>Python Docs Translation Dashboard</h1>
<nav class="switchpages">
main | <a href="metadata.html" target="_self">meta</a>
</nav>
<table>
<thead>
<tr>
<th>language</th>
<th>switcher</th>
<th>translators</th>
<th>completion*</th>
</tr>
</thead>
<tbody>
<div class="row row-cols-1 row-cols-md-4 g-4">
{% for project in completion_progress | sort(attribute='completion,translators.number') | reverse %}
<tr>
<td data-label="language">
<a href="{{ project.contribution_link }}">{{ project.language.name }} ({{ project.language.code }})</a>
</td>
<td data-label="build">
{% if project.in_switcher %}
<a href="https://docs.python.org/{{ project.language.code }}/">✓</a>
{% elif project.built %}
<a href="https://docs.python.org/{{ project.language.code }}/">✗</a>
{% endif %}
</td>
<td data-label="translators">
{% if project.translators.link %}<a href="{{ project.translators.link }}">{% endif %}
{{ project.translators.number }}
{% if project.translators.link %}</a>{% endif %}
</td>
<td data-label="completion">
<div class="progress-bar"
style="width: {{ project.completion }}%;{% if project.change %}background: linear-gradient(to left, #94cf96 {{ project.change * 100 / project.completion }}%, #4caf50 {{ project.change * 100 / project.completion }}%);{% else %}background-color: #4caf50;{% endif %}"
>
{{ '{:.2f}%'.format(project.completion) }} {% if project.change >= 0.01 %}({{ '{:+.2f}%'.format(project.change) }}){% endif %}
</div>
<div class="progress-bar-outer-label">
{{ '{:.2f}%'.format(project.completion) }} {% if project.change >= 0.01 %}({{ '{:+.2f}%'.format(project.change) }}){% endif %}
</div>
</td>
</tr>
<div class="col">
<div class="card">
<div class="card-body">
<h5>{{ project.language.name }} ({{ project.language.code }})</h5>
<p>translators: {% if project.translators.link %}<a href="{{ project.translators.link }}">
{{ project.translators.number }}</a>{% else %}
{{ project.translators.number }}{% endif %}</p>
<div data-label="completion">
<div class="progress-bar"
style="width: {{ project.completion }}%;{% if project.change %}background: linear-gradient(to left, #94cf96 {{ project.change * 100 / project.completion }}%, #4caf50 {{ project.change * 100 / project.completion }}%);{% else %}background-color: #4caf50;{% endif %}"
>
{{ '{:.2f}%'.format(project.completion) }} {% if project.change >= 0.01 %}({{ '{:+.2f}%'.format(project.change) }}){% endif %}
</div>
<div class="progress-bar-outer-label">
{{ '{:.2f}%'.format(project.completion) }} {% if project.change >= 0.01 %}({{ '{:+.2f}%'.format(project.change) }}){% endif %}
</div>
</div>
{% if project.built %}
<a href="https://docs.python.org/{{ project.language.code }}/" class="btn btn-outline-secondary">Read</a>
{% else %}
<button type="button" class="btn btn-outline-secondary" disabled>Read</button>
{% endif %}
<a href="{{ project.contribution_link }}" class="btn btn-outline-primary">Contribute</a>
</div>
</div>
</div>
{% endfor %}
</tbody>
</table>
</div>
<p>* the number in parentheses shows change in the last 30 days, included in the total completion</p>
<p>
Currently being translated into {{ completion_progress|length }} languages.
Expand All @@ -62,6 +53,7 @@ For more information about translations, see the <a href="https://devguide.pytho
<p>You can download the data on this page in <a href="https://github.com/python-docs-translations/dashboard/blob/gh-pages/index.json">JSON format</a>.</p>
<p>You can also find the scripts used to generate these pages <a href="https://github.com/python-docs-translations/dashboard">here</a>.</p>
<p>Last updated at {{ generation_time.strftime('%A, %-d %B %Y, %-H:%M:%S %Z') }} (in {{ duration // 60 }}:{{ "{:02}".format(duration % 60) }} minutes).</p>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ndDqU0Gzau9qJ1lfW4pNLlhNTkCfHzAVBReH9diLvGRem5+R9g2FzA8ZGN954O5Q" crossorigin="anonymous"></script>
</body>
<script>
function updateProgressBarVisibility() {
Expand Down
Loading