diff --git a/demo-shell-ng2/app/app.component.ts b/demo-shell-ng2/app/app.component.ts index 13527b90f4..f20fe18c0f 100644 --- a/demo-shell-ng2/app/app.component.ts +++ b/demo-shell-ng2/app/app.component.ts @@ -61,7 +61,7 @@ export class AppComponent { alfrescoSettingsService.host = 'http://192.168.99.100:8080'; this.translate = translate; - this.translate.translationInit(' '); + this.translate.addTranslationFolder(); } isActive(instruction: any[]): boolean { diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json index 768a3ea70e..4f664367eb 100644 --- a/ng2-components/ng2-alfresco-core/package.json +++ b/ng2-components/ng2-alfresco-core/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-core", "description": "Alfresco Angular 2 Components core", - "version": "0.1.26", + "version": "0.1.27", "author": "Alfresco Software, Ltd.", "scripts": { "typings": "typings install", diff --git a/ng2-components/ng2-alfresco-core/src/services/AlfrescoTranslationService.service.ts b/ng2-components/ng2-alfresco-core/src/services/AlfrescoTranslationService.service.ts index 4f14711ea0..2f7f443b37 100644 --- a/ng2-components/ng2-alfresco-core/src/services/AlfrescoTranslationService.service.ts +++ b/ng2-components/ng2-alfresco-core/src/services/AlfrescoTranslationService.service.ts @@ -27,18 +27,13 @@ export class AlfrescoTranslationService extends TranslateService { constructor(http: Http, currentLoader: AlfrescoTranslationLoader, @Optional() missingTranslationHandler: MissingTranslationHandler) { super(http, currentLoader, missingTranslationHandler); - } - - translationInit(name?: string): void { - let userLang = navigator.language.split('-')[0]; // use navigator lang if available - userLang = /(fr|en)/gi.test(userLang) ? userLang : 'en'; - this.userLang = userLang; + this.userLang = navigator.language.split('-')[0]; // use navigator lang if available + this.userLang = /(fr|en)/gi.test(this.userLang) ? this.userLang : 'en'; this.setDefaultLang(this.userLang); - this.addComponent(name); } - addComponent(name: string) { - if (name && !this.currentLoader.existComponent(name)) { + addTranslationFolder(name: string = '') { + if (!this.currentLoader.existComponent(name)) { this.currentLoader.addComponentList(name); this.getTranslation(this.userLang); } diff --git a/ng2-components/ng2-alfresco-documentlist/README.md b/ng2-components/ng2-alfresco-documentlist/README.md index 88dc432369..f4cdb2313c 100644 --- a/ng2-components/ng2-alfresco-documentlist/README.md +++ b/ng2-components/ng2-alfresco-documentlist/README.md @@ -95,7 +95,7 @@ class DocumentListDemo implements OnInit { documentActions: DocumentActionsService) { settings.host = 'http://192.168.99.100:8080'; - translation.translationInit(); + translation.addTranslationFolder(); documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this)); } diff --git a/ng2-components/ng2-alfresco-documentlist/demo/src/main.ts b/ng2-components/ng2-alfresco-documentlist/demo/src/main.ts index c7e5179959..7039be2ba2 100644 --- a/ng2-components/ng2-alfresco-documentlist/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-documentlist/demo/src/main.ts @@ -160,7 +160,7 @@ class DocumentListDemo implements OnInit { this.token = localStorage.getItem('token'); } - translation.translationInit(' '); + translation.addTranslationFolder(); documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this)); } diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index 4d89fb5ac4..33868fe767 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-documentlist", "description": "Alfresco Angular2 Document List Component", - "version": "0.1.20", + "version": "0.1.21", "author": "Alfresco Software, Ltd.", "scripts": { "typings": "typings install", diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index b3f276ceb5..554e0674de 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-login", "description": "Alfresco Angular2 Login Component", - "version": "0.1.14", + "version": "0.1.15", "author": "Alfresco Software, Ltd.", "scripts": { "typings": "typings install", diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts index f9d75261dc..b563280bb4 100644 --- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts +++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts @@ -88,7 +88,7 @@ export class AlfrescoLoginComponent { } }; - translate.addComponent('node_modules/ng2-alfresco-login'); + translate.addTranslationFolder('node_modules/ng2-alfresco-login'); this.form.valueChanges.subscribe(data => this.onValueChanged(data)); diff --git a/ng2-components/ng2-alfresco-search/README.md b/ng2-components/ng2-alfresco-search/README.md index 3ccceede7c..c7d2ed09d3 100644 --- a/ng2-components/ng2-alfresco-search/README.md +++ b/ng2-components/ng2-alfresco-search/README.md @@ -132,7 +132,7 @@ class SearchDemo implements OnInit { translation: AlfrescoTranslationService) { settings.host = this.host; - translation.translationInit(); + translation.addTranslationFolder(); } searchTermChange(event) { @@ -281,7 +281,7 @@ class SearchDemo implements OnInit { translation: AlfrescoTranslationService) { settings.host = this.host; - translation.translationInit(); + translation.addTranslationFolder(); } searchTermChange(event) { diff --git a/ng2-components/ng2-alfresco-search/demo/src/main.ts b/ng2-components/ng2-alfresco-search/demo/src/main.ts index cfa3ea46c9..5abc0ce14d 100644 --- a/ng2-components/ng2-alfresco-search/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-search/demo/src/main.ts @@ -76,7 +76,7 @@ class SearchDemo implements OnInit { this.token = localStorage.getItem('token'); } - translation.translationInit(); + translation.addTranslationFolder(); } public updateToken(): void { diff --git a/ng2-components/ng2-alfresco-search/package.json b/ng2-components/ng2-alfresco-search/package.json index a89036ef00..72b4a87c31 100644 --- a/ng2-components/ng2-alfresco-search/package.json +++ b/ng2-components/ng2-alfresco-search/package.json @@ -1,101 +1,101 @@ { - "name": "ng2-alfresco-search", - "description": "Alfresco Angular2 Search Component", - "version": "0.1.14", - "author": "Alfresco Software, Ltd.", - "scripts": { - "typings": "typings install", - "server": "http-server -c-1 -o -p 8875 .", - "build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check", - "build:w": "npm run tslint && typings install && rm -rf dist && npm run watch-task", - "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", - "tslint": "npm run tslint-src && npm run tslint-root", - "tslint-src": "tslint -c tslint.json src/**/*.ts, src/**/*.spec.ts ", - "tslint-root": "tslint -c tslint.json *.ts", - "copytemplates": "npm run copy-html-css && npm run copy-i18n", - "copytemplates:w": "concurrently \"npm run copy-html-css:w\" \"npm run copy-i18n:w\"", - "copy-html-css": "cpx './src/**/*.{html,css}' dist/src", - "copy-html-css:w": "cpx './src/**/*.{html,css}' dist/src -w", - "copy-i18n": "cpx './i18n/**/*.json' dist/i18n", - "copy-i18n:w": "cpx './i18n/**/*.json' dist/i18n -w", - "tsc": "tsc", - "tsc:w": "tsc -w", - "pretest": "npm run build", - "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", - "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", - "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", - "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", - "prepublish": "npm run build" - }, - "repository": { - "type": "git", - "url": "https://github.com/Alfresco/dev-platform-webcomponents.git" - }, - "bugs": { - "url": "https://github.com/Alfresco/dev-platform-webcomponents/issues" - }, - "license": "Apache-2.0", - "contributors": [ - { - "name": "Will Abson", - "email": "will.abson@alfresco.com" - } - ], - "keywords": [ - "ng2", - "angular", - "angular2", - "alfresco" - ], - "dependencies": { - "angular2": "2.0.0-beta.15", - "systemjs": "0.19.26", - "es6-shim": "^0.35.0", - "ng2-alfresco-core": "^0.1.25", - "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.2", - "zone.js": "^0.6.12", - "es6-module-loader": "^0.17.8", - "alfresco-js-api": "^0.1.0" - }, - "peerDependencies": { - "angular2": "2.0.0-beta.15" - }, - "devDependencies": { - "concurrently": "^2.1.0", - "coveralls": "^2.11.9", - "cpx": "^1.3.1", - "http-server": "0.8.5", - "jasmine-core": "2.4.1", - "karma": "~0.13.22", - "karma-chrome-launcher": "~1.0.1", - "karma-coverage": "^1.0.0", - "karma-jasmine": "~1.0.2", - "karma-mocha-reporter": "^2.0.3", - "karma-jasmine-html-reporter": "^0.2.0", - "license-check": "^1.0.4", - "remap-istanbul": "^0.6.3", - "traceur": "^0.0.91", - "tslint": "^3.8.1", - "typescript": "^1.8.10", - "typings": "^0.7.12" - }, - "license-check-config": { - "src": [ - "**/*.js", - "**/*.ts", - "!/**/coverage/**/*", - "!/**/demo/**/*", - "!/**/node_modules/**/*", - "!/**/typings/**/*", - "!*.js" - ], - "path": "assets/license_header.txt", - "blocking": false, - "logInfo": false, - "logError": true - }, - "publishConfig": { - "registry": "http://devproducts.alfresco.me:4873/" + "name": "ng2-alfresco-search", + "description": "Alfresco Angular2 Search Component", + "version": "0.1.15", + "author": "Alfresco Software, Ltd.", + "scripts": { + "typings": "typings install", + "server": "http-server -c-1 -o -p 8875 .", + "build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check", + "build:w": "npm run tslint && typings install && rm -rf dist && npm run watch-task", + "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", + "tslint": "npm run tslint-src && npm run tslint-root", + "tslint-src": "tslint -c tslint.json src/**/*.ts, src/**/*.spec.ts ", + "tslint-root": "tslint -c tslint.json *.ts", + "copytemplates": "npm run copy-html-css && npm run copy-i18n", + "copytemplates:w": "concurrently \"npm run copy-html-css:w\" \"npm run copy-i18n:w\"", + "copy-html-css": "cpx './src/**/*.{html,css}' dist/src", + "copy-html-css:w": "cpx './src/**/*.{html,css}' dist/src -w", + "copy-i18n": "cpx './i18n/**/*.json' dist/i18n", + "copy-i18n:w": "cpx './i18n/**/*.json' dist/i18n -w", + "tsc": "tsc", + "tsc:w": "tsc -w", + "pretest": "npm run build", + "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", + "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", + "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", + "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", + "prepublish": "npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/Alfresco/dev-platform-webcomponents.git" + }, + "bugs": { + "url": "https://github.com/Alfresco/dev-platform-webcomponents/issues" + }, + "license": "Apache-2.0", + "contributors": [ + { + "name": "Will Abson", + "email": "will.abson@alfresco.com" } + ], + "keywords": [ + "ng2", + "angular", + "angular2", + "alfresco" + ], + "dependencies": { + "angular2": "2.0.0-beta.15", + "systemjs": "0.19.26", + "es6-shim": "^0.35.0", + "ng2-alfresco-core": "^0.1.25", + "reflect-metadata": "0.1.2", + "rxjs": "5.0.0-beta.2", + "zone.js": "^0.6.12", + "es6-module-loader": "^0.17.8", + "alfresco-js-api": "^0.1.0" + }, + "peerDependencies": { + "angular2": "2.0.0-beta.15" + }, + "devDependencies": { + "concurrently": "^2.1.0", + "coveralls": "^2.11.9", + "cpx": "^1.3.1", + "http-server": "0.8.5", + "jasmine-core": "2.4.1", + "karma": "~0.13.22", + "karma-chrome-launcher": "~1.0.1", + "karma-coverage": "^1.0.0", + "karma-jasmine": "~1.0.2", + "karma-mocha-reporter": "^2.0.3", + "karma-jasmine-html-reporter": "^0.2.0", + "license-check": "^1.0.4", + "remap-istanbul": "^0.6.3", + "traceur": "^0.0.91", + "tslint": "^3.8.1", + "typescript": "^1.8.10", + "typings": "^0.7.12" + }, + "license-check-config": { + "src": [ + "**/*.js", + "**/*.ts", + "!/**/coverage/**/*", + "!/**/demo/**/*", + "!/**/node_modules/**/*", + "!/**/typings/**/*", + "!*.js" + ], + "path": "assets/license_header.txt", + "blocking": false, + "logInfo": false, + "logError": true + }, + "publishConfig": { + "registry": "http://devproducts.alfresco.me:4873/" + } } diff --git a/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.ts b/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.ts index df449afa27..b94b97859b 100644 --- a/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.ts +++ b/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.ts @@ -48,7 +48,7 @@ export class AlfrescoSearchComponent implements OnChanges, OnInit { private translate: AlfrescoTranslationService, @Optional() params: RouteParams) { - translate.addComponent('node_modules/ng2-alfresco-search'); + translate.addTranslationFolder('node_modules/ng2-alfresco-search'); this.results = null; if (params) { diff --git a/ng2-components/ng2-alfresco-upload/package.json b/ng2-components/ng2-alfresco-upload/package.json index 62daeb8d92..2f626d5e08 100644 --- a/ng2-components/ng2-alfresco-upload/package.json +++ b/ng2-components/ng2-alfresco-upload/package.json @@ -1,108 +1,108 @@ { - "name": "ng2-alfresco-upload", - "description": "Alfresco Angular2 Upload Component", - "version": "0.1.32", - "author": "Alfresco Software, Ltd.", - "scripts": { - "typings": "typings install", - "server": "http-server -c-1 -o -p 8875 .", - "build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check", - "build:w": "npm run tslint && typings install && rm -rf dist && npm run watch-task", - "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", - "tslint": "npm run tslint-src && npm run tslint-root", - "tslint-src": "tslint -c tslint.json src/**/*.ts, src/**/*.spec.ts ", - "tslint-root": "tslint -c tslint.json *.ts", - "copytemplates": "npm run copy-html-css && npm run copy-i18n", - "copytemplates:w": "concurrently \"npm run copy-html-css:w\" \"npm run copy-i18n:w\"", - "copy-html-css": "cpx './src/**/*.{html,css}' dist/src", - "copy-html-css:w": "cpx './src/**/*.{html,css}' dist/src -w", - "copy-i18n": "cpx './i18n/**/*.json' dist/i18n", - "copy-i18n:w": "cpx './i18n/**/*.json' dist/i18n -w", - "tsc": "tsc", - "tsc:w": "tsc -w", - "pretest": "npm run build", - "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", - "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", - "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", - "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", - "prepublish": "npm run build" + "name": "ng2-alfresco-upload", + "description": "Alfresco Angular2 Upload Component", + "version": "0.1.33", + "author": "Alfresco Software, Ltd.", + "scripts": { + "typings": "typings install", + "server": "http-server -c-1 -o -p 8875 .", + "build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check", + "build:w": "npm run tslint && typings install && rm -rf dist && npm run watch-task", + "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", + "tslint": "npm run tslint-src && npm run tslint-root", + "tslint-src": "tslint -c tslint.json src/**/*.ts, src/**/*.spec.ts ", + "tslint-root": "tslint -c tslint.json *.ts", + "copytemplates": "npm run copy-html-css && npm run copy-i18n", + "copytemplates:w": "concurrently \"npm run copy-html-css:w\" \"npm run copy-i18n:w\"", + "copy-html-css": "cpx './src/**/*.{html,css}' dist/src", + "copy-html-css:w": "cpx './src/**/*.{html,css}' dist/src -w", + "copy-i18n": "cpx './i18n/**/*.json' dist/i18n", + "copy-i18n:w": "cpx './i18n/**/*.json' dist/i18n -w", + "tsc": "tsc", + "tsc:w": "tsc -w", + "pretest": "npm run build", + "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", + "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", + "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", + "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", + "prepublish": "npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/Alfresco/dev-platform-webcomponents.git" + }, + "bugs": { + "url": "https://github.com/Alfresco/dev-platform-webcomponents/issues" + }, + "license": "Apache-2.0", + "contributors": [ + { + "name": "Mario Romano", + "email": "mario.romano83@gmail.com" }, - "repository": { - "type": "git", - "url": "https://github.com/Alfresco/dev-platform-webcomponents.git" - }, - "bugs": { - "url": "https://github.com/Alfresco/dev-platform-webcomponents/issues" - }, - "license": "Apache-2.0", - "contributors": [ - { - "name": "Mario Romano", - "email": "mario.romano83@gmail.com" - }, - { - "name": "Eugenio Romano", - "email": "eugenio.romano@alfresco.com" - } - ], - "keywords": [ - "ng2", - "angular", - "angular2", - "upload", - "alfresco" - ], - "dependencies": { - "alfresco-core-rest-api": "^0.1.0", - "angular2": "2.0.0-beta.15", - "es6-module-loader": "^0.17.8", - "es6-shim": "^0.35.0", - "ng2-alfresco-core": "^0.1.0", - "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.2", - "systemjs": "0.19.26", - "zone.js": "^0.6.12" - }, - "peerDependencies": { - "angular2": "2.0.0-beta.15" - }, - "devDependencies": { - "concurrently": "^2.1.0", - "coveralls": "^2.11.9", - "cpx": "^1.3.1", - "http-server": "0.8.5", - "jasmine-ajax": "^3.2.0", - "jasmine-core": "2.4.1", - "karma": "~0.13.22", - "karma-chrome-launcher": "~1.0.1", - "karma-coverage": "^1.0.0", - "karma-jasmine": "~1.0.2", - "karma-jasmine-ajax": "^0.1.13", - "karma-jasmine-html-reporter": "^0.2.0", - "karma-mocha-reporter": "^2.0.3", - "license-check": "^1.0.4", - "remap-istanbul": "^0.6.3", - "traceur": "^0.0.91", - "tslint": "^3.8.1", - "typescript": "^1.8.10", - "typings": "^0.7.12" - }, - "license-check-config": { - "src": [ - "**/*.js", - "**/*.ts", - "!/**/coverage/**/*", - "!/**/demo/**/*", - "!/**/node_modules/**/*", - "!/**/typings/**/*", - "!*.js" - ], - "path": "assets/license_header.txt", - "blocking": false, - "logInfo": false, - "logError": true - }, - "publishConfig": { - "registry": "http://devproducts.alfresco.me:4873/" + { + "name": "Eugenio Romano", + "email": "eugenio.romano@alfresco.com" } + ], + "keywords": [ + "ng2", + "angular", + "angular2", + "upload", + "alfresco" + ], + "dependencies": { + "alfresco-core-rest-api": "^0.1.0", + "angular2": "2.0.0-beta.15", + "es6-module-loader": "^0.17.8", + "es6-shim": "^0.35.0", + "ng2-alfresco-core": "^0.1.0", + "reflect-metadata": "0.1.2", + "rxjs": "5.0.0-beta.2", + "systemjs": "0.19.26", + "zone.js": "^0.6.12" + }, + "peerDependencies": { + "angular2": "2.0.0-beta.15" + }, + "devDependencies": { + "concurrently": "^2.1.0", + "coveralls": "^2.11.9", + "cpx": "^1.3.1", + "http-server": "0.8.5", + "jasmine-ajax": "^3.2.0", + "jasmine-core": "2.4.1", + "karma": "~0.13.22", + "karma-chrome-launcher": "~1.0.1", + "karma-coverage": "^1.0.0", + "karma-jasmine": "~1.0.2", + "karma-jasmine-ajax": "^0.1.13", + "karma-jasmine-html-reporter": "^0.2.0", + "karma-mocha-reporter": "^2.0.3", + "license-check": "^1.0.4", + "remap-istanbul": "^0.6.3", + "traceur": "^0.0.91", + "tslint": "^3.8.1", + "typescript": "^1.8.10", + "typings": "^0.7.12" + }, + "license-check-config": { + "src": [ + "**/*.js", + "**/*.ts", + "!/**/coverage/**/*", + "!/**/demo/**/*", + "!/**/node_modules/**/*", + "!/**/typings/**/*", + "!*.js" + ], + "path": "assets/license_header.txt", + "blocking": false, + "logInfo": false, + "logError": true + }, + "publishConfig": { + "registry": "http://devproducts.alfresco.me:4873/" + } } diff --git a/ng2-components/ng2-alfresco-upload/src/assets/translation.service.mock.ts b/ng2-components/ng2-alfresco-upload/src/assets/translation.service.mock.ts index fe3b045ec8..81abc5753a 100644 --- a/ng2-components/ng2-alfresco-upload/src/assets/translation.service.mock.ts +++ b/ng2-components/ng2-alfresco-upload/src/assets/translation.service.mock.ts @@ -35,7 +35,7 @@ export class TranslationMock { console.log('mock'); } - addComponent() { + addTranslationFolder() { } diff --git a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts index 0c110f2551..5ce2ffe993 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts @@ -56,7 +56,7 @@ export class FileUploadingDialogComponent implements OnInit{ constructor(private cd: ChangeDetectorRef, translate: AlfrescoTranslationService, private _uploaderService: UploadService) { - translate.addComponent('node_modules/ng2-alfresco-upload'); + translate.addTranslationFolder('node_modules/ng2-alfresco-upload'); } ngOnInit() { diff --git a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts index c23eee7aa8..9c5138c040 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts @@ -95,7 +95,7 @@ export class UploadButtonComponent { } }); this.translate = translate; - this.translate.addComponent('node_modules/ng2-alfresco-upload'); + this.translate.addTranslationFolder('node_modules/ng2-alfresco-upload'); } /** @@ -104,7 +104,7 @@ export class UploadButtonComponent { * @param {File[]} files - files dropped in the drag area. */ onFilesAdded($event: any): void { - let files = $event.currentTarget.files; + let files = $event.currentTarget.files;alfres this.printFileInfo(files); this.uploadFiles(this.uploaddirectory, files); // reset the value of the input file