Feature/support translated tags (#1600)
* Support translated tags * Update changelog
This commit is contained in:
parent
69a9e77820
commit
0878941c4f
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added support for translated tags
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Improved the logo alignment
|
- Improved the logo alignment
|
||||||
|
@ -125,7 +125,12 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
|
|||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
this.sectors = {};
|
this.sectors = {};
|
||||||
this.SymbolProfile = SymbolProfile;
|
this.SymbolProfile = SymbolProfile;
|
||||||
this.tags = tags;
|
this.tags = tags.map(({ id, name }) => {
|
||||||
|
return {
|
||||||
|
id,
|
||||||
|
name: translate(name)
|
||||||
|
};
|
||||||
|
});
|
||||||
this.transactionCount = transactionCount;
|
this.transactionCount = transactionCount;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|
||||||
|
@ -83,7 +83,12 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
|
|||||||
|
|
||||||
this.currencies = currencies;
|
this.currencies = currencies;
|
||||||
this.platforms = platforms;
|
this.platforms = platforms;
|
||||||
this.tags = tags;
|
this.tags = tags.map(({ id, name }) => {
|
||||||
|
return {
|
||||||
|
id,
|
||||||
|
name: translate(name)
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
this.activityForm = this.formBuilder.group({
|
this.activityForm = this.formBuilder.group({
|
||||||
accountId: [this.data.activity?.accountId, Validators.required],
|
accountId: [this.data.activity?.accountId, Validators.required],
|
||||||
@ -114,7 +119,14 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
|
|||||||
},
|
},
|
||||||
Validators.required
|
Validators.required
|
||||||
],
|
],
|
||||||
tags: [this.data.activity?.tags],
|
tags: [
|
||||||
|
this.data.activity?.tags.map(({ id, name }) => {
|
||||||
|
return {
|
||||||
|
id,
|
||||||
|
name: translate(name)
|
||||||
|
};
|
||||||
|
})
|
||||||
|
],
|
||||||
type: [undefined, Validators.required], // Set after value changes subscription
|
type: [undefined, Validators.required], // Set after value changes subscription
|
||||||
unitPrice: [this.data.activity?.unitPrice, Validators.required]
|
unitPrice: [this.data.activity?.unitPrice, Validators.required]
|
||||||
});
|
});
|
||||||
|
@ -183,7 +183,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
|
|||||||
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
|
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
label: name,
|
label: translate(name),
|
||||||
type: 'TAG'
|
type: 'TAG'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -159,7 +159,7 @@ export class AnalysisPageComponent implements OnDestroy, OnInit {
|
|||||||
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
|
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
label: name,
|
label: translate(name),
|
||||||
type: 'TAG'
|
type: 'TAG'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -138,7 +138,7 @@ export class HoldingsPageComponent implements OnDestroy, OnInit {
|
|||||||
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
|
const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => {
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
label: name,
|
label: translate(name),
|
||||||
type: 'TAG'
|
type: 'TAG'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -4,8 +4,14 @@ const locales = {
|
|||||||
ACCOUNT: $localize`Account`,
|
ACCOUNT: $localize`Account`,
|
||||||
ASSET_CLASS: $localize`Asset Class`,
|
ASSET_CLASS: $localize`Asset Class`,
|
||||||
ASSET_SUB_CLASS: $localize`Asset Sub Class`,
|
ASSET_SUB_CLASS: $localize`Asset Sub Class`,
|
||||||
|
CORE: $localize`Core`,
|
||||||
EMERGENCY_FUND: $localize`Emergency Fund`,
|
EMERGENCY_FUND: $localize`Emergency Fund`,
|
||||||
|
GRANT: $localize`Grant`,
|
||||||
|
HIGHER_RISK: $localize`Higher Risk`,
|
||||||
|
LOWER_RISK: $localize`Lower Risk`,
|
||||||
OTHER: $localize`Other`,
|
OTHER: $localize`Other`,
|
||||||
|
RETIREMENT_PROVISION: $localize`Retirement Provision`,
|
||||||
|
SATELLITE: $localize`Satellite`,
|
||||||
SECURITIES: $localize`Securities`,
|
SECURITIES: $localize`Securities`,
|
||||||
SYMBOL: $localize`Symbol`,
|
SYMBOL: $localize`Symbol`,
|
||||||
TAG: $localize`Tag`,
|
TAG: $localize`Tag`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user