diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.ts index eb80f32d9..592e389ae 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.ts @@ -41,8 +41,8 @@ export class AddEditDictionaryDialogComponent { } get dialogHeader(): string { - const i18nString = 'add-edit-dictionary.title.' + (this.dictionary ? 'edit' : 'new'); - return this._translateService.instant(i18nString, { + return this._translateService.instant('add-edit-dictionary.title', { + type: this.dictionary ? 'edit' : 'create', name: humanize(this.dictionary?.type) }); } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component.html index ea0ada166..5a4f29102 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component.html @@ -1,10 +1,12 @@
-
- {{ - (dossierAttribute ? 'add-edit-dossier-attribute.title.edit' : 'add-edit-dossier-attribute.title.new') - | translate: { name: dossierAttribute?.label } - }} -
+
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.html index cf1d10da9..6bf2167c7 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.html @@ -1,10 +1,12 @@
-
- {{ - (dossierTemplate ? 'add-edit-dossier-template.title.edit' : 'add-edit-dossier-template.title.new') - | translate: { name: dossierTemplate?.name } - }} -
+
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html index 0349c10f9..d2dba3279 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html @@ -1,10 +1,12 @@
-
- {{ - (fileAttribute ? 'add-edit-file-attribute.title.edit' : 'add-edit-file-attribute.title.new') - | translate: { name: fileAttribute?.label } - }} -
+
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.html index 9ee996f81..a770d5ae2 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/user-details/user-details.component.html @@ -1,6 +1,10 @@ -
- {{ (user ? 'add-edit-user.title.edit' : 'add-edit-user.title.new') | translate }} -
+
diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html index 3432287b6..fa3d8f453 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.html @@ -202,7 +202,7 @@
diff --git a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts index 397df5070..57cde0bb2 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/file-workload/file-workload.component.ts @@ -20,7 +20,6 @@ import { FileDataModel } from '@models/file/file-data.model'; import { FilterModel } from '@shared/components/filters/popup-filter/model/filter.model'; import { CommentsComponent } from '../comments/comments.component'; import { PermissionsService } from '@services/permissions.service'; -import { TranslateService } from '@ngx-translate/core'; import { WebViewerInstance } from '@pdftron/webviewer'; const COMMAND_KEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Escape']; @@ -60,8 +59,7 @@ export class FileWorkloadComponent { constructor( private readonly _permissionsService: PermissionsService, private readonly _changeDetectorRef: ChangeDetectorRef, - private readonly _annotationProcessingService: AnnotationProcessingService, - private readonly _translateService: TranslateService + private readonly _annotationProcessingService: AnnotationProcessingService ) {} private _annotations: AnnotationWrapper[]; @@ -114,11 +112,6 @@ export class FileWorkloadComponent { } } - commentsTooltip({ comments }: AnnotationWrapper): string { - const i18nString = 'comments.' + (comments.length === 1 ? 'comment' : 'comments'); - return this._translateService.instant(i18nString, { count: comments.length }); - } - isSelected(annotation: AnnotationWrapper) { return this.selectedAnnotations?.find(a => a?.id === annotation.id); } diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 5403de27c..ccc7111df 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -61,10 +61,7 @@ "redaction": "Redaction" }, "save": "Save Dictionary", - "title": { - "edit": "Edit {name} Dictionary", - "new": "Create Dictionary" - } + "title": "{type, select, edit{Edit {name}} create{Create} other{}} Dictionary" }, "add-edit-dossier-attribute": { "form": { @@ -74,10 +71,7 @@ "type": "Attribute Type" }, "save": "Save Attribute", - "title": { - "edit": "Edit {name} Dossier Attribute", - "new": "Add New Dossier Attribute" - }, + "title": "{type, select, edit{Edit {name}} create{Add New} other{}} Dossier Attribute", "error": { "generic": "Failed to save attribute!" } @@ -92,10 +86,7 @@ "valid-to": "Valid to" }, "save": "Save Dossier Template", - "title": { - "edit": "Edit {name} Dossier Template", - "new": "Create Dossier Template" - } + "title": "{type, select, edit{Edit {name}} create{Create} other{}} Dossier Template" }, "add-edit-file-attribute": { "form": { @@ -108,10 +99,7 @@ "type": "Type" }, "save": "Save Attribute", - "title": { - "edit": "Edit {name} File Attribute", - "new": "Add New File Attribute" - } + "title": "{type, select, edit{Edit {name}} create{Add New} other{}} File Attribute" }, "add-edit-user": { "actions": { @@ -127,10 +115,7 @@ "role": "Role", "reset-password": "Reset Password" }, - "title": { - "edit": "Edit User", - "new": "Add New User" - } + "title": "{type, select, edit{Edit} create{Add New} other{}} User" }, "annotation": "Annotation", "annotation-actions": { @@ -352,8 +337,7 @@ "comments": { "add-comment": "Enter comment", "cancel": "Cancel", - "comment": "{count} comment", - "comments": "{count} comments", + "comments": "{count} {count, plural, one{comment} other{comments}}", "hide-comments": "Hide comments" }, "common": { @@ -376,11 +360,11 @@ "warning": "Warning: this cannot be undone!" }, "confirm-delete-users": { - "cancel": "Keep {usersCount, plural, =0{} one{User} other{Users}}", - "delete": "Delete {usersCount, plural, =0{} one{User} other{Users}}", - "impacted-documents": "All documents pending review from the {usersCount, plural, =0{} one{user} other{users}} will be impacted", - "impacted-dossiers": "{dossiersCount} {dossiersCount, plural, =0{dossiers} one{dossier} other{dossiers}} will be impacted", - "title": "Delete {usersCount, plural, =0{} one{User} other{Users}} from Workspace", + "cancel": "Keep {usersCount, plural, one{User} other{Users}}", + "delete": "Delete {usersCount, plural, one{User} other{Users}}", + "impacted-documents": "All documents pending review from the {usersCount, plural, one{user} other{users}} will be impacted", + "impacted-dossiers": "{dossiersCount} {dossiersCount, plural, one{dossier} other{dossiers}} will be impacted", + "title": "Delete {usersCount, plural, one{User} other{Users}} from Workspace", "toast-error": "Please confirm that you understand the ramifications of your action!", "warning": "Warning: this cannot be undone!" },