diff options
-rw-r--r-- | fietsboek/locale/de/LC_MESSAGES/messages.mo | bin | 11111 -> 11214 bytes | |||
-rw-r--r-- | fietsboek/locale/de/LC_MESSAGES/messages.po | 7 | ||||
-rw-r--r-- | fietsboek/locale/en/LC_MESSAGES/messages.mo | bin | 10466 -> 10549 bytes | |||
-rw-r--r-- | fietsboek/locale/en/LC_MESSAGES/messages.po | 6 | ||||
-rw-r--r-- | fietsboek/locale/fietslog.pot | 6 | ||||
-rw-r--r-- | fietsboek/templates/browse.jinja2 | 2 | ||||
-rw-r--r-- | fietsboek/views/browse.py | 4 |
7 files changed, 22 insertions, 3 deletions
diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.mo b/fietsboek/locale/de/LC_MESSAGES/messages.mo Binary files differindex a4cc5dc..97ee495 100644 --- a/fietsboek/locale/de/LC_MESSAGES/messages.mo +++ b/fietsboek/locale/de/LC_MESSAGES/messages.mo diff --git a/fietsboek/locale/de/LC_MESSAGES/messages.po b/fietsboek/locale/de/LC_MESSAGES/messages.po index dcc860d..9c93bb4 100644 --- a/fietsboek/locale/de/LC_MESSAGES/messages.po +++ b/fietsboek/locale/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2022-07-30 22:48+0200\n" +"POT-Creation-Date: 2022-08-02 11:57+0200\n" "PO-Revision-Date: 2022-07-02 17:35+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language: de\n" @@ -183,6 +183,11 @@ msgid "page.browse.download_multiple" msgstr "ausgewählte Herunterladen" #: fietsboek/templates/browse.jinja2:158 +msgid "page.browse.no_results" +msgstr "" +"Es wurden keine Strecken gefunden, die den Filtern entsprechen." + +#: fietsboek/templates/browse.jinja2:160 msgid "page.browse.no_tracks" msgstr "" "Es wurden keine Strecken gefunden, auf die Du Zugriff hast. Versuche, " diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.mo b/fietsboek/locale/en/LC_MESSAGES/messages.mo Binary files differindex 0d228d8..8887d3d 100644 --- a/fietsboek/locale/en/LC_MESSAGES/messages.mo +++ b/fietsboek/locale/en/LC_MESSAGES/messages.mo diff --git a/fietsboek/locale/en/LC_MESSAGES/messages.po b/fietsboek/locale/en/LC_MESSAGES/messages.po index 542a6f9..2ac9f98 100644 --- a/fietsboek/locale/en/LC_MESSAGES/messages.po +++ b/fietsboek/locale/en/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2022-07-30 22:48+0200\n" +"POT-Creation-Date: 2022-08-02 11:57+0200\n" "PO-Revision-Date: 2022-06-28 13:11+0200\n" "Last-Translator: \n" "Language: en\n" @@ -183,6 +183,10 @@ msgid "page.browse.download_multiple" msgstr "Download selected" #: fietsboek/templates/browse.jinja2:158 +msgid "page.browse.no_results" +msgstr "No results matching the filters were found." + +#: fietsboek/templates/browse.jinja2:160 msgid "page.browse.no_tracks" msgstr "You currently do not have access to any tracks. Try logging in." diff --git a/fietsboek/locale/fietslog.pot b/fietsboek/locale/fietslog.pot index 47d3c6e..2c25251 100644 --- a/fietsboek/locale/fietslog.pot +++ b/fietsboek/locale/fietslog.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2022-07-30 22:48+0200\n" +"POT-Creation-Date: 2022-08-02 11:57+0200\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" @@ -182,6 +182,10 @@ msgid "page.browse.download_multiple" msgstr "" #: fietsboek/templates/browse.jinja2:158 +msgid "page.browse.no_results" +msgstr "" + +#: fietsboek/templates/browse.jinja2:160 msgid "page.browse.no_tracks" msgstr "" diff --git a/fietsboek/templates/browse.jinja2 b/fietsboek/templates/browse.jinja2 index 169309b..0f98192 100644 --- a/fietsboek/templates/browse.jinja2 +++ b/fietsboek/templates/browse.jinja2 @@ -154,6 +154,8 @@ </div> {% endfor %} <button type="button" class="btn btn-primary" id="archiveDownloadButton" disabled><i class="bi bi-file-earmark-zip"></i> {{ _("page.browse.download_multiple") }}</button> + {% elif used_filters %} + <p>{{ _("page.browse.no_results") }}</p> {% else %} <p>{{ _("page.browse.no_tracks") }}</p> {% endif %} diff --git a/fietsboek/views/browse.py b/fietsboek/views/browse.py index e62ca0b..7120b0d 100644 --- a/fietsboek/views/browse.py +++ b/fietsboek/views/browse.py @@ -55,6 +55,9 @@ class TrackFilters: def __init__(self, filters): self._filters = filters + def __bool__(self): + return bool(self._filters) + def apply(self, track): """Apply the filters to the track. @@ -173,6 +176,7 @@ def browse(request): return { 'tracks': tracks, 'mps_to_kph': util.mps_to_kph, + 'used_filters': bool(filters), } |