Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalize the UI and add a German localization #756

Merged
merged 9 commits into from
Sep 20, 2024
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ the detailed section referring to by linking pull requests or issues.

#### Major

- Internationalize the UI and add a German localization

#### Minor

#### Patch
Expand Down
11 changes: 11 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sovity EDC UI
Copyright (c) 2024. sovity GmbH

This product includes software developed at sovity GmbH (https://www.sovity.de).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disregard if this is copied from somewhere but I would say "by sovity" instead "at sovity" to be more consistent with the wording below "localization to German was done by the Fraunhofer Institute..."

Copyright (c) 2024. sovity GmbH

The initial internationalization of the EDC UI and localization to German was done
by the Fraunhofer Institute for Applied Information Technology FIT (https://www.fit.fraunhofer.de/).
This project was part of the national flagship project "Datenraum Kultur" and was funded
by the Federal Government Commissioner for Culture and the Media from 2023 to 2025.
Copyright (c) 2024. Fraunhofer Institute for Applied Information Technology FIT
43 changes: 43 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/router": "^14.3.0",
"@ng-apimock/core": "^3.11.0",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"@ngxs/store": "^3.8.1",
"@sovity.de/edc-client": "0.20240805.72446-main-4f0ae71b",
"clean-deep": "^3.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {NgModule} from '@angular/core';
import {ROUTES, RouterModule, Routes} from '@angular/router';
import {PageNotFoundComponent} from './component-library/error-404-component/page-not-found.component';
import {APP_CONFIG, AppConfig} from './core/config/app-config';
import {PageNotFoundPageComponent} from './routes/connector-ui/page-not-found-page/page-not-found-page.component';

@NgModule({
imports: [RouterModule.forRoot([], {paramsInheritanceStrategy: 'always'})],
Expand All @@ -27,7 +27,7 @@ import {APP_CONFIG, AppConfig} from './core/config/app-config';
default:
throw new Error(`Unhandled PageSet: ${config.routes}`);
}
routes.push({path: '**', component: PageNotFoundComponent});
routes.push({path: '**', component: PageNotFoundPageComponent});
return routes;
},
},
Expand Down
30 changes: 25 additions & 5 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {
HTTP_INTERCEPTORS,
HttpClient,
HttpClientModule,
} from '@angular/common/http';
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {TitleStrategy} from '@angular/router';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {NgxsModule} from '@ngxs/store';
import {NgChartsModule} from 'ng2-charts';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {PageNotFoundComponent} from './component-library/error-404-component/page-not-found.component';
import {provideAppConfig} from './core/config/app-config-initializer';
import {ApiKeyInterceptor} from './core/services/api/api-key.interceptor';
import {SharedModule} from './shared.module';
import {CustomPageTitleStrategy} from './core/services/page-title-strategy';
import {SharedModule} from './shared/shared.module';

@NgModule({
imports: [
Expand All @@ -18,23 +25,36 @@ import {SharedModule} from './shared.module';
BrowserModule,
HttpClientModule,

SharedModule,
//Translation
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: (http: HttpClient) => new TranslateHttpLoader(http),
deps: [HttpClient],
},
}),

// NgXs
NgxsModule.forRoot([]),

// Third Party
NgChartsModule.forRoot(),

// Features
SharedModule,

// Routing
AppRoutingModule,
],
declarations: [AppComponent, PageNotFoundComponent],
declarations: [AppComponent],
providers: [
HttpClient,
provideAppConfig(),

{provide: HTTP_INTERCEPTORS, multi: true, useClass: ApiKeyInterceptor},
{provide: TitleStrategy, useClass: CustomPageTitleStrategy},
],
bootstrap: [AppComponent],
exports: [TranslateModule],
})
export class AppModule {}
84 changes: 0 additions & 84 deletions src/app/component-library/catalog/catalog.module.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions src/app/component-library/data-address/data-address.module.ts

This file was deleted.

Loading
Loading