From 36f1675577224adc161f2c0db75c7108cee53cc9 Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Tue, 26 Jul 2022 09:05:58 +0200 Subject: [PATCH] deduplicate i18n for zone names --- frontend/src/pages/MapPage/LayerSidebar.tsx | 12 ++++++------ frontend/src/pages/MapPage/RoadInfo.tsx | 2 +- frontend/src/translations/de.yaml | 13 +++++-------- frontend/src/translations/en.yaml | 13 +++++-------- 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/frontend/src/pages/MapPage/LayerSidebar.tsx b/frontend/src/pages/MapPage/LayerSidebar.tsx index faefd78..caecb65 100644 --- a/frontend/src/pages/MapPage/LayerSidebar.tsx +++ b/frontend/src/pages/MapPage/LayerSidebar.tsx @@ -137,18 +137,18 @@ function LayerSidebar({ ) : attribute.endsWith('zone') ? ( <> - - + + ) : ( <> - {_.upperFirst(t("general.urban"))} + {_.upperFirst(t("general.zone.urban"))} - {_.upperFirst(t("general.rural"))} + {_.upperFirst(t("general.zone.rural"))} @@ -172,11 +172,11 @@ function LayerSidebar({ {showEvents && ( <> - {_.upperFirst(t('general.urban'))} + {_.upperFirst(t('general.zone.urban'))} - {_.upperFirst(t('general.rural'))} + {_.upperFirst(t('general.zone.rural'))} diff --git a/frontend/src/pages/MapPage/RoadInfo.tsx b/frontend/src/pages/MapPage/RoadInfo.tsx index fb8938c..b03f02a 100644 --- a/frontend/src/pages/MapPage/RoadInfo.tsx +++ b/frontend/src/pages/MapPage/RoadInfo.tsx @@ -185,7 +185,7 @@ export default function RoadInfo({ clickLocation }) { {info?.road.zone && ( )} diff --git a/frontend/src/translations/de.yaml b/frontend/src/translations/de.yaml index 1b6a226..e0a447d 100644 --- a/frontend/src/translations/de.yaml +++ b/frontend/src/translations/de.yaml @@ -1,8 +1,6 @@ general: loading: Lädt unnamedTrack: Unbenannte Fahrt - urban: innerorts - rural: außerorts public: Öffentlich private: Privat show: Anzeigen @@ -15,6 +13,11 @@ general: copied: Kopiert copyError: Kopieren fehlgeschlagen + zone: + rural: außerorts + urban: innerorts + motorway: Autobahn + App: footer: aboutTheProject: Über das Projekt @@ -159,12 +162,6 @@ MapPage: unnamedWay: Unbenannter Weg oneway: Einbahnstraße direction: Richtung - - zone: - rural: außerorts - urban: innerorts - motorway: Autobahn - distanceOvertaker: Links distanceStationary: Rechts speed: Geschwindigkeit diff --git a/frontend/src/translations/en.yaml b/frontend/src/translations/en.yaml index 69f6daa..0bce3ca 100644 --- a/frontend/src/translations/en.yaml +++ b/frontend/src/translations/en.yaml @@ -5,8 +5,6 @@ locales: general: loading: Loading unnamedTrack: Unnamed track - urban: urban - rural: rural public: Public private: Private show: Show @@ -19,6 +17,11 @@ general: copied: Copied. copyError: Failed to copy. + zone: + urban: urban + rural: rural + motorway: Motorway + App: footer: aboutTheProject: About the project @@ -163,12 +166,6 @@ MapPage: unnamedWay: Unnamed way oneway: oneway direction: Direction - - zone: - rural: Rural - urban: Urban - motorway: Motorway - distanceOvertaker: Left distanceStationary: Right speed: Speed