diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed16e1a82..79169e6a0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+### Added
+
+- Added support for translated labels of asset and asset sub class
+
### Fixed
- Improved the loading indicator of the portfolio evolution chart
diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
index 96cf2294e..e51eb6e6a 100644
--- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
+++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
@@ -17,6 +17,7 @@ import {
UniqueAsset,
User
} from '@ghostfolio/common/interfaces';
+import { translate } from '@ghostfolio/ui/i18n';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { Market, ToggleOption } from '@ghostfolio/common/types';
import { Account, AssetClass, DataSource } from '@prisma/client';
@@ -174,7 +175,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
for (const assetClass of Object.keys(AssetClass)) {
assetClassFilters.push({
id: assetClass,
- label: assetClass,
+ label: translate(assetClass),
type: 'ASSET_CLASS'
});
}
diff --git a/apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts b/apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts
index eb6ff9f43..426bfff09 100644
--- a/apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts
+++ b/apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts
@@ -12,6 +12,7 @@ import {
PortfolioPosition,
User
} from '@ghostfolio/common/interfaces';
+import { translate } from '@ghostfolio/ui/i18n';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { AssetClass, DataSource } from '@prisma/client';
import { DeviceDetectorService } from 'ngx-device-detector';
@@ -130,7 +131,7 @@ export class HoldingsPageComponent implements OnDestroy, OnInit {
for (const assetClass of Object.keys(AssetClass)) {
assetClassFilters.push({
id: assetClass,
- label: assetClass,
+ label: translate(assetClass),
type: 'ASSET_CLASS'
});
}
diff --git a/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts b/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts
index ce2c5856f..64f47cf53 100644
--- a/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts
+++ b/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.component.ts
@@ -14,6 +14,7 @@ import { CreateOrderDto } from '@ghostfolio/api/app/order/create-order.dto';
import { UpdateOrderDto } from '@ghostfolio/api/app/order/update-order.dto';
import { LookupItem } from '@ghostfolio/api/app/symbol/interfaces/lookup-item.interface';
import { DataService } from '@ghostfolio/client/services/data.service';
+import { translate } from '@ghostfolio/ui/i18n';
import { AssetClass, AssetSubClass, Type } from '@prisma/client';
import { isUUID } from 'class-validator';
import { isString } from 'lodash';
@@ -40,8 +41,12 @@ export class CreateOrUpdateTransactionDialog implements OnDestroy {
@ViewChild('autocomplete') autocomplete;
public activityForm: FormGroup;
- public assetClasses = Object.keys(AssetClass);
- public assetSubClasses = Object.keys(AssetSubClass);
+ public assetClasses = Object.keys(AssetClass).map((assetClass) => {
+ return { id: assetClass, label: translate(assetClass) };
+ });
+ public assetSubClasses = Object.keys(AssetSubClass).map((assetSubClass) => {
+ return { id: assetSubClass, label: translate(assetSubClass) };
+ });
public currencies: string[] = [];
public currentMarketPrice = null;
public filteredLookupItems: LookupItem[];
diff --git a/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.html b/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.html
index 3dbd34fda..45d34a47c 100644
--- a/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.html
+++ b/apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.html
@@ -4,17 +4,17 @@
(keyup.enter)="activityForm.valid && onSubmit()"
(ngSubmit)="onSubmit()"
>
-
Update activity
- Add activity
+ Update activity
+ Add activity
Type
- BUY
- DIVIDEND
- ITEM
- SELL
+ BUY
+ DIVIDEND
+ ITEM
+ SELL
@@ -156,8 +156,8 @@
{{ assetClass }}{{ assetClass.label }}
@@ -171,8 +171,8 @@
{{ assetSubClass }}{{ assetSubClass.label }}
diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf
index a06eed8a4..63f017d05 100644
--- a/apps/client/src/locales/messages.de.xlf
+++ b/apps/client/src/locales/messages.de.xlf
@@ -98,7 +98,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 215
+ 218
apps/client/src/app/pages/portfolio/portfolio-page.html
@@ -354,7 +354,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 76
+ 77
@@ -942,11 +942,11 @@
Einlage
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 40
+ 37
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 118
+ 119
@@ -954,7 +954,7 @@
Absolute Brutto Performance
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 51
+ 48
@@ -962,7 +962,7 @@
Brutto Performance (TWR)
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 62
+ 59
@@ -970,7 +970,7 @@
Gebühren für
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 77,80
+ 74,77
@@ -978,7 +978,7 @@
{VAR_PLURAL, plural, =1 {Transaktion} other {Transaktionen}}
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 78,79
+ 75,76
@@ -986,7 +986,7 @@
Absolute Netto Performance
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 95
+ 92
@@ -994,7 +994,7 @@
Netto Performance (TWR)
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 106
+ 103
@@ -1002,7 +1002,7 @@
Gesamtanlagevermögen
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 122
+ 119
@@ -1010,7 +1010,7 @@
Wertsachen
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 134
+ 131
@@ -1018,7 +1018,7 @@
Notfallfonds
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 145
+ 142
@@ -1026,7 +1026,7 @@
Kaufkraft
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 165
+ 162
@@ -1034,7 +1034,7 @@
Gesamtvermögen
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 190
+ 187
@@ -1042,7 +1042,7 @@
Performance pro Jahr
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 201
+ 198
@@ -1050,7 +1050,7 @@
Dividenden
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 217
+ 214
@@ -1066,7 +1066,7 @@
Sektoren
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 188
+ 189
apps/client/src/app/pages/public/public-page.html
@@ -1078,7 +1078,7 @@
Länder
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 199
+ 201
@@ -1086,7 +1086,7 @@
Tags
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 235
+ 238
apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.html
@@ -1098,7 +1098,7 @@
Datenfehler melden
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 250
+ 253
@@ -1118,7 +1118,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 56
+ 57
apps/client/src/app/components/positions-table/positions-table.component.html
@@ -1642,7 +1642,7 @@
Nach Währung
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 66
+ 67
@@ -1650,7 +1650,7 @@
Nach Asset Class
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 94
+ 96
@@ -1658,7 +1658,7 @@
Nach Position
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 122
+ 125
@@ -1666,7 +1666,7 @@
Nach Sektor
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 150
+ 154
@@ -1674,7 +1674,7 @@
Nach Kontinent
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 179
+ 184
@@ -1682,7 +1682,7 @@
Nach Land
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 207
+ 213
@@ -1690,7 +1690,7 @@
Regionen
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 238
+ 245
apps/client/src/app/pages/public/public-page.html
@@ -1722,7 +1722,7 @@
Zeitstrahl der Investitionen
apps/client/src/app/pages/portfolio/analysis/analysis-page.html
- 140
+ 142
@@ -1730,7 +1730,7 @@
Gewinner
apps/client/src/app/pages/portfolio/analysis/analysis-page.html
- 33
+ 34
@@ -1738,7 +1738,7 @@
Verlierer
apps/client/src/app/pages/portfolio/analysis/analysis-page.html
- 69
+ 70
@@ -1774,7 +1774,7 @@
4% Regel
apps/client/src/app/pages/portfolio/fire/fire-page.html
- 20
+ 21
@@ -1958,7 +1958,7 @@
Anzahl
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 108
+ 109
apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.html
@@ -2010,7 +2010,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 146
+ 147
apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.html
@@ -2038,7 +2038,7 @@
Der Import wurde abgeschlossen
apps/client/src/app/pages/portfolio/transactions/transactions-page.component.ts
- 337
+ 338,337
@@ -2054,7 +2054,7 @@
Portfolio
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
- 99
+ 101
apps/client/src/app/pages/public/public-page-routing.module.ts
@@ -2358,7 +2358,7 @@
Änderung
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 45
+ 46
@@ -2366,7 +2366,7 @@
Ø Preis pro Einheit
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 66
+ 67
@@ -2374,7 +2374,7 @@
Minimum Preis
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 87
+ 88
@@ -2382,7 +2382,7 @@
Maximum Preis
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 98
+ 99
@@ -2390,7 +2390,7 @@
Datum des Erstkaufs
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 128
+ 129
@@ -2402,7 +2402,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 155
+ 156
apps/client/src/app/pages/portfolio/transactions/create-or-update-transaction-dialog/create-or-update-transaction-dialog.html
@@ -2414,7 +2414,7 @@
Sektor
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 170
+ 171
@@ -2422,7 +2422,7 @@
Land
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 182
+ 183
@@ -2430,7 +2430,7 @@
Entwickelte Länder
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 264
+ 271
apps/client/src/app/pages/public/public-page.html
@@ -2442,7 +2442,7 @@
Schwellenländer
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 273
+ 280
apps/client/src/app/pages/public/public-page.html
@@ -2454,7 +2454,7 @@
Andere Länder
apps/client/src/app/pages/portfolio/allocations/allocations-page.html
- 282
+ 289
apps/client/src/app/pages/public/public-page.html
@@ -2466,7 +2466,7 @@
Transaktionen
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 137
+ 138
@@ -2482,7 +2482,7 @@
Beginn
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
- 57
+ 58
@@ -2490,7 +2490,7 @@
Aktuell
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
- 58
+ 59
@@ -2498,7 +2498,7 @@
Monatlich
apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts
- 40
+ 41
@@ -2506,11 +2506,11 @@
Einlage
apps/client/src/app/components/investment-chart/investment-chart.component.ts
- 139
+ 137
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
- 279
+ 281
@@ -2518,7 +2518,7 @@
Verzinsung
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
- 289
+ 291
@@ -2526,7 +2526,7 @@
Ersparnisse
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
- 299
+ 301
@@ -2574,11 +2574,11 @@
Filtern nach Konto oder Tag...
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
- 136
+ 137
apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts
- 87
+ 88
@@ -2638,7 +2638,7 @@
Benchmark
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
- 108
+ 110
@@ -2662,7 +2662,7 @@
Von der Analyse ausgenommen
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
- 176
+ 173
@@ -2670,7 +2670,7 @@
Wenn du heute in den Ruhestand gehen würdest, könnest du pro Jahr oder pro Monat entnehmen, bezogen auf dein Gesamtanlagevermögen von und einer Entnahmerate von 4%.
apps/client/src/app/pages/portfolio/fire/fire-page.html
- 38,66
+ 39,67
@@ -2718,7 +2718,7 @@
Gesamtbetrag
apps/client/src/app/components/investment-chart/investment-chart.component.ts
- 160
+ 158
@@ -2726,7 +2726,7 @@
Portfolio Wertentwicklung
apps/client/src/app/pages/portfolio/analysis/analysis-page.html
- 112
+ 113
@@ -2734,7 +2734,135 @@
Sparrate
apps/client/src/app/components/investment-chart/investment-chart.component.ts
- 201
+ 199
+
+
+
+
+ Konto
+
+ libs/ui/src/lib/i18n.ts
+ 4
+
+
+
+
+ Anlageklasse
+
+ libs/ui/src/lib/i18n.ts
+ 5
+
+
+
+
+ Symbol
+
+ libs/ui/src/lib/i18n.ts
+ 6
+
+
+
+
+ Tag
+
+ libs/ui/src/lib/i18n.ts
+ 7
+
+
+
+
+ Bargeld
+
+ libs/ui/src/lib/i18n.ts
+ 10
+
+
+
+
+ Rohstoff
+
+ libs/ui/src/lib/i18n.ts
+ 11
+
+
+
+
+ Anteilskapital
+
+ libs/ui/src/lib/i18n.ts
+ 12
+
+
+
+
+ Feste Einkünfte
+
+ libs/ui/src/lib/i18n.ts
+ 13
+
+
+
+
+ Immobilien
+
+ libs/ui/src/lib/i18n.ts
+ 14
+
+
+
+
+ Anleihe
+
+ libs/ui/src/lib/i18n.ts
+ 17
+
+
+
+
+ Kryptowährung
+
+ libs/ui/src/lib/i18n.ts
+ 18
+
+
+
+
+ ETF
+
+ libs/ui/src/lib/i18n.ts
+ 19
+
+
+
+
+ Investmentfonds
+
+ libs/ui/src/lib/i18n.ts
+ 20
+
+
+
+
+ Edelmetall
+
+ libs/ui/src/lib/i18n.ts
+ 21
+
+
+
+
+ Privates Beteiligungskapital
+
+ libs/ui/src/lib/i18n.ts
+ 22
+
+
+
+
+ Aktie
+
+ libs/ui/src/lib/i18n.ts
+ 23