Skip to content

Commit

Permalink
Upgraded to rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
robisim74 committed May 4, 2016
1 parent 5292a64 commit d9387a4
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 57 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ To load the package you have two methods:
```Html
<script>
System.config({
defaultJSExtensions: true,
map: {
...
'angular2localization': 'node_modules/angular2localization'
},
packages: {
...
'angular2localization': { defaultExtension: 'js' }
}
});
</script>
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ var config = {
baseURL: path.baseURL,
defaultJSExtensions: true,
map: {
'angular2': 'node_modules/angular2',
'@angular': 'node_modules/@angular',
'rxjs': 'node_modules/rxjs'
},
paths: {
'angular2localization/*': '*.js',
},
meta: {
'node_modules/angular2/*': { build: false },
'node_modules/@angular/*': { build: false },
'node_modules/rxjs/*': { build: false }
}
};
Expand Down
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular2localization",
"version": "0.5.2",
"version": "0.5.3",
"description": "An Angular 2 library to translate messages, dates and numbers",
"main": "",
"scripts": {},
Expand All @@ -25,17 +25,20 @@
"homepage": "https://github.com/robisim74/angular2localization",
"typings": "./angular2localization.d.ts",
"dependencies": {
"angular2": "2.0.0-beta.17",
"systemjs": "0.19.26",
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"systemjs": "0.19.27",
"es6-shim": "^0.35.0",
"reflect-metadata": "0.1.2",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "0.6.12"
"zone.js": "^0.6.12"
},
"devDependencies": {
"typescript": "^1.8.9",
"typescript": "^1.8.10",
"gulp": "^3.9.1",
"del": "^2.2.0",
"systemjs-builder": "^0.15.13"
"systemjs-builder": "^0.15.16"
}
}
1 change: 0 additions & 1 deletion src/main.ts

This file was deleted.

10 changes: 5 additions & 5 deletions src/pipes/locale-date.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* https://github.com/robisim74/angular2localization
*/

import {Injectable, Pipe, PipeTransform} from 'angular2/core';
import {isDate, isNumber, isPresent, DateWrapper, isBlank} from 'angular2/src/facade/lang';
import {DateFormatter} from 'angular2/src/facade/intl';
import {StringMapWrapper} from 'angular2/src/facade/collection';
import {InvalidPipeArgumentException} from 'angular2/src/common/pipes/invalid_pipe_argument_exception';
import {Injectable, Pipe, PipeTransform} from '@angular/core';
import {isDate, isNumber, isPresent, DateWrapper, isBlank} from '@angular/common/src/facade/lang';
import {DateFormatter} from '@angular/common/src/facade/intl';
import {StringMapWrapper} from '@angular/common/src/facade/collection';
import {InvalidPipeArgumentException} from '@angular/common/src/pipes/invalid_pipe_argument_exception';

// Services.
import {LocaleService} from '../services/locale.service';
Expand Down
12 changes: 6 additions & 6 deletions src/pipes/locale-number.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* https://github.com/robisim74/angular2localization
*/

import {Injectable, Pipe, PipeTransform} from 'angular2/core';
import {isNumber, isPresent, isBlank, NumberWrapper, RegExpWrapper} from 'angular2/src/facade/lang';
import {BaseException} from 'angular2/src/facade/exceptions';
import {NumberFormatter, NumberFormatStyle} from 'angular2/src/facade/intl';
import {InvalidPipeArgumentException} from 'angular2/src/common/pipes/invalid_pipe_argument_exception';
import {Injectable, Pipe, PipeTransform} from '@angular/core';
import {isNumber, isPresent, isBlank, NumberWrapper, RegExpWrapper} from '@angular/common/src/facade/lang';
import {BaseException} from '@angular/common/src/facade/exceptions';
import {NumberFormatter, NumberFormatStyle} from '@angular/common/src/facade/intl';
import {InvalidPipeArgumentException} from '@angular/common/src/pipes/invalid_pipe_argument_exception';

// Services.
import {LocaleService} from '../services/locale.service';
Expand Down Expand Up @@ -327,4 +327,4 @@ import {LocaleService} from '../services/locale.service';

return this.localeCurrency;
}
}
}
10 changes: 5 additions & 5 deletions src/pipes/translate.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* https://github.com/robisim74/angular2localization
*/

import {Injectable, Pipe, PipeTransform} from 'angular2/core';
import {Injectable, Pipe, PipeTransform} from '@angular/core';
// Services.
import {LocaleService} from '../services/locale.service';
import {LocalizationService} from '../services/localization.service';
import {LocalizationService, ServiceState} from '../services/localization.service';

/**
* 'translate' pipe function.
Expand Down Expand Up @@ -87,8 +87,8 @@ import {LocalizationService} from '../services/localization.service';
}

// Checks the service state.
if (this.localization.isReady) {

if (this.localization.serviceState == ServiceState.isReady) {
// Updates the key & the value of translation for the key if:
// - the key has changed (i18n);
// - the value is empty;
Expand All @@ -107,7 +107,7 @@ import {LocalizationService} from '../services/localization.service';

this.value = key.replace(formatKey, value);

}, null
}

).then(

Expand Down
10 changes: 5 additions & 5 deletions src/services/locale.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* https://github.com/robisim74/angular2localization
*/

import {Injectable, EventEmitter, Output} from 'angular2/core';
import {Injectable, EventEmitter, Output} from '@angular/core';

/**
* LocaleService class.
Expand Down Expand Up @@ -414,7 +414,7 @@ import {Injectable, EventEmitter, Output} from 'angular2/core';
// Sets the cookie "locale".
this.setCookie("locale", this.defaultLocale, this.expiry);

// Send an event.
// Sends an event.
this.languageCodeChanged.emit(language);
}

Expand Down Expand Up @@ -442,7 +442,7 @@ import {Injectable, EventEmitter, Output} from 'angular2/core';
// Sets the cookie "locale".
this.setCookie("locale", this.defaultLocale, this.expiry);

// Send an event.
// Sends an event.
this.countryCodeChanged.emit(country);
}

Expand Down Expand Up @@ -473,7 +473,7 @@ import {Injectable, EventEmitter, Output} from 'angular2/core';
// Sets the cookie "locale".
this.setCookie("locale", this.defaultLocale, this.expiry);

// Send the events.
// Sends the events.
this.countryCodeChanged.emit(country);
this.languageCodeChanged.emit(language);
}
Expand All @@ -498,7 +498,7 @@ import {Injectable, EventEmitter, Output} from 'angular2/core';
// Sets the cookie "currency".
this.setCookie("currency", this.currencyCode, this.expiry);

// Send an event.
// Sends an event.
this.currencyCodeChanged.emit(currency);
}

Expand Down
Loading

0 comments on commit d9387a4

Please sign in to comment.