From 302d3f9ad98362c4dc2c12b0dda0a4f67dae4bc6 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 1 Mar 2024 19:22:07 +0100 Subject: [PATCH] Improve icons, localize label --- libs/common/src/lib/helper.ts | 8 +++++--- libs/ui/src/lib/benchmark/benchmark.component.html | 5 ++++- libs/ui/src/lib/i18n.ts | 8 ++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/libs/common/src/lib/helper.ts b/libs/common/src/lib/helper.ts index c6a15e22e..894804287 100644 --- a/libs/common/src/lib/helper.ts +++ b/libs/common/src/lib/helper.ts @@ -1,3 +1,5 @@ +import { translate } from '@ghostfolio/ui/i18n'; + import * as currencies from '@dinero.js/currencies'; import { NumberParser } from '@internationalized/number'; import { DataSource, MarketData } from '@prisma/client'; @@ -389,10 +391,10 @@ export function resolveMarketCondition( aMarketCondition: Benchmark['marketCondition'] ) { if (aMarketCondition === 'ALL_TIME_HIGH') { - return { emoji: '🎉' }; + return { emoji: '🎉', label: translate(aMarketCondition) }; } else if (aMarketCondition === 'BEAR_MARKET') { - return { emoji: '🐻' }; + return { emoji: '🐻', label: translate(aMarketCondition) }; } else { - return { emoji: '⚪' }; + return { emoji: undefined, label: undefined }; } } diff --git a/libs/ui/src/lib/benchmark/benchmark.component.html b/libs/ui/src/lib/benchmark/benchmark.component.html index 2e5c819e7..913105faa 100644 --- a/libs/ui/src/lib/benchmark/benchmark.component.html +++ b/libs/ui/src/lib/benchmark/benchmark.component.html @@ -102,7 +102,10 @@