Skip to content

Commit

Permalink
release(0.6.5): hot fix modal type & i18n error (#722)
Browse files Browse the repository at this point in the history
close #720 close #719
  • Loading branch information
vthinkxie committed Dec 10, 2017
1 parent 6ff34ec commit e9e7751
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-zorro-antd",
"version": "0.6.4",
"version": "0.6.5",
"license": "MIT",
"description": "An enterprise-class UI components based on Ant Design and Angular",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/components/calendar/nz-calendar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class NzCalendarComponent implements OnInit {
_quartersCalendar: QuartersType[] = [];
_listOfWeekName: string[] = [];
_listOfMonthName: string[] = [];
_listOfYearName: string[] = [];
_listOfYearName: number[] = [];
_yearUnit = '年';
_monthUnit = '月';
_showMonth = moment(new Date()).month();
Expand Down Expand Up @@ -397,7 +397,7 @@ export class NzCalendarComponent implements OnInit {
this._monthUnit = moment.duration(4, 'week').humanize().split(' ')[ 1 ][ 0 ].toUpperCase() + moment.duration(4, 'week').humanize().split(' ')[ 1 ].slice(1, moment.duration(4, 'week').humanize().split(' ')[ 1 ].length);
} catch (e) { }
}
this._listOfYearName = this._generateYears(this._showYear).map(x => `${x}`);
this._listOfYearName = this._generateYears(this._showYear);
this._listOfWeekName = moment.weekdaysMin();
this._listOfMonthName = moment.months();
const date = moment(this.nzValue).year(this._showYear).month(this._showMonth);
Expand Down
5 changes: 2 additions & 3 deletions src/components/locale/nz-locale.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ export class NzLocaleService {
// TODO: cache more deeply paths for performance
translate(path: string, data?: any): string {
this._logger.debug(`[NzLocaleService] Translating(${this._locale.locale}): ${path}`);
const content = this._getObjectPath(this._locale, path);
let res = content;
let content = this._getObjectPath(this._locale, path) as string;
if (typeof content === 'string') {
if (data) {
Object.keys(data).forEach((key) => res = content.replace(new RegExp(`%${key}%`, 'g'), data[key]));
Object.keys(data).forEach((key) => content = content.replace(new RegExp(`%${key}%`, 'g'), data[key]));
}
return content;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/nz-modal-subject.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const enum modalEvent {
}

@Injectable()
export class NzModalSubject extends Subject<string> {
export class NzModalSubject extends Subject<string | object> {
modalId: string;
eventsQueue = {};

Expand Down
7 changes: 7 additions & 0 deletions src/showcase/nz-intro-changelog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@

更新日志也可以在[Github](https://github.com/NG-ZORRO/ng-zorro-antd/releases)查看

## 0.6.5
`2017-12-10`

### Bug Fixes
* 修复 `Modal` 类型兼容问题 [#722](https://github.com/NG-ZORRO/ng-zorro-antd/pull/722)
* 修复 `i18n` 替换问题 [#722](https://github.com/NG-ZORRO/ng-zorro-antd/pull/722)

## 0.6.4
`2017-12-10`

Expand Down

0 comments on commit e9e7751

Please sign in to comment.