Ng-zorro-antd: NzI18nService setLocale(zh_TW) build error: Property 'global' is missing

Created on 28 Aug 2019  ·  8Comments  ·  Source: NG-ZORRO/ng-zorro-antd

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 位) |

i18n Good First Issue help wanted

All 8 comments

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

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

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

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

Same with ru_RU.ts

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

@wendzhue You submit a PR already, thks.

@wendzhue submitted a PR as you requested.

@Svetomechc Great! Really appreciate it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

C-racker picture C-racker  ·  3Comments

s01c83l picture s01c83l  ·  3Comments

Ximena-con picture Ximena-con  ·  3Comments

vthinkxie picture vthinkxie  ·  3Comments

ismezy picture ismezy  ·  3Comments