@for (category of categories$ | async; track category.id) {
- {{ category.title }}
+ {{ category.title | translate }}
- {{ category.description }}
+ {{ category.description | translate}}
}
diff --git a/src/app/pages/algorithms/algorithms.component.scss b/src/app/pages/algorithms/algorithms.component.scss
index d6d57ce..825e521 100644
--- a/src/app/pages/algorithms/algorithms.component.scss
+++ b/src/app/pages/algorithms/algorithms.component.scss
@@ -10,10 +10,7 @@
mat-card {
cursor: pointer;
- max-width: 300px;
-
- &:hover {
- background-color: rgba(255, 255, 255, 0.1);
- }
+ min-width: 300px;
+ max-width: 400px;
}
}
diff --git a/src/app/pages/algorithms/algorithms.component.ts b/src/app/pages/algorithms/algorithms.component.ts
index 66b7540..8639131 100644
--- a/src/app/pages/algorithms/algorithms.component.ts
+++ b/src/app/pages/algorithms/algorithms.component.ts
@@ -5,22 +5,20 @@ import { Observable } from 'rxjs';
import { CommonModule } from '@angular/common';
import { RouterLink } from '@angular/router';
import { MatCardModule } from '@angular/material/card';
+import {TranslatePipe} from '@ngx-translate/core';
@Component({
selector: 'app-algorithms',
templateUrl: './algorithms.component.html',
styleUrls: ['./algorithms.component.scss'],
standalone: true,
- imports: [CommonModule, RouterLink, MatCardModule],
+ imports: [CommonModule, RouterLink, MatCardModule, TranslatePipe],
})
export class AlgorithmsComponent implements OnInit {
- private algorithmsService = inject(AlgorithmsService);
-
+ private readonly algorithmsService = inject(AlgorithmsService);
categories$: Observable
| undefined;
-
-
ngOnInit(): void {
this.categories$ = this.algorithmsService.getCategories();
}
diff --git a/src/app/pages/algorithms/service/algorithms.service.ts b/src/app/pages/algorithms/service/algorithms.service.ts
index c84b802..bdf1e9a 100644
--- a/src/app/pages/algorithms/service/algorithms.service.ts
+++ b/src/app/pages/algorithms/service/algorithms.service.ts
@@ -7,19 +7,13 @@ import { Observable, of } from 'rxjs';
})
export class AlgorithmsService {
- private categories: AlgorithmCategory[] = [
+ private readonly categories: AlgorithmCategory[] = [
{
id: 'pathfinding',
- title: 'Pfadfindungsalgorithmen',
- description: 'Vergleich von Pfadfindungsalgorithmen wie Dijkstra und A*.',
+ title: 'ALGORITHM.PATHFINDING.TITLE',
+ description: 'ALGORITHM.PATHFINDING.DESCRIPTION',
routerLink: 'pathfinding'
- },
- // {
- // id: 'sorting',
- // title: 'Sortieralgorithmen',
- // description: 'Visualisierung von Sortieralgorithmen wie Bubble Sort, Merge Sort und Quick Sort.',
- // routerLink: 'sorting'
- // }
+ }
];
getCategories(): Observable {
diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json
index 02139e0..0c92e21 100644
--- a/src/assets/i18n/de.json
+++ b/src/assets/i18n/de.json
@@ -310,5 +310,12 @@
"ALERT": {
"START_END_NODES": "Bitte wählen Sie einen Start- und Endknoten aus, bevor Sie den Algorithmus starten."
}
+ },
+ "ALGORITHM": {
+ "TITLE": "Algorithmen",
+ "PATHFINDING": {
+ "TITLE": "Wegfindung",
+ "DESCRIPTION": "Vergleich von Dijkstra vs. A*."
+ }
}
}
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index c5a8996..2999621 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -310,5 +310,12 @@
"ALERT": {
"START_END_NODES": "Please select a start and end node before running the algorithm."
}
+ },
+ "ALGORITHM": {
+ "TITLE": "Algorithms",
+ "PATHFINDING": {
+ "TITLE": "Pathfinding",
+ "DESCRIPTION": "Comparing of Dijkstra vs. A*."
+ }
}
}
diff --git a/src/main.ts b/src/main.ts
index f28c38d..b1a88d7 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,8 +2,6 @@ import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import packageJson from '../package.json';
import {AppComponent} from './app/layout/app/app.component';
-import { register } from 'swiper/element/bundle';
-register();
if (packageJson.version) {
diff --git a/tsconfig.app.json b/tsconfig.app.json
index 264f459..8b5e62c 100644
--- a/tsconfig.app.json
+++ b/tsconfig.app.json
@@ -3,6 +3,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
+ "resolveJsonModule": true,
"outDir": "./out-tsc/app",
"types": []
},
diff --git a/tsconfig.json b/tsconfig.json
index e4955f2..bbdee77 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -13,7 +13,10 @@
"experimentalDecorators": true,
"importHelpers": true,
"target": "ES2022",
- "module": "preserve"
+ "module": "preserve",
+ "moduleResolution": "bundler",
+ "resolveJsonModule": true,
+ "esModuleInterop": true
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,