From ac680ae176d858f041bbb5efc5ef2e54fbf1c29f Mon Sep 17 00:00:00 2001 From: mauriziovitale84 Date: Wed, 11 May 2016 10:43:17 +0100 Subject: [PATCH] AlfrescoTranslationLoader fixed build error --- demo-shell-ng2/app/main.ts | 2 +- .../services/AlfrescoTranslationService.d.ts | 9 +++++++++ .../services/AlfrescoTranslationService.js.map | 2 +- .../services/AlfrescoTranslationService.ts | 5 ++--- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.d.ts diff --git a/demo-shell-ng2/app/main.ts b/demo-shell-ng2/app/main.ts index c4f5d7308b..e464bc731f 100644 --- a/demo-shell-ng2/app/main.ts +++ b/demo-shell-ng2/app/main.ts @@ -19,7 +19,7 @@ import {bootstrap} from 'angular2/platform/browser'; import {AppComponent} from './app.component'; import {ROUTER_PROVIDERS} from 'angular2/router'; import {HTTP_PROVIDERS} from 'angular2/http'; -import {TRANSLATE_PROVIDERS, TranslateLoader, TranslateService} from 'ng2-translate/ng2-translate'; +import {TranslateLoader, TranslateService} from 'ng2-translate/ng2-translate'; import {ALFRESCO_AUTHENTICATION} from 'ng2-alfresco-login/ng2-alfresco-login'; import {ALFRESCO_CORE_PROVIDERS} from 'ng2-alfresco-core/services'; import {AlfrescoTranslationLoader} from 'ng2-alfresco-core/services'; diff --git a/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.d.ts b/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.d.ts new file mode 100644 index 0000000000..bc9cc3f5c5 --- /dev/null +++ b/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.d.ts @@ -0,0 +1,9 @@ +import { Http } from 'angular2/http'; +import { Observable } from 'rxjs/Observable'; +export declare class AlfrescoTranslationLoader { + private http; + private prefix; + private suffix; + constructor(http: Http); + getTranslation(lang: string): Observable; +} diff --git a/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.js.map b/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.js.map index ce1b86bd87..ed53f30bf5 100644 --- a/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.js.map +++ b/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.js.map @@ -1 +1 @@ -{"version":3,"file":"AlfrescoTranslationService.js","sourceRoot":"","sources":["AlfrescoTranslationService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YASH;gBAKI,mCAAoB,IAAU;oBAAV,SAAI,GAAJ,IAAI,CAAM;oBAHtB,WAAM,GAAW,MAAM,CAAC;oBACxB,WAAM,GAAW,OAAO,CAAC;gBAGjC,CAAC;gBAED,kDAAc,GAAd,UAAe,IAAY;oBACvB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,kCAAkC,GAAG,CAAG,IAAI,CAAC,MAAM,SAAI,IAAI,GAAG,IAAI,CAAC,MAAM,CAAE,CAAC;yBAC5F,GAAG,CAAC,UAAC,GAAa,IAAK,OAAA,GAAG,CAAC,IAAI,EAAE,EAAV,CAAU,CAAC;yBAClC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,mCAAmC,GAAG,CAAG,IAAI,CAAC,MAAM,SAAI,IAAI,GAAG,IAAI,CAAC,MAAM,CAAE,CAAC;yBAC9F,GAAG,CAAC,UAAC,GAAa,IAAK,OAAA,GAAG,CAAC,IAAI,EAAE,EAAV,CAAU,CAAC,CAAC,CAAC;gBACjD,CAAC;gBAdL;oBAAC,iBAAU,EAAE;;6CAAA;gBAeb,gCAAC;YAAD,CAAC,AAdD,IAcC;YAdD,iEAcC,CAAA"} \ No newline at end of file +{"version":3,"file":"AlfrescoTranslationService.js","sourceRoot":"","sources":["AlfrescoTranslationService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAQH;gBAKI,mCAAoB,IAAU;oBAAV,SAAI,GAAJ,IAAI,CAAM;oBAHtB,WAAM,GAAW,MAAM,CAAC;oBACxB,WAAM,GAAW,OAAO,CAAC;gBAGjC,CAAC;gBAED,kDAAc,GAAd,UAAe,IAAY;oBACvB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,kCAAkC,GAAG,CAAG,IAAI,CAAC,MAAM,SAAI,IAAI,GAAG,IAAI,CAAC,MAAM,CAAE,CAAC;yBAC5F,GAAG,CAAC,UAAC,GAAa,IAAK,OAAA,GAAG,CAAC,IAAI,EAAE,EAAV,CAAU,CAAC;yBAClC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,mCAAmC,GAAG,CAAG,IAAI,CAAC,MAAM,SAAI,IAAI,GAAG,IAAI,CAAC,MAAM,CAAE,CAAC;yBAC9F,GAAG,CAAC,UAAC,GAAa,IAAK,OAAA,GAAG,CAAC,IAAI,EAAE,EAAV,CAAU,CAAC,CAAC,CAAC;gBACjD,CAAC;gBAdL;oBAAC,iBAAU,EAAE;;6CAAA;gBAeb,gCAAC;YAAD,CAAC,AAdD,IAcC;YAdD,iEAcC,CAAA"} \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.ts b/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.ts index dcc83848a5..c5a94745b6 100644 --- a/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.ts +++ b/ng2-components/ng2-alfresco-core/services/AlfrescoTranslationService.ts @@ -18,11 +18,10 @@ import {Injectable} from 'angular2/core'; import {Http, Response} from 'angular2/http'; import {TranslateLoader} from 'ng2-translate/ng2-translate'; -import {Http, Response} from 'angular2/http'; - +import {Observable} from 'rxjs/Observable' @Injectable() -export class AlfrescoTranslationLoader implements TranslateLoader { +export class AlfrescoTranslationLoader { private prefix: string = 'i18n'; private suffix: string = '.json';