add missing wiki pages from taginfo fr

This commit is contained in:
Tykayn 2025-09-05 11:37:19 +02:00 committed by tykayn
parent e056cfc8fa
commit dffb21b56e
8 changed files with 469 additions and 131 deletions

View file

@ -492,6 +492,56 @@
</div>
{% endif %}
{% if keys_without_wiki is defined and keys_without_wiki|length > 0 %}
<div class="card mb-4">
<div class="card-header bg-warning text-dark">
<h2>Clés sans page wiki ({{ keys_without_wiki|length }})</h2>
</div>
<div class="card-body">
<p>Ces clés OSM sont utilisées en France mais n'ont pas de page wiki. Vous pouvez contribuer en créant une page pour ces clés.</p>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead class="thead-dark">
<tr>
<th>Clé</th>
<th>Nombre d'utilisations</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for key in keys_without_wiki %}
<tr>
<td>
<strong>{{ key.key }}</strong>
</td>
<td>
{{ key.count|number_format(0, ',', ' ') }}
</td>
<td class="text-center">
<div class="btn-group" role="group">
<a href="https://wiki.openstreetmap.org/w/index.php?title=Key:{{ key.key }}&action=edit" target="_blank"
class="btn btn-sm btn-outline-primary" title="Créer une page wiki en anglais">
<i class="bi bi-plus-circle"></i> Créer EN
</a>
<a href="https://wiki.openstreetmap.org/w/index.php?title=FR:Key:{{ key.key }}&action=edit" target="_blank"
class="btn btn-sm btn-outline-info" title="Créer une page wiki en français">
<i class="bi bi-plus-circle"></i> Créer FR
</a>
<a href="https://taginfo.openstreetmap.org/keys/{{ key.key }}" target="_blank"
class="btn btn-sm btn-outline-secondary" title="Voir sur TagInfo">
<i class="bi bi-info-circle"></i> TagInfo
</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endif %}
<p>
le score de fraîcheur prend en compte d'avantage la différence entre le nombre de mots que l'ancienneté de
modification.

View file

@ -140,7 +140,25 @@
<div class="iframe-container">
<iframe src="{{ english_url }}" title="Version anglaise"></iframe>
<div class="iframe-separator"></div>
<iframe src="{{ french_edit_url }}" title="Édition française"></iframe>
{% if french_cache_exists and french_html %}
<div style="flex: 1; border: 1px solid #dee2e6; height: 100%; overflow: auto; padding: 15px;">
<div class="alert alert-info mb-3">
<i class="bi bi-info-circle"></i> Version française en cache :
</div>
{{ french_html|raw }}
</div>
{% else %}
{% if french_html %}
<iframe src="{{ french_edit_url }}" title="Édition française"></iframe>
{% else %}
<div style="flex: 1; border: 1px solid #dee2e6; height: 100%; display: flex; justify-content: center; align-items: center; background-color: #f8f9fa;">
<div class="alert alert-warning" style="max-width: 80%;">
<i class="bi bi-exclamation-triangle"></i> La page française n'existe pas dans le cache.
<p class="mt-2 mb-0">Utilisez le formulaire d'édition pour créer la traduction.</p>
</div>
</div>
{% endif %}
{% endif %}
</div>
<div class="mt-3">

View file

@ -97,7 +97,25 @@
<div class="iframe-container">
<iframe src="{{ english_url }}" title="Version anglaise"></iframe>
<div class="iframe-separator"></div>
<iframe src="{{ french_edit_url }}" title="Édition française"></iframe>
{% if french_cache_exists and french_html %}
<div style="flex: 1; border: 1px solid #dee2e6; height: 100%; overflow: auto; padding: 15px;">
<div class="alert alert-info mb-3">
<i class="bi bi-info-circle"></i> Version française en cache :
</div>
{{ french_html|raw }}
</div>
{% else %}
{% if french_html %}
<iframe src="{{ french_edit_url }}" title="Édition française"></iframe>
{% else %}
<div style="flex: 1; border: 1px solid #dee2e6; height: 100%; display: flex; justify-content: center; align-items: center; background-color: #f8f9fa;">
<div class="alert alert-warning" style="max-width: 80%;">
<i class="bi bi-exclamation-triangle"></i> La page française n'existe pas dans le cache.
<p class="mt-2 mb-0">Utilisez le formulaire d'édition pour créer la traduction.</p>
</div>
</div>
{% endif %}
{% endif %}
</div>
<div class="mt-3">