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

feat: Adds zh_TW localisations for Form #24065

Merged
merged 5 commits into from May 12, 2020
Merged

Conversation

wx1322
Copy link
Contributor

@wx1322 wx1322 commented May 12, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#23369

💡 Background and solution

The missing fields for the traditional Chinese language had been added. It is updated based on the zh_CH and en_US file.

📝 Changelog

Language Changelog
🇺🇸 English Improve zh_TW localisations
🇨🇳 Chinese 完善繁体中文国际化

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@ant-design-bot
Copy link
Contributor

ant-design-bot commented May 12, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 12, 2020

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:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

Merging #24065 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           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           
Impacted Files Coverage Δ
components/locale/zh_TW.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40a987e...b1eda14. Read the comment docs.

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}';
Copy link
Member

@xrkffgg xrkffgg May 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const typeTemplate = '${label}不是一个有效的${type}';
const typeTemplate = '${label}不是一個有效的${type}';

const localeValues: Locale = {
locale: 'zh-tw',
Pagination,
DatePicker,
TimePicker,
Calendar,
global: {
placeholder: '請選擇',
},
Table: {
filterTitle: '篩選器',
filterConfirm: '確 定',
filterReset: '重 置',
Copy link
Member

@xrkffgg xrkffgg May 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
filterReset: '重 置',
filterReset: '重置',

Copy link
Member

@xrkffgg xrkffgg May 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面的確定也不要空格了

collapse: '關閉行',
triggerDesc: '點擊降序',
triggerAsc: '點擊升序',
cancelSort: '取消排序',
},
Modal: {
okText: '確 定',
Copy link
Member

@xrkffgg xrkffgg May 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对照一下 简体的,这些空格都可以去了

Copy link
Contributor Author

@wx1322 wx1322 May 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@yoyo837
Copy link
Contributor

yoyo837 commented May 12, 2020

请更新一下snapshot

okText: '確 定',
cancelText: '取 消',
okText: '確定',
cancelText: '取消',
justOkText: 'OK',
Copy link
Member

@xrkffgg xrkffgg May 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
justOkText: 'OK',
justOkText: '知道了',

Copy link
Member

@xrkffgg xrkffgg May 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

更新下 snap
yarn test -- -u

Copy link
Contributor Author

@wx1322 wx1322 May 12, 2020

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') {
Copy link
Member

@afc163 afc163 May 12, 2020

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

@afc163 afc163 merged commit 49f5ed7 into ant-design:master May 12, 2020
15 of 20 checks passed
@wx1322 wx1322 deleted the hotfix/23369 branch Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants