add set of pages to watch
This commit is contained in:
parent
77ad76cc7e
commit
7a7704bc01
22 changed files with 216839 additions and 6049 deletions
|
@ -4,6 +4,11 @@
|
|||
|
||||
{% block body %}
|
||||
<style>
|
||||
|
||||
.comparaison-sections .card-body li {
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: none !important;
|
||||
box-shadow: none !important;
|
||||
|
@ -33,7 +38,7 @@
|
|||
padding-left: 6.4rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
|
||||
/* Style for placeholder sections */
|
||||
.list-group-item-warning.title-level-2,
|
||||
.list-group-item-warning.title-level-3,
|
||||
|
@ -42,7 +47,7 @@
|
|||
.list-group-item-warning.title-level-6 {
|
||||
border-left: 4px solid #ffc107;
|
||||
}
|
||||
|
||||
|
||||
/* Make placeholder text more visible */
|
||||
.text-muted.fst-italic {
|
||||
color: #dc3545 !important;
|
||||
|
@ -58,7 +63,7 @@
|
|||
<a href="https://wiki.openstreetmap.org/Key:{{ key }}">en</a>
|
||||
</h1>
|
||||
<p class="lead">Comparaison détaillée des pages wiki en français et en anglais pour la clé OSM "{{ key }}".</p>
|
||||
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
|
@ -67,7 +72,8 @@
|
|||
</div>
|
||||
<div class="card-body text-center">
|
||||
{% if en_page.description_img_url is defined and en_page.description_img_url %}
|
||||
<img src="{{ en_page.description_img_url }}" alt="{{ key }}" class="img-fluid" style="max-height: 200px; object-fit: contain;">
|
||||
<img src="{{ en_page.description_img_url }}" alt="{{ key }}" class="img-fluid"
|
||||
style="max-height: 200px; object-fit: contain;">
|
||||
{% else %}
|
||||
<div class="alert alert-secondary">Pas d'image d'illustration</div>
|
||||
{% endif %}
|
||||
|
@ -81,7 +87,8 @@
|
|||
</div>
|
||||
<div class="card-body text-center">
|
||||
{% if fr_page is defined and fr_page is not null and fr_page.description_img_url is defined and fr_page.description_img_url %}
|
||||
<img src="{{ fr_page.description_img_url }}" alt="{{ key }}" class="img-fluid" style="max-height: 200px; object-fit: contain;">
|
||||
<img src="{{ fr_page.description_img_url }}" alt="{{ key }}" class="img-fluid"
|
||||
style="max-height: 200px; object-fit: contain;">
|
||||
{% else %}
|
||||
<div class="alert alert-secondary">Pas d'image d'illustration</div>
|
||||
{% endif %}
|
||||
|
@ -100,43 +107,44 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info">
|
||||
<p><i class="bi bi-info-circle"></i> Ces suggestions sont générées automatiquement par l'outil Grammalecte et peuvent contenir des erreurs.</p>
|
||||
<p><i class="bi bi-info-circle"></i> Ces suggestions sont générées automatiquement par l'outil
|
||||
Grammalecte et peuvent contenir des erreurs.</p>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Contexte</th>
|
||||
<th>Message</th>
|
||||
<th>Suggestions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contexte</th>
|
||||
<th>Message</th>
|
||||
<th>Suggestions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for suggestion in detailed_comparison.grammar_suggestions %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if suggestion.context is defined %}
|
||||
<code>{{ suggestion.context }}</code>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if suggestion.message is defined %}
|
||||
{{ suggestion.message }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if suggestion.suggestions is defined and suggestion.suggestions is iterable and suggestion.suggestions|length > 0 %}
|
||||
<ul class="list-unstyled mb-0">
|
||||
{% for correction in suggestion.suggestions %}
|
||||
<li><code>{{ correction }}</code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<span class="text-muted">Aucune suggestion</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for suggestion in detailed_comparison.grammar_suggestions %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if suggestion.context is defined %}
|
||||
<code>{{ suggestion.context }}</code>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if suggestion.message is defined %}
|
||||
{{ suggestion.message }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if suggestion.suggestions is defined and suggestion.suggestions is iterable and suggestion.suggestions|length > 0 %}
|
||||
<ul class="list-unstyled mb-0">
|
||||
{% for correction in suggestion.suggestions %}
|
||||
<li><code>{{ correction }}</code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<span class="text-muted">Aucune suggestion</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -149,7 +157,7 @@
|
|||
<div class="card-header">
|
||||
<h2>Comparaison des sections</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body comparaison-sections">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card h-100">
|
||||
|
@ -170,18 +178,18 @@
|
|||
{% for section in detailed_comparison.aligned_sections %}
|
||||
{% if section.en is defined and section.en is not null %}
|
||||
<li class="list-group-item title-level-{{ section.en.level|default(1) }}">
|
||||
<span class="badge bg-secondary">h{{ section.en.level|default(1) }}</span>
|
||||
{# <span class="badge bg-secondary">h{{ section.en.level|default(1) }}</span> #}
|
||||
{% if section.en.title is defined and section.en.title is not empty %}
|
||||
{{ section.en.title }}
|
||||
{% elseif section.en.is_placeholder is defined and section.en.is_placeholder %}
|
||||
<span class="text-muted fst-italic">Section uniquement en français</span>
|
||||
{% else %}
|
||||
<span class="text-muted">Sans titre</span>
|
||||
{# {% elseif section.en.is_placeholder is defined and section.en.is_placeholder %} #}
|
||||
{# <span class="text-muted fst-italic">Section uniquement en français</span> #}
|
||||
{# {% else %} #}
|
||||
{# <span class="text-muted">Sans titre</span> #}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if detailed_comparison.en_hierarchy_errors is defined and loop.index0 in detailed_comparison.en_hierarchy_errors %}
|
||||
<span class="badge bg-danger ms-2"
|
||||
title="Hiérarchie incorrecte">!</span>
|
||||
title="Hiérarchie incorrecte">!</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
@ -210,18 +218,18 @@
|
|||
{% for section in detailed_comparison.aligned_sections %}
|
||||
{% if section.fr is defined and section.fr is not null %}
|
||||
<li class="list-group-item title-level-{{ section.fr.level|default(1) }} {% if section.fr.is_placeholder is defined and section.fr.is_placeholder %}list-group-item-warning{% endif %}">
|
||||
<span class="badge bg-secondary">h{{ section.fr.level|default(1) }}</span>
|
||||
{# <span class="badge bg-secondary">h{{ section.fr.level|default(1) }}</span> #}
|
||||
{% if section.fr.title is defined and section.fr.title is not empty %}
|
||||
{{ section.fr.title }}
|
||||
{% elseif section.fr.is_placeholder is defined and section.fr.is_placeholder %}
|
||||
<span class="text-muted fst-italic">Section manquante à traduire</span>
|
||||
{% else %}
|
||||
<span class="text-muted">Sans titre</span>
|
||||
{# {% elseif section.fr.is_placeholder is defined and section.fr.is_placeholder %} #}
|
||||
{# <span class="text-muted fst-italic">Section manquante à traduire</span> #}
|
||||
{# {% else %} #}
|
||||
{# <span class="text-muted">Sans titre</span> #}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if detailed_comparison.fr_hierarchy_errors is defined and loop.index0 in detailed_comparison.fr_hierarchy_errors %}
|
||||
<span class="badge bg-danger ms-2"
|
||||
title="Hiérarchie incorrecte">!</span>
|
||||
title="Hiérarchie incorrecte">!</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
@ -284,21 +292,7 @@
|
|||
<span class="badge bg-light text-dark">{{ fr_page.media_count|default(0) }} images</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h4>Images communes ({{ detailed_comparison.media_comparison.common|length }})</h4>
|
||||
<div class="row mb-3">
|
||||
{% for media in detailed_comparison.media_comparison.common %}
|
||||
<div class="col-md-6 mb-2">
|
||||
<div class="card">
|
||||
<img src="{{ media.fr.src }}" class="card-img-top"
|
||||
alt="{{ media.fr.alt }}"
|
||||
style="max-height: 150px; object-fit: contain;">
|
||||
<div class="card-body p-2">
|
||||
<p class="card-text small">{{ media.fr.alt }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
<h4>Images uniquement en français
|
||||
({{ detailed_comparison.media_comparison.fr_only|length }} uniques
|
||||
|
@ -722,7 +716,7 @@
|
|||
{{ "=" | repeat(section.en.level|default(1)) }} {{ section.en.title }} {{ "=" | repeat(section.en.level|default(1)) }} (À traduire en français)
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{# Add sections that are in French but missing in English #}
|
||||
{% for section in detailed_comparison.aligned_sections %}
|
||||
{% if section.fr is defined and section.fr.title is defined and section.fr.title is not empty and section.en is defined and section.en.is_placeholder is defined and section.en.is_placeholder %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue