mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix title translation (#3565)
This commit is contained in:
committed by
Eugenio Romano
parent
f298e78392
commit
75e27ccb36
@@ -75,4 +75,16 @@ describe('AppTitle service', () => {
|
||||
translationService.translate.onLangChange.next(<any> {});
|
||||
expect(titleServiceSpy).toHaveBeenCalledWith('привет - My application');
|
||||
});
|
||||
|
||||
it('should update title on new content download', () => {
|
||||
spyOn(translationService, 'instant').and.returnValues('hello', 'привет');
|
||||
|
||||
pageTitleService.setTitle('key');
|
||||
expect(titleServiceSpy).toHaveBeenCalledWith('hello - My application');
|
||||
|
||||
(<any> titleService).setTitle.calls.reset();
|
||||
|
||||
translationService.translate.onTranslationChange.next(<any> {});
|
||||
expect(titleServiceSpy).toHaveBeenCalledWith('привет - My application');
|
||||
});
|
||||
});
|
||||
|
@@ -31,6 +31,7 @@ export class PageTitleService {
|
||||
private appConfig: AppConfigService,
|
||||
private translationService: TranslationService) {
|
||||
translationService.translate.onLangChange.subscribe(() => this.onLanguageChanged());
|
||||
translationService.translate.onTranslationChange.subscribe(() => this.onLanguageChanged());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user