diff --git a/bundles/ng2-translate.js b/bundles/ng2-translate.js index 507818e8..07bda88d 100644 --- a/bundles/ng2-translate.js +++ b/bundles/ng2-translate.js @@ -1,4 +1,5 @@ System.registerDynamic("src/translate.pipe", ["angular2/core", "./translate.service"], true, function($__require, exports, module) { + "use strict"; ; var global = this, __define = global.define; @@ -64,13 +65,14 @@ System.registerDynamic("src/translate.pipe", ["angular2/core", "./translate.serv pure: false }), __metadata('design:paramtypes', [translate_service_1.TranslateService])], TranslatePipe); return TranslatePipe; - })(); + }()); exports.TranslatePipe = TranslatePipe; global.define = __define; return module.exports; }); System.registerDynamic("src/translate.service", ["angular2/core", "angular2/http", "rxjs/Observable", "rxjs/add/observable/fromArray", "rxjs/add/operator/share", "rxjs/add/operator/map", "./translate.parser"], true, function($__require, exports, module) { + "use strict"; ; var global = this, __define = global.define; @@ -118,7 +120,7 @@ System.registerDynamic("src/translate.service", ["angular2/core", "angular2/http }; TranslateStaticLoader = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [http_1.Http, String, String])], TranslateStaticLoader); return TranslateStaticLoader; - })(); + }()); var TranslateService = (function() { function TranslateService(http) { this.http = http; @@ -154,6 +156,10 @@ System.registerDynamic("src/translate.service", ["angular2/core", "angular2/http _this.translations[lang] = res; _this.updateLangs(); _this.pending = undefined; + }, function(err) { + throw err; + }, function() { + _this.pending = undefined; }); return this.pending; }; @@ -176,8 +182,9 @@ System.registerDynamic("src/translate.service", ["angular2/core", "angular2/http var res; if (key instanceof Array) { var result = {}; - for (var _i = 0; _i < key.length; _i++) { - var k = key[_i]; + for (var _i = 0, + key_1 = key; _i < key_1.length; _i++) { + var k = key_1[_i]; result[k] = getParsedResult(translations, k); } return result; @@ -199,7 +206,7 @@ System.registerDynamic("src/translate.service", ["angular2/core", "angular2/http return getParsedResult(_this.parser.flattenObject(res), key); }); } else { - var translations; + var translations = void 0; if (this.translations[this.currentLang]) { translations = this.parser.flattenObject(this.translations[this.currentLang]); } @@ -225,13 +232,14 @@ System.registerDynamic("src/translate.service", ["angular2/core", "angular2/http }; TranslateService = __decorate([core_1.Injectable(), __metadata('design:paramtypes', [http_1.Http])], TranslateService); return TranslateService; - })(); + }()); exports.TranslateService = TranslateService; global.define = __define; return module.exports; }); System.registerDynamic("src/translate.parser", [], true, function($__require, exports, module) { + "use strict"; ; var global = this, __define = global.define; @@ -272,13 +280,14 @@ System.registerDynamic("src/translate.parser", [], true, function($__require, ex return output; }; return Parser; - })(); + }()); exports.Parser = Parser; global.define = __define; return module.exports; }); System.registerDynamic("ng2-translate", ["./src/translate.pipe", "./src/translate.service", "./src/translate.parser"], true, function($__require, exports, module) { + "use strict"; ; var global = this, __define = global.define; diff --git a/package.json b/package.json index 0be2d19f..48b43054 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "scripts": { "test": "tsc && karma start", "test-watch": "tsc && karma start --no-single-run --auto-watch", - "commit": "git-cz", + "commit": "npm run prepublish && git-cz", "prepublish": "typings install && tsc && node make.js", "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, @@ -27,34 +27,34 @@ "typings": "./ng2-translate.d.ts", "homepage": "https://github.com/ocombe/ng2-translate", "peerDependencies": { - "angular2": "~2.0.0-beta.0", - "es6-promise": "~3.0.2", - "es6-shim": "~0.33.3", - "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.0", - "zone.js": "~0.5.10" + "angular2": "^2.0.0-beta.0", + "es6-promise": "^3.0.2", + "es6-shim": "^0.33.3", + "reflect-metadata": "^0.1.2", + "rxjs": "^5.0.0-beta.0", + "zone.js": "^0.5.10" }, "devDependencies": { - "angular2": "2.0.0-beta.6", + "angular2": "2.0.0-beta.7", "commitizen": "~2.5.0", "cz-conventional-changelog": "~1.1.4", - "es6-promise": "~3.0.2", - "es6-shim": "~0.33.3", - "jasmine-core": "~2.3.4", + "es6-promise": "^3.0.2", + "es6-shim": "^0.33.3", + "jasmine-core": "~2.4.1", "karma": "~0.13.15", "karma-chrome-launcher": "~0.2.2", "karma-firefox-launcher": "~0.1.7", "karma-jasmine": "~0.3.6", "karma-typescript-preprocessor": "0.0.21", "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.0", + "rxjs": "5.0.0-beta.2", "semantic-release": "~4.3.5", - "systemjs": "~0.19.6", - "systemjs-builder": "^0.15.6", + "systemjs": "~0.19.22", + "systemjs-builder": "^0.15.9", "tsd": "^0.6.5", - "typescript": "~1.7.3", + "typescript": "^1.8.0", "typings": "^0.6.8", - "zone.js": "0.5.14" + "zone.js": "0.5.15" }, "czConfig": { "path": "node_modules/cz-conventional-changelog"