diff --git a/client/src/app/core/ui-services/diff.service.spec.ts b/client/src/app/core/ui-services/diff.service.spec.ts
index 953046a1b..2247ffb0b 100644
--- a/client/src/app/core/ui-services/diff.service.spec.ts
+++ b/client/src/app/core/ui-services/diff.service.spec.ts
@@ -1,6 +1,7 @@
import { inject, TestBed } from '@angular/core/testing';
import { DiffService, ModificationType } from './diff.service';
+import { E2EImportsModule } from '../../../e2e-imports.module';
import { LinenumberingService } from './linenumbering.service';
describe('DiffService', () => {
@@ -167,6 +168,7 @@ describe('DiffService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
+ imports: [E2EImportsModule],
providers: [DiffService]
});
});
diff --git a/client/src/app/core/ui-services/diff.service.ts b/client/src/app/core/ui-services/diff.service.ts
index 430a3aeba..c29717ecf 100644
--- a/client/src/app/core/ui-services/diff.service.ts
+++ b/client/src/app/core/ui-services/diff.service.ts
@@ -1,5 +1,7 @@
import { Injectable } from '@angular/core';
+import { TranslateService } from '@ngx-translate/core';
+
import { LineNumberedString, LinenumberingService, LineNumberRange } from './linenumbering.service';
import { ViewUnifiedChange } from '../../shared/models/motions/view-unified-change';
@@ -240,7 +242,10 @@ export class DiffService {
*
* @param {LinenumberingService} lineNumberingService
*/
- public constructor(private readonly lineNumberingService: LinenumberingService) {}
+ public constructor(
+ private readonly lineNumberingService: LinenumberingService,
+ protected translate: TranslateService
+ ) {}
/**
* Searches for the line breaking node within the given Document specified by the given lineNumber.
@@ -2238,11 +2243,15 @@ export class DiffService {
// That's a pretty serious inconsistency that should not happen at all,
// we're just doing some basic damage control here.
const msg =
- 'Inconsistent data.' +
+ this.translate.instant('Inconsistent data.') +
' ' +
- 'A change recommendation or amendment is probably referring to a non-existant line number.' +
+ this.translate.instant(
+ 'A change recommendation or amendment is probably referring to a non-existant line number.'
+ ) +
' ' +
- 'If it is an amendment, you can back up its content when editing it and delete it afterwards.';
+ this.translate.instant(
+ 'If it is an amendment, you can back up its content when editing it and delete it afterwards.'
+ );
return '' + msg + '';
}
@@ -2303,9 +2312,11 @@ export class DiffService {
// That's a pretty serious inconsistency that should not happen at all,
// we're just doing some basic damage control here.
const msg =
- 'Inconsistent data.' +
+ this.translate.instant('Inconsistent data.') +
' ' +
- 'A change recommendation or amendment is probably referring to a non-existant line number.';
+ this.translate.instant(
+ 'A change recommendation or amendment is probably referring to a non-existant line number.'
+ );
return '' + msg + '';
}