diff --git a/angular.json b/angular.json
index 50745c6..51eb802 100644
--- a/angular.json
+++ b/angular.json
@@ -84,10 +84,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
- "browserTarget": "bee:build:production"
+ "buildTarget": "bee:build:production"
},
"development": {
- "browserTarget": "bee:build:development"
+ "buildTarget": "bee:build:development"
}
},
"defaultConfiguration": "development"
@@ -95,7 +95,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
- "browserTarget": "bee:build"
+ "buildTarget": "bee:build"
}
},
"test": {
diff --git a/package.json b/package.json
index 98dc225..26b5e2f 100644
--- a/package.json
+++ b/package.json
@@ -9,24 +9,25 @@
},
"private": true,
"dependencies": {
- "@angular/animations": "^15.2.10",
- "@angular/cdk": "^15.2.9",
- "@angular/common": "^15.2.0",
- "@angular/compiler": "^15.2.0",
- "@angular/core": "^15.2.0",
- "@angular/forms": "^15.2.0",
- "@angular/platform-browser": "^15.2.0",
- "@angular/platform-browser-dynamic": "^15.2.0",
- "@angular/router": "^15.2.0",
+ "@angular/animations": "^18.2.2",
+ "@angular/common": "^18.2.2",
+ "@angular/compiler": "^18.2.2",
+ "@angular/core": "^18.2.2",
+ "@angular/forms": "^18.2.2",
+ "@angular/platform-browser": "^18.2.2",
+ "@angular/platform-browser-dynamic": "^18.2.2",
+ "@angular/router": "^18.2.2",
+ "@ngx-translate/core": "^15.0.0",
+ "@ngx-translate/http-loader": "^8.0.0",
"flowbite": "^2.5.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
- "zone.js": "~0.12.0"
+ "zone.js": "~0.14.10"
},
"devDependencies": {
- "@angular-devkit/build-angular": "^15.2.6",
- "@angular/cli": "~15.2.6",
- "@angular/compiler-cli": "^15.2.0",
+ "@angular-devkit/build-angular": "^18.2.2",
+ "@angular/cli": "~18.2.2",
+ "@angular/compiler-cli": "^18.2.2",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.5.0",
"karma": "~6.4.0",
@@ -35,6 +36,6 @@
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"tailwindcss": "^3.4.10",
- "typescript": "~4.9.4"
+ "typescript": "~5.4.5"
}
}
diff --git a/src/app/app.component.html b/src/app/app.component.html
index 5051e59..0b411f2 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,4 +1,5 @@
-
+
+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 58970ff..fbd6b2a 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,6 +1,7 @@
import { Component, OnInit } from "@angular/core";
import { AuthService } from "./core/services/auth.service";
import { AppService } from "./core/services/app.service";
+import { TranslateService } from "@ngx-translate/core";
@Component({
selector: "app-root",
@@ -10,8 +11,13 @@ import { AppService } from "./core/services/app.service";
export class AppComponent implements OnInit {
constructor(
private authService: AuthService,
- private appService: AppService
- ) {}
+ private translate: TranslateService
+ ) {
+ var language = navigator.language;
+
+ translate.setDefaultLang(language);
+ translate.use(language);
+ }
ngOnInit(): void {
this.authService.readUserState();
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index efcb67e..c24d4f8 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -1,8 +1,13 @@
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
-import { HttpClientModule } from "@angular/common/http";
+import {
+ HttpClient,
+ provideHttpClient,
+ withInterceptorsFromDi,
+} from "@angular/common/http";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
-
+import { TranslateModule, TranslateLoader } from "@ngx-translate/core";
+import { TranslateHttpLoader } from "@ngx-translate/http-loader";
import { AppComponent } from "./app.component";
import { RouterModule, Routes } from "@angular/router";
import { SharedModule } from "./shared/shared.module";
@@ -25,18 +30,28 @@ const routes: Routes = [
},
];
+export function createTranslateLoader(http: HttpClient) {
+ return new TranslateHttpLoader(http, "./assets/i18n/", ".json");
+}
+
@NgModule({
declarations: [AppComponent, HomeComponent],
+ bootstrap: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
- HttpClientModule,
RouterModule,
RouterModule.forRoot(routes),
SharedModule,
CoreModule,
+ TranslateModule.forRoot({
+ loader: {
+ provide: TranslateLoader,
+ useFactory: createTranslateLoader,
+ deps: [HttpClient],
+ },
+ }),
],
- providers: [],
- bootstrap: [AppComponent],
+ providers: [provideHttpClient(withInterceptorsFromDi())],
})
export class AppModule {}
diff --git a/src/app/core/auth/auth.module.ts b/src/app/core/auth/auth.module.ts
index 7626877..507dce8 100644
--- a/src/app/core/auth/auth.module.ts
+++ b/src/app/core/auth/auth.module.ts
@@ -7,6 +7,7 @@ import { RouterModule, Routes } from "@angular/router";
import { ReactiveFormsModule } from "@angular/forms";
import { ForgotPasswordComponent } from "./components/forgot-password/forgot-password.component";
import { ResetPasswordComponent } from "./components/reset-password/reset-password.component";
+import { TranslateModule } from "@ngx-translate/core";
const routes: Routes = [
{ path: "login", component: LoginComponent },
@@ -38,6 +39,11 @@ const routes: Routes = [
ForgotPasswordComponent,
ResetPasswordComponent,
],
- imports: [RouterModule.forChild(routes), CommonModule, ReactiveFormsModule],
+ imports: [
+ RouterModule.forChild(routes),
+ CommonModule,
+ ReactiveFormsModule,
+ TranslateModule,
+ ],
})
export class AuthModule {}
diff --git a/src/app/core/auth/components/confirm-registration/confirm-registration.component.html b/src/app/core/auth/components/confirm-registration/confirm-registration.component.html
index 1b46718..72da839 100644
--- a/src/app/core/auth/components/confirm-registration/confirm-registration.component.html
+++ b/src/app/core/auth/components/confirm-registration/confirm-registration.component.html
@@ -2,10 +2,10 @@
- Beekeeper
+ {{ "title" | translate }}
- Registrierung Abschließen
+ {{ "auth.confirm-registration" | translate }}
@@ -14,7 +14,7 @@
{{ "auth.password" | translate }}
Passwort wiederholen{{ "auth.password-confirmation" | translate }}
- Registrieren
+ {{ "auth.confirm-registration" | translate }}
diff --git a/src/app/core/auth/components/forgot-password/forgot-password.component.html b/src/app/core/auth/components/forgot-password/forgot-password.component.html
index 682b804..f188e68 100644
--- a/src/app/core/auth/components/forgot-password/forgot-password.component.html
+++ b/src/app/core/auth/components/forgot-password/forgot-password.component.html
@@ -2,10 +2,10 @@
- Beekeeper
+ {{ "title" | translate }}
- Passwort vergessen?
+ {{ "auth.forgot-password" | translate }}
@@ -14,7 +14,8 @@
+ {{ "auth.email" | translate }}
- Passwort zurücksetzen
+ {{ "auth.reset-password" | translate }}
diff --git a/src/app/core/auth/components/login/login.component.html b/src/app/core/auth/components/login/login.component.html
index af33de2..e8d37b0 100644
--- a/src/app/core/auth/components/login/login.component.html
+++ b/src/app/core/auth/components/login/login.component.html
@@ -2,9 +2,11 @@
- Beekeeper
+ {{ "title" | translate }}
+
+
+ {{ "auth.login" | translate }}
- Anmeldung
@@ -38,7 +40,7 @@
{{ "auth.password" | translate }}
Passwort vergessen?{{ "auth.forgot-password" | translate }}?
@@ -64,6 +66,6 @@
type="submit"
class="w-full 9xl:w-auto font-bold text-skin-secondary bg-skin-accent hover:text-skin-primary rounded-lg text-sm px-5 py-2.5 text-center"
>
- Anmelden
+ {{ "auth.login" | translate }}
diff --git a/src/app/core/auth/components/registration/registration.component.html b/src/app/core/auth/components/registration/registration.component.html
index 4a3e88b..15fa994 100644
--- a/src/app/core/auth/components/registration/registration.component.html
+++ b/src/app/core/auth/components/registration/registration.component.html
@@ -2,9 +2,11 @@
- Beekeeper
+ {{ "title" | translate }}
+
+
+ {{ "auth.registration" | translate }}
- Registrierung
diff --git a/src/app/core/auth/components/reset-password/reset-password.component.html b/src/app/core/auth/components/reset-password/reset-password.component.html
index 7c1cd4e..ec0160b 100644
--- a/src/app/core/auth/components/reset-password/reset-password.component.html
+++ b/src/app/core/auth/components/reset-password/reset-password.component.html
@@ -2,10 +2,10 @@
- Beekeeper
+ {{ "title" | translate }}
- Passwort zurücksetzen
+ {{ "auth.reset-password" | translate }}
@@ -14,7 +14,7 @@
{{ "auth.new-password" | translate }}
Passwort wiederholen{{ "auth.password-confirmation" | translate }}
- Neues Passwort bestätigen
+ {{ "auth.new-password" | translate }}
diff --git a/src/app/core/components/home/home.component.html b/src/app/core/components/home/home.component.html
index 35be8d2..b02bbdf 100644
--- a/src/app/core/components/home/home.component.html
+++ b/src/app/core/components/home/home.component.html
@@ -1,7 +1,10 @@
-
-
-
-
+
diff --git a/src/app/core/components/home/home.component.ts b/src/app/core/components/home/home.component.ts
index 7c8406c..be17790 100644
--- a/src/app/core/components/home/home.component.ts
+++ b/src/app/core/components/home/home.component.ts
@@ -1,18 +1,8 @@
import { Component } from "@angular/core";
-import { NotificationService } from "../../services/notification.service";
@Component({
selector: "app-home",
templateUrl: "./home.component.html",
styleUrls: ["./home.component.scss"],
})
-export class HomeComponent {
- constructor(private notificationService: NotificationService) {}
-
- fehler() {
- this.notificationService.push({
- message: "Ein Fehler ist aufgetreten :(",
- type: "danger",
- });
- }
-}
+export class HomeComponent {}
diff --git a/src/app/core/components/navigation/navigation.component.html b/src/app/core/components/navigation/navigation.component.html
index f4bd01e..7296a90 100644
--- a/src/app/core/components/navigation/navigation.component.html
+++ b/src/app/core/components/navigation/navigation.component.html
@@ -1,139 +1,97 @@