Commit d7dd90d7faf4fac2d61f9d4a2ac4f8bca3837f10

Authored by Victor Costa
1 parent a924f469

Not load message format locale files

src/app/shared/services/translator.service.spec.ts
@@ -49,7 +49,6 @@ describe("Services", () => { @@ -49,7 +49,6 @@ describe("Services", () => {
49 $rootScope.$digest(); 49 $rootScope.$digest();
50 50
51 expect(component["angularLoad"].loadScript).toHaveBeenCalledWith("/bower_components/moment/locale/pt.js"); 51 expect(component["angularLoad"].loadScript).toHaveBeenCalledWith("/bower_components/moment/locale/pt.js");
52 - expect(component["angularLoad"].loadScript).toHaveBeenCalledWith("/bower_components/messageformat/locale/pt.js");  
53 expect(component["tmhDynamicLocale"].set).toHaveBeenCalledWith("pt"); 52 expect(component["tmhDynamicLocale"].set).toHaveBeenCalledWith("pt");
54 expect(component["$translate"].use).toHaveBeenCalledWith("pt"); 53 expect(component["$translate"].use).toHaveBeenCalledWith("pt");
55 done(); 54 done();
src/app/shared/services/translator.service.ts
@@ -31,9 +31,7 @@ export class TranslatorService { @@ -31,9 +31,7 @@ export class TranslatorService {
31 } 31 }
32 this.changeMomentLocale(language); 32 this.changeMomentLocale(language);
33 this.tmhDynamicLocale.set(language); 33 this.tmhDynamicLocale.set(language);
34 - this.angularLoad.loadScript(`/bower_components/messageformat/locale/${language}.js`).then(() => {  
35 - return this.$translate.use(language);  
36 - }); 34 + return this.$translate.use(language);
37 } 35 }
38 36
39 translate(text: string) { 37 translate(text: string) {