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
Closed

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

Mike-Jia opened this issue Aug 28, 2019 · 8 comments · Fixed by #4102
Assignees
Labels
🌍 i18n Good First Issue Issues recommended for first-time contributor help wanted

Comments

@Mike-Jia
Copy link

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 位)
@wzhudev wzhudev added Good First Issue Issues recommended for first-time contributor 🌍 i18n labels Aug 28, 2019
@wzhudev
Copy link
Member

wzhudev commented Aug 30, 2019

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

@Mike-Jia
Copy link
Author

@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: '展开'
},

@wzhudev
Copy link
Member

wzhudev 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
Copy link
Contributor

Same with ru_RU.ts

@wzhudev
Copy link
Member

wzhudev commented Sep 3, 2019

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

@Mike-Jia
Copy link
Author

Mike-Jia commented Sep 3, 2019

@wendzhue You submit a PR already, thks.

@Svetomechc
Copy link
Contributor

@wendzhue submitted a PR as you requested.

@wzhudev
Copy link
Member

wzhudev commented Sep 3, 2019

@Svetomechc Great! Really appreciate it.

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

* fix: fix typo

close #4080
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
…O#4102)

* fix(module:i18n): fix i18n interface and Traditional Chinese

* fix: fix typo

close NG-ZORRO#4080
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
…O#4102)

* fix(module:i18n): fix i18n interface and Traditional Chinese

* fix: fix typo

close NG-ZORRO#4080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌍 i18n Good First Issue Issues recommended for first-time contributor help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants