deduplicate i18n for zone names

This commit is contained in:
Paul Bienkowski 2022-07-26 09:05:58 +02:00
parent 85e5e1ba65
commit 36f1675577
4 changed files with 17 additions and 23 deletions

View file

@ -137,18 +137,18 @@ function LayerSidebar({
) : attribute.endsWith('zone') ? (
<>
<List.Item>
<Label size="small" style={{background: "blue",color:"white"}}>{t("general.urban")} (1.5&nbsp;m)</Label>
<Label size="small" style={{background: "cyan", color:"black"}}>{t("general.rural")}(2&nbsp;m)</Label>
<Label size="small" style={{background: "blue",color:"white"}}>{t("general.zone.urban")} (1.5&nbsp;m)</Label>
<Label size="small" style={{background: "cyan", color:"black"}}>{t("general.zone.rural")}(2&nbsp;m)</Label>
</List.Item></>
) :
(
<>
<List.Item>
<List.Header>{_.upperFirst(t("general.urban"))}</List.Header>
<List.Header>{_.upperFirst(t("general.zone.urban"))}</List.Header>
<DiscreteColorMapLegend map={colorByDistance('distance_overtaker')[3][5].slice(2)} />
</List.Item>
<List.Item>
<List.Header>{_.upperFirst(t("general.rural"))}</List.Header>
<List.Header>{_.upperFirst(t("general.zone.rural"))}</List.Header>
<DiscreteColorMapLegend map={colorByDistance('distance_overtaker')[3][3].slice(2)} />
</List.Item>
</>
@ -172,11 +172,11 @@ function LayerSidebar({
{showEvents && (
<>
<List.Item>
<List.Header>{_.upperFirst(t('general.urban'))}</List.Header>
<List.Header>{_.upperFirst(t('general.zone.urban'))}</List.Header>
<DiscreteColorMapLegend map={colorByDistance('distance_overtaker')[3][5].slice(2)} />
</List.Item>
<List.Item>
<List.Header>{_.upperFirst(t('general.rural'))}</List.Header>
<List.Header>{_.upperFirst(t('general.zone.rural'))}</List.Header>
<DiscreteColorMapLegend map={colorByDistance('distance_overtaker')[3][3].slice(2)} />
</List.Item>
</>

View file

@ -185,7 +185,7 @@ export default function RoadInfo({ clickLocation }) {
{info?.road.zone && (
<Label size="small" color={ZONE_COLORS[info?.road.zone]}>
{t(`MapPage.roadInfo.zone.${info.road.zone}`)}
{t(`general.zone.${info.road.zone}`)}
</Label>
)}

View file

@ -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

View file

@ -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