Jelajahi Sumber

fix(admin-ui): Localize notifications

Michael Bromley 7 tahun lalu
induk
melakukan
c3780c38f5

+ 1 - 1
admin-ui/src/app/core/components/notification/notification.component.html

@@ -8,6 +8,6 @@
         'warning': type === 'warning'
      }">
     <clr-icon [attr.shape]="getIcon()" size="24"></clr-icon>
-    {{ message }}
+    {{ message | translate }}
 </div>
 

+ 2 - 0
admin-ui/src/app/core/providers/notification/notification.service.spec.ts

@@ -2,6 +2,7 @@ import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
 import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
 import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
 
+import { TestingCommonModule } from '../../../../testing/testing-common.module';
 import { NotificationComponent } from '../../components/notification/notification.component';
 import { OverlayHostComponent } from '../../components/overlay-host/overlay-host.component';
 import { OverlayHostService } from '../overlay-host/overlay-host.service';
@@ -11,6 +12,7 @@ import { NotificationService } from './notification.service';
 describe('NotificationService:', () => {
     beforeEach(() => {
         TestBed.configureTestingModule({
+            imports: [TestingCommonModule],
             declarations: [NotificationComponent, OverlayHostComponent, TestComponent],
             providers: [NotificationService, OverlayHostService],
             schemas: [CUSTOM_ELEMENTS_SCHEMA],