Commit d7dd90d7faf4fac2d61f9d4a2ac4f8bca3837f10
1 parent
a924f469
Exists in
master
and in
30 other branches
Not load message format locale files
Showing
2 changed files
with
1 additions
and
4 deletions
Show diff stats
src/app/shared/services/translator.service.spec.ts
... | ... | @@ -49,7 +49,6 @@ describe("Services", () => { |
49 | 49 | $rootScope.$digest(); |
50 | 50 | |
51 | 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 | 52 | expect(component["tmhDynamicLocale"].set).toHaveBeenCalledWith("pt"); |
54 | 53 | expect(component["$translate"].use).toHaveBeenCalledWith("pt"); |
55 | 54 | done(); | ... | ... |
src/app/shared/services/translator.service.ts
... | ... | @@ -31,9 +31,7 @@ export class TranslatorService { |
31 | 31 | } |
32 | 32 | this.changeMomentLocale(language); |
33 | 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 | 37 | translate(text: string) { | ... | ... |