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
feat: Adds zh_TW localisations for Form #24065
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b1eda14:
|
Codecov Report
@@ Coverage Diff @@
## master #24065 +/- ##
=======================================
Coverage 98.83% 98.83%
=======================================
Files 364 364
Lines 7290 7291 +1
Branches 2028 2028
=======================================
+ Hits 7205 7206 +1
Misses 85 85
Continue to review full report at Codecov.
|
components/locale/zh_TW.tsx
Outdated
import Pagination from 'rc-pagination/lib/locale/zh_TW'; | ||
import DatePicker from '../date-picker/locale/zh_TW'; | ||
import TimePicker from '../time-picker/locale/zh_TW'; | ||
import Calendar from '../calendar/locale/zh_TW'; | ||
import { Locale } from '../locale-provider'; | ||
|
||
const typeTemplate = '${label}不是一个有效的${type}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const typeTemplate = '${label}不是一个有效的${type}'; | |
const typeTemplate = '${label}不是一個有效的${type}'; |
components/locale/zh_TW.tsx
Outdated
const localeValues: Locale = { | ||
locale: 'zh-tw', | ||
Pagination, | ||
DatePicker, | ||
TimePicker, | ||
Calendar, | ||
global: { | ||
placeholder: '請選擇', | ||
}, | ||
Table: { | ||
filterTitle: '篩選器', | ||
filterConfirm: '確 定', | ||
filterReset: '重 置', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filterReset: '重 置', | |
filterReset: '重置', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面的確定也不要空格了
components/locale/zh_TW.tsx
Outdated
collapse: '關閉行', | ||
triggerDesc: '點擊降序', | ||
triggerAsc: '點擊升序', | ||
cancelSort: '取消排序', | ||
}, | ||
Modal: { | ||
okText: '確 定', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对照一下 简体的,这些空格都可以去了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
请更新一下snapshot |
components/locale/zh_TW.tsx
Outdated
okText: '確 定', | ||
cancelText: '取 消', | ||
okText: '確定', | ||
cancelText: '取消', | ||
justOkText: 'OK', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
justOkText: 'OK', | |
justOkText: '知道了', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
更新下 snap
yarn test -- -u
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
@@ -220,7 +220,7 @@ describe('Locale Provider', () => { | |||
'.ant-btn:not(.ant-btn-primary) span', | |||
)[0].innerHTML; | |||
let okButtonText = currentConfirmNode.querySelectorAll('.ant-btn-primary span')[0].innerHTML; | |||
if (locale.locale === 'zh-cn') { | |||
if (locale.locale === 'zh-cn' || locale.locale === 'zh-tw') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locale.locale.indexOf('zh-') === 0
#23369
The missing fields for the traditional Chinese language had been added. It is updated based on the zh_CH and en_US file.
zh_TW
localisations