Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Task/improve language localization in tag management of admin control panel (#7349)
Thomas Kaul842e74fe88dd
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex f83f4d8cef..44e719ff9f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Changed- Migrated the clone, create and edit activity dialogs to dedicated routes+- Improved the language localization in the tag management of the admin control panel### Fixeddiff --git a/apps/client/src/app/components/admin-tag/admin-tag.component.html b/apps/client/src/app/components/admin-tag/admin-tag.component.htmlindex 14b011ddcf..2edad000d6 100644--- a/apps/client/src/app/components/admin-tag/admin-tag.component.html+++ b/apps/client/src/app/components/admin-tag/admin-tag.component.html@@ -22,7 +22,7 @@<ng-container i18n>Name</ng-container></th><td *matCellDef="let element" class="px-1" mat-cell>- {{ element.name }}+ {{ translate(element.name) }}</td></ng-container>diff --git a/apps/client/src/app/components/admin-tag/admin-tag.component.ts b/apps/client/src/app/components/admin-tag/admin-tag.component.tsindex 5fb2317f44..ca9143e532 100644--- a/apps/client/src/app/components/admin-tag/admin-tag.component.ts+++ b/apps/client/src/app/components/admin-tag/admin-tag.component.ts@@ -3,6 +3,7 @@ import { DEFAULT_PAGE_SIZE } from '@ghostfolio/common/config';import { CreateTagDto, UpdateTagDto } from '@ghostfolio/common/dtos';import { ConfirmationDialogType } from '@ghostfolio/common/enums';import { getLocale, getLowercase } from '@ghostfolio/common/helper';+import { translate } from '@ghostfolio/ui/i18n';import { NotificationService } from '@ghostfolio/ui/notifications';import { DataService } from '@ghostfolio/ui/services';import { GfValueComponent } from '@ghostfolio/ui/value';@@ -68,6 +69,7 @@ export class GfAdminTagComponent implements OnInit {];protected readonly pageSize = DEFAULT_PAGE_SIZE;protected tags: Tag[];+ protected readonly translate = translate;private readonly deviceType = computed(() => this.deviceDetectorService.deviceInfo().deviceType@@ -155,7 +157,12 @@ export class GfAdminTagComponent implements OnInit {this.dataSource = new MatTableDataSource(this.tags);this.dataSource.paginator = this.paginator();this.dataSource.sort = this.sort();- this.dataSource.sortingDataAccessor = getLowercase;++ this.dataSource.sortingDataAccessor = (tag, path) => {+ return path === 'name'+ ? translate(tag.name).toLocaleLowerCase()+ : (getLowercase(tag, path) as number | string);+ };this.dataService.updateInfo();