Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NzI18nService setLocale(zh_TW) build error: Property 'global' is missing #4080

Closed
Mike-Jia opened this issue Aug 28, 2019 · 8 comments · Fixed by #4102

Comments

@Mike-Jia
Copy link

commented Aug 28, 2019

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-kpifwk

Steps to reproduce

app.component.ts -> ngOnInit:
ngOnInit(){
this.i18n.setLocale(zh_TW); //ERROR!
}

What is expected?

build success.

What is actually happening?

Property 'global' is missing in type '{ locale: string; Pagination: { items_per_page: string; jump_to: string; jump_to_confirm: string; page: string; prev_page: string; next_page: string; prev_5: string; next_5: string; prev_3: string; next_3: string; }; ... 9 more ...; PageHeader: { ...; }; }' but required in type 'NzI18nInterface'.

Environment Info
ng-zorro-antd 8.2.1
Browser 76.0.3809.100(正式版本) (64 位)
@wendzhue

This comment has been minimized.

Copy link
Member

commented Aug 30, 2019

@Mike-Jia Are you interested in fixing this? Something is missing in the zh-TW file.

@Mike-Jia

This comment has been minimized.

Copy link
Author

commented Aug 30, 2019

@wendzhue I can do that. It's only a frew text missing in the zh-TW.ts file.

Compare with zh_CN.ts, missing these fields:

global: {
placeholder: '请选择'
},
Icon: {
icon: '图标'
},
Text: {
edit: '编辑',
copy: '复制',
copied: '复制成功',
expand: '展开'
},

@wendzhue

This comment has been minimized.

Copy link
Member

commented Aug 30, 2019

We really appreciate your contribute! Please send a pull request to us.

BTW, you can refer to i18n files from Ant Design.

@Svetomechc

This comment has been minimized.

Copy link
Contributor

commented Sep 2, 2019

Same with ru_RU.ts

@wendzhue

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

@Svetomechc Could you please submit a PR to fix Russian?

@Mike-Jia

This comment has been minimized.

Copy link
Author

commented Sep 3, 2019

@wendzhue You submit a PR already, thks.

@Svetomechc Svetomechc referenced this issue Sep 3, 2019
1 of 3 tasks complete
@Svetomechc

This comment has been minimized.

Copy link
Contributor

commented Sep 3, 2019

@wendzhue submitted a PR as you requested.

@wendzhue

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

@Svetomechc Great! Really appreciate it.

hsuanxyz added a commit that referenced this issue Sep 6, 2019
fix(module:i18n): fix i18n interface and Traditional Chinese (#4102)
* fix(module:i18n): fix i18n interface and Traditional Chinese

* fix: fix typo

close #4080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.