Skip to content

Commit

Permalink
add translations for station templates
Browse files Browse the repository at this point in the history
  • Loading branch information
silvioheinze committed Dec 5, 2024
1 parent c3889ee commit 47e3124
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 59 deletions.
107 changes: 89 additions & 18 deletions app/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-11 11:00+0200\n"
"POT-Creation-Date: 2024-12-05 08:28+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -19,7 +19,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: campaign/forms.py:15 templates/devices/my.html:13
#: templates/workshops/my.html:10
#: templates/workshops/my.html:13
msgid "Name"
msgstr "Name"

Expand All @@ -36,7 +36,7 @@ msgid "End Date"
msgstr "Enddatum"

#: campaign/forms.py:19 templates/campaigns/my.html:13
#: templates/workshops/my.html:13 workshops/forms.py:19
#: templates/workshops/my.html:16 workshops/forms.py:19
msgid "Public"
msgstr "Öffentlich"

Expand Down Expand Up @@ -71,11 +71,11 @@ msgstr ""
"können nur angemeldete Benutzer mit festgelegten Berechtigungen die "
"Ergebnisse sehen."

#: main/settings.py:149
#: main/settings.py:150
msgid "English"
msgstr "Englisch"

#: main/settings.py:150
#: main/settings.py:151
msgid "German"
msgstr "Deutsch"

Expand Down Expand Up @@ -237,30 +237,30 @@ msgstr "Messkampagnen"
msgid "Campaign name"
msgstr "Messkampagnenname"

#: templates/campaigns/my.html:11 templates/workshops/my.html:11
#: templates/campaigns/my.html:11 templates/workshops/my.html:14
msgid "Start date"
msgstr "Startdatum"

#: templates/campaigns/my.html:12 templates/workshops/my.html:12
#: templates/campaigns/my.html:12 templates/workshops/my.html:15
msgid "End date"
msgstr "Enddatum"

#: templates/campaigns/my.html:14 templates/devices/list.html:17
#: templates/devices/my.html:16 templates/workshops/my.html:14
#: templates/devices/my.html:16 templates/workshops/my.html:17
msgid "Actions"
msgstr "Aktionen"

#: templates/campaigns/my.html:25 templates/devices/my.html:25
#: templates/workshops/my.html:25
#: templates/workshops/my.html:34
msgid "Details"
msgstr "Details"

#: templates/campaigns/my.html:26 templates/devices/list.html:27
#: templates/devices/my.html:25 templates/workshops/my.html:26
#: templates/devices/my.html:25 templates/workshops/my.html:35
msgid "Edit"
msgstr "Bearbeiten"

#: templates/campaigns/my.html:27 templates/workshops/my.html:27
#: templates/campaigns/my.html:27 templates/workshops/my.html:36
msgid "Delete"
msgstr "Löschen"

Expand Down Expand Up @@ -308,10 +308,73 @@ msgstr ""
msgid "No devices found."
msgstr "Keine Workshops gefunden."

#: templates/stations/list.html:5 templates/stations/list.html:11
msgid "Stations overview"
#: templates/stations/detail.html:17
#, fuzzy
#| msgid "Actions"
msgid "Station"
msgstr "Aktionen"

#: templates/stations/detail.html:61
msgid "48-hour overview"
msgstr "48-Stunden Überblick"

#: templates/stations/detail.html:65
msgid "Particulate Matter (PM1)"
msgstr "Feinstaub (PM1)"

#: templates/stations/detail.html:72
msgid "Particulate Matter (PM2.5)"
msgstr "Feinstaub (PM2.5)"

#: templates/stations/detail.html:79
msgid "Particulate Matter (PM10)"
msgstr "Feinstaub (PM10)"

#: templates/stations/detail.html:86
msgid "Temperature (°C)"
msgstr "Temperatur (°C)"

#: templates/stations/detail.html:93
#, python-format
msgid "Humidity (%%)"
msgstr "Luftfeuchtigkeit (%%)"

#: templates/stations/detail.html:102
msgid "Surroundings"
msgstr "Umgebung"

#: templates/stations/detail.html:105
msgid "Download data"
msgstr ""

#: templates/stations/detail.html:108
#, fuzzy
#| msgid "Start date"
msgid "Start date:"
msgstr "Startdatum"

#: templates/stations/detail.html:112
#, fuzzy
#| msgid "End date"
msgid "End date:"
msgstr "Enddatum"

#: templates/stations/detail.html:115
msgid "Download measurements as CSV"
msgstr "Download Messwerte als CSV"

#: templates/stations/list.html:5 templates/stations/list.html:36
msgid "Stations overview"
msgstr "Übersicht über Stationen"

#: templates/stations/list.html:41
msgid "Top 10 stations with the highest values for PM2.5"
msgstr "Top 10 Stationen mit den höchsten Werten für PM2.5"

#: templates/stations/list.html:55
msgid "Top 10 stations with the lowest values for PM2.5"
msgstr "Top 10 Stationen mit den niedrigsten Werten für PM2.5"

#: templates/workshops/detail.html:69
msgid "Messwerte"
msgstr ""
Expand All @@ -338,11 +401,11 @@ msgstr ""

#: templates/workshops/detail.html:77
msgid "Gerät"
msgstr ""
msgstr "Device"

#: templates/workshops/detail.html:79
msgid "Alle Geräte"
msgstr ""
msgstr "All devices"

#: templates/workshops/detail.html:305
msgid "Konzenration (µg/m³)"
Expand Down Expand Up @@ -448,17 +511,25 @@ msgstr "Vergangene Workshops"

#: templates/workshops/list.html:43
msgid "End:"
msgstr ""
msgstr "Ende"

#: templates/workshops/list.html:51
msgid "No past workshops."
msgstr "Keine vergangenen Workshops."

#: templates/workshops/my.html:32
#: templates/workshops/my.html:28
msgid "Yes"
msgstr "Ja"

#: templates/workshops/my.html:30
msgid "No"
msgstr "Nein"

#: templates/workshops/my.html:45
msgid "No workshops found."
msgstr "Keine Workshops gefunden."

#: templates/workshops/my.html:37
#: templates/workshops/my.html:49
msgid "Create workshop"
msgstr "Workshop erstellen"

Expand Down
86 changes: 47 additions & 39 deletions app/templates/stations/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,42 @@
<div class="container">
<div class="row">
<div class="col-lg-12">

<h1>Station Details</h1>
<ul>
<li><strong>ID:</strong> {{ station.id }}</li>
<li><strong>Stadt/Gemeinde: <a href="">Wien</a></strong></li>
<li><strong>Sensoren:</strong> {% for sensor in station.sensors %} {{ sensor.sensor_model_name }} {% endfor %}</li>
<li><strong>Letztes Update:</strong> {{ station.time }}</li>
</ul>

</div>
<div class="col-lg-12">


<h1>{% trans "Station" %} {{ station.id }}</h1>
<!--
<div>
<div>
<h5>Letzte Messung</h5>
<small class="text-muted">Gemessen am {{ measurement.time }}</small>
</div>
<div class="card-body">
<div class="row">
<div class="col-sm-4">
<div class="card text-center">
<div class="card-body">
<h6 class="card-subtitle mb-2 text-muted">PM1</h6>
<p class="card-text display-4">12 µg/m³</p>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card text-center">
<div class="card-body">
<h6 class="card-subtitle mb-2 text-muted">PM2.5</h6>
<p class="card-text display-4">15 µg/m³</p>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card text-center">
<div class="card-body">
<h6 class="card-subtitle mb-2 text-muted">PM10</h6>
<p class="card-text display-4">25 µg/m³</p>
</div>
</div>
</div>
</div>
</div>
</div> -->
</div>
</div>

Expand All @@ -35,39 +58,39 @@ <h1>Station Details</h1>
<div class="row">
<!-- Linke Spalte: Chart.js Diagramme -->
<div class="col-lg-6 col-md-12">
<h3>48 Stunden Übersicht</h3>
<h3>{% trans "48-hour overview" %}</h3>

{% if station.data_48h.2|length > 0 %}
<div class="mb-4">
<h5>Feinstaub (PM1)</h5>
<h5>{% trans "Particulate Matter (PM1)" %}</h5>
<canvas id="chart-pm1" style="height: 100px;"></canvas>
</div>
{% endif %}

{% if station.data_48h.3|length > 0 %}
<div class="mb-4">
<h5>Feinstaub (PM2.5)</h5>
<h5>{% trans "Particulate Matter (PM2.5)" %}</h5>
<canvas id="chart-pm25" style="height: 100px;"></canvas>
</div>
{% endif %}

{% if station.data_48h.5|length > 0 %}
<div class="mb-4">
<h5>Feinstaub (PM10)</h5>
<h5>{% trans "Particulate Matter (PM10)" %}</h5>
<canvas id="chart-pm10" style="height: 100px;"></canvas>
</div>
{% endif %}

{% if station.data_48h.7|length > 0 %}
<div class="mb-4">
<h5>Temperatur (°C)</h5>
<h5>{% trans "Temperature (°C)" %}</h5>
<canvas id="chart-temperature" class="chart-height"></canvas>
</div>
{% endif %}

{% if station.data_48h.6|length > 0 %}
<div class="mb-4">
<h5>Luftfeuchtigkeit (%)</h5>
<h5>{% trans "Humidity (%)" %}</h5>
<canvas id="chart-humidity" class="chart-height"></canvas>
</div>
{% endif %}
Expand All @@ -76,35 +99,20 @@ <h5>Luftfeuchtigkeit (%)</h5>

<!-- Rechte Spalte: Leaflet-Karte -->
<div class="col-lg-6 col-md-12 mb-4">
<h3>Umgebung der Station</h3>
<h3>{% trans "Surroundings" %}</h3>
<div id="map" style="width: 100%; height: 400px;"></div>
<div class="mt-3">
<h5>Daten herunterladen</h5>
<!-- Formular für Monatsmittelwerte -->
<!-- Formular für benutzerdefinierten Zeitraum -->
<!--
<form method="get" action="" class="form-inline mb-2">
<div class="form-group mr-2">
<label for="startDate" class="mr-2">Startdatum:</label>
<input type="date" class="form-control" id="startDate" name="start_date" required>
</div>
<div class="form-group mr-2">
<label for="endDate" class="mr-2">Enddatum:</label>
<input type="date" class="form-control" id="endDate" name="end_date" required>
</div>
<button type="submit" class="btn btn-primary">Messwerte als CSV herunterladen</button>
</form>
-->
<h5>{% trans "Download data" %}</h5>
<form method="get" action="" class="form-inline mb-2" id="dateForm">
<div class="form-group mr-2">
<label for="startDate" class="mr-2">Startdatum:</label>
<label for="startDate" class="mr-2">{% trans "Start date:" %}</label>
<input type="date" class="form-control" id="startDate" name="start_date" required>
</div>
<div class="form-group mr-2">
<label for="endDate" class="mr-2">Enddatum:</label>
<label for="endDate" class="mr-2">{% trans "End date:" %}</label>
<input type="date" class="form-control" id="endDate" name="end_date" required>
</div>
<button type="submit" class="btn btn-primary">Messwerte als CSV herunterladen</button>
<button type="submit" class="btn btn-primary">{% trans "Download measurements as CSV" %}</button>
</form>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/templates/stations/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h2>{% trans "Stations overview" %}</h2>
<div class="row">
<!-- Spalte 1: Stationen mit den höchsten Werten -->
<div class="col-md-6">
<h3 class="text-center">Top 10 Stationen mit höchsten Werten</h3>
<h3 class="text-center">{% trans "Top 10 stations with the highest values for PM2.5" %}</h3>
<ul class="list-group">
{% for station in top_stations %}
<li class="list-group-item d-flex justify-content-between align-items-center">
Expand All @@ -52,7 +52,7 @@ <h3 class="text-center">Top 10 Stationen mit höchsten Werten</h3>
</div>
<!-- Spalte 2: Stationen mit den niedrigsten Werten -->
<div class="col-md-6">
<h3 class="text-center">Top 10 Stationen mit niedrigsten Werten</h3>
<h3 class="text-center">{% trans "Top 10 stations with the lowest values for PM2.5" %}</h3>
<ul class="list-group">
{% for station in lowest_stations %}
<li class="list-group-item d-flex justify-content-between align-items-center">
Expand Down

0 comments on commit 47e3124

Please sign in to comment.