From 57af4614b19b9d01565bdc39f176cd0f2fb55a87 Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Thu, 28 Jul 2022 14:06:45 +0200 Subject: [PATCH] Translate filters in sidebar --- frontend/src/pages/MapPage/LayerSidebar.tsx | 34 +++++++++++---------- frontend/src/translations/de.yaml | 16 ++++++++++ frontend/src/translations/en.yaml | 16 ++++++++++ 3 files changed, 50 insertions(+), 16 deletions(-) diff --git a/frontend/src/pages/MapPage/LayerSidebar.tsx b/frontend/src/pages/MapPage/LayerSidebar.tsx index 329435e..7da55ce 100644 --- a/frontend/src/pages/MapPage/LayerSidebar.tsx +++ b/frontend/src/pages/MapPage/LayerSidebar.tsx @@ -32,11 +32,7 @@ const ROAD_ATTRIBUTE_OPTIONS = [ "zone", ]; -const DATE_FILTER_MODES = [ - { value: "none", key: "none", text: "All time" }, - { value: "range", key: "range", text: "Start and end range" }, - { value: "threshold", key: "threshold", text: "Before/after comparison" }, -]; +const DATE_FILTER_MODES = ["none", "range", "threshold"]; type User = Object; @@ -223,13 +219,13 @@ function LayerSidebar({ -
Filters
+
{t("MapPage.sidebar.filters.title")}
{login && ( <> -
User data
+
{t("MapPage.sidebar.filters.userData")}
@@ -241,18 +237,22 @@ function LayerSidebar({ onChange={() => setMapConfigFlag("filters.currentUser", !filtersCurrentUser) } - label="Show only my own data" + label={t("MapPage.sidebar.filters.currentUser")} /> -
Date range
+
{t("MapPage.sidebar.filters.dateRange")}