From 7d06252819912fbb1e7b0480dfe872c12ce7ec93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Mon, 5 Jul 2021 20:13:35 +0300 Subject: [PATCH] Clean up translations --- apps/red-ui/src/app/app.module.ts | 7 +- .../auth-error/auth-error.component.html | 4 +- .../user-profile-screen.component.html | 12 +- .../screens/audit/audit-screen.component.html | 6 +- .../screens/audit/audit-screen.component.ts | 2 +- .../dictionary-listing-screen.component.html | 4 +- ...er-templates-listing-screen.component.html | 2 +- ...e-attributes-listing-screen.component.html | 2 +- .../smtp-config-screen.component.html | 13 +- .../user-listing-screen.component.html | 2 +- .../watermark/watermark-screen.component.html | 2 +- .../comments/comments.component.html | 2 +- .../team-members-manager.component.html | 8 +- .../dossier-dictionary-dialog.component.html | 4 +- .../force-redaction-dialog.component.html | 2 +- .../team-members-dialog.component.html | 4 +- .../dossier-listing-screen.component.html | 2 +- .../dossier-listing-screen.component.ts | 2 +- .../dossier-overview-screen.component.html | 2 +- .../dossier-overview-screen.component.ts | 9 +- .../popup-filter/model/filter.model.ts | 1 + .../popup-filter/popup-filter.component.html | 16 +- .../quick-filters.component.html | 2 +- .../components/select/select.component.html | 4 +- .../confirmation-dialog.component.ts | 14 +- .../app/utils/missing-translations-handler.ts | 9 + apps/red-ui/src/assets/i18n/de.json | 2199 ++++++++------- apps/red-ui/src/assets/i18n/en.json | 2418 ++++++++--------- package-lock.json | 0 29 files changed, 2297 insertions(+), 2457 deletions(-) create mode 100644 apps/red-ui/src/app/utils/missing-translations-handler.ts delete mode 100644 package-lock.json diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index 9d48d856b..dd2fdc836 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -7,7 +7,7 @@ import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common import { BaseScreenComponent } from '@components/base-screen/base-screen.component'; import { ApiModule } from '@redaction/red-ui-http'; import { ApiPathInterceptor } from '@utils/api-path-interceptor'; -import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; +import { MissingTranslationHandler, TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { languageInitializer } from '@i18n/language.initializer'; import { LanguageService } from '@i18n/language.service'; @@ -29,6 +29,7 @@ import { PlatformLocation } from '@angular/common'; import { BASE_HREF } from './tokens'; import { MONACO_PATH, MonacoEditorModule } from '@materia-ui/ngx-monaco-editor'; import { ChunkLoaderErrorHandler } from '@utils/chunk-loader-error-handler'; +import { REDMissingTranslationHandler } from '@utils/missing-translations-handler'; export function httpLoaderFactory(httpClient: HttpClient) { return new TranslateHttpLoader(httpClient, '/assets/i18n/', '.json'); @@ -110,6 +111,10 @@ const components = [ { provide: MONACO_PATH, useValue: 'https://unpkg.com/monaco-editor@0.24.0/min/vs' + }, + { + provide: MissingTranslationHandler, + useClass: REDMissingTranslationHandler } ], bootstrap: [AppComponent] diff --git a/apps/red-ui/src/app/components/auth-error/auth-error.component.html b/apps/red-ui/src/app/components/auth-error/auth-error.component.html index f397401ee..04fa26b44 100644 --- a/apps/red-ui/src/app/components/auth-error/auth-error.component.html +++ b/apps/red-ui/src/app/components/auth-error/auth-error.component.html @@ -1,8 +1,8 @@

- +
diff --git a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html index 4ff7326de..ba98ea0e4 100644 --- a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html +++ b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html @@ -3,29 +3,29 @@
-
+
- +
- +
- +
diff --git a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html index d1b8c2b54..9dafe7911 100644 --- a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.html @@ -41,7 +41,7 @@ *ngFor="let category of categories" [value]="category" > - {{ category | translate }} + {{ 'audit-screen.categories.' + category | translate }} @@ -154,9 +154,7 @@ size="small" >
-
- {{ log.category }} -
+
diff --git a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts index bc2fde0ea..752b959ac 100644 --- a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts @@ -14,7 +14,7 @@ const PAGE_SIZE = 50; styleUrls: ['./audit-screen.component.scss'] }) export class AuditScreenComponent { - readonly ALL_CATEGORIES = 'audit-screen.all-categories'; + readonly ALL_CATEGORIES = 'all-categories'; readonly ALL_USERS = 'audit-screen.all-users'; filterForm: FormGroup; diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html index 7f1110700..d4e4f0280 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-listing/dictionary-listing-screen.component.html @@ -44,7 +44,7 @@
@@ -154,7 +154,7 @@
-
+
diff --git a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.html index 43cadd3ca..3b1e5e96d 100644 --- a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/file-attributes-listing-screen.component.html @@ -48,7 +48,7 @@
diff --git a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html index 73217f399..4f54334e5 100644 --- a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.html @@ -10,7 +10,7 @@
-
+