From 656f317c4df34a092d6b859f48e6e9bee9db436f Mon Sep 17 00:00:00 2001 From: bushuai Date: Wed, 13 Jan 2021 19:34:58 +0800 Subject: [PATCH 1/5] fix(DatePicker): time select formatter --- source/components/DatePicker/TimePicker.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/components/DatePicker/TimePicker.tsx b/source/components/DatePicker/TimePicker.tsx index 6a19b7bfc..339724828 100644 --- a/source/components/DatePicker/TimePicker.tsx +++ b/source/components/DatePicker/TimePicker.tsx @@ -71,12 +71,13 @@ export default class TimePicker extends BasePicker { { (Locales: LocaleProperties["DatePicker"]) => ( ) } From 32322c1e994e5ba0abec132a279e91a45df46f4c Mon Sep 17 00:00:00 2001 From: SummerOverture <740834798@qq.com> Date: Thu, 14 Jan 2021 15:22:59 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix(Select):=20=E4=BF=AE=E5=A4=8DSelect?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20=E5=A4=9A=E9=80=89=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E5=8F=96=E6=B6=88=E7=A1=AE=E5=AE=9A=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=9C=AA=E8=A2=AB=E5=9B=BD=E9=99=85=E5=8C=96=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/Select/Select.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/components/Select/Select.tsx b/source/components/Select/Select.tsx index ae4d923fd..6da2e6c86 100644 --- a/source/components/Select/Select.tsx +++ b/source/components/Select/Select.tsx @@ -874,7 +874,7 @@ class Select extends React.Component { className={`${dropdownCls}-footer-btn`} onClick={this.handleCancelSelect} > - 取消 + {Locale.cancelText} From 15d1849f34d17b9057a66d211bbe0117cd6f72fa Mon Sep 17 00:00:00 2001 From: SummerOverture <740834798@qq.com> Date: Thu, 14 Jan 2021 15:49:28 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E7=B9=81=E4=BD=93=E4=B8=AD=E6=96=87?= =?UTF-8?q?=EF=BC=88=E4=B8=AD=E5=9B=BD=E5=8F=B0=E6=B9=BE=EF=BC=89(zh=5FTW)?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/docs/zh-CN/i18n.md | 3 +- source/components/Locale/index.ts | 4 +- source/components/Locale/zh_TW.ts | 236 ++++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+), 2 deletions(-) create mode 100644 source/components/Locale/zh_TW.ts diff --git a/site/docs/zh-CN/i18n.md b/site/docs/zh-CN/i18n.md index 50bece08a..902e1a4e1 100644 --- a/site/docs/zh-CN/i18n.md +++ b/site/docs/zh-CN/i18n.md @@ -26,5 +26,6 @@ return ( ppfish 目前支持的语言包如下: - 简体中文(zh_CN) -- 英文 (en_US) +- 繁体中文(中国台湾)(zh_TW) +- 英文 (en_US) diff --git a/source/components/Locale/index.ts b/source/components/Locale/index.ts index ca1f98666..c3eb4d5ba 100644 --- a/source/components/Locale/index.ts +++ b/source/components/Locale/index.ts @@ -1,5 +1,6 @@ import zh_CN from "./zh_CN"; import en_US from './en_US'; +import zh_TW from './zh_TW'; type keyString = { @@ -34,7 +35,8 @@ export interface LocaleProperties { const Locale = { zh_CN, - en_US + en_US, + zh_TW, } export default Locale diff --git a/source/components/Locale/zh_TW.ts b/source/components/Locale/zh_TW.ts new file mode 100644 index 000000000..4028a4bed --- /dev/null +++ b/source/components/Locale/zh_TW.ts @@ -0,0 +1,236 @@ +import { LocaleProperties } from '.'; + +const localeValues: LocaleProperties = { + locale: 'zh_TW', + AudioPlayer: { + notSupport: '您的瀏覽器不支持 audio 標籤。' + }, + AutoComplete: { + notFoundContent: '無匹配結果' + }, + Cascader: { + placeholder: '請選擇', + notFoundContent: '無匹配結果' + }, + Table: { + filterTitle: '篩選', + filterConfirm: '確定', + filterReset: '重置', + filterEmptyText: '無篩選項', + emptyText: '暫無數據', + selectAll: '全選當頁', + selectInvert: '反選當頁', + selectionAll: '全選所有', + sortTitle: '排序', + expand: '展開行', + collapse: '關閉行', + triggerDesc: '點擊降序', + triggerAsc: '點擊升序', + cancelSort: '取消排序', + modalTitle: '選擇需要展示的數據項', + defaultOptionTitle: '默認展示數據項', + okText: '確定', + cancelText: '取消', + }, + Modal: { + okText: '確定', + cancelText: '取消', + }, + Pagination: { + items_per_page: '條/頁', + jump_to: '跳至', + jump_to_confirm: '確定', + page: '頁', + + // Pagination.js + prev_page: '上一頁', + next_page: '下一頁', + prev_5: '向前 5 頁', + next_5: '向後 5 頁', + prev_3: '向前 3 頁', + next_3: '向後 3 頁', + }, + RichEditor: { + // editor + insertImageTip: '支持jpg、jpeg、png、gif、bmp格式的圖片,最佳顯示高度不超過400px,寬度不超過270px。', + rule1: '1、單個視頻不超過10M,支持MP4、3GP格式視頻。', + rule2: '2、最佳顯示高度不超過400px', + PleaseEnterTheVideolinkURL: "請輸入視頻鏈接URL", + selectLocalVideo: '選擇本地視頻', + videoLink: '視頻鏈接', + localVideo: "本地視頻", + insertVideo: '插入視頻', + selectLocalImage: "選擇本地圖片", + insertAttachment: "插入附件", + selectLocalFile: "選擇本地文件", + HyperlinkAddress: '超鏈接地址', + insertPicture: '插入圖片', + noVideoLinkErrorTip: '請設置視頻源地址', + VideoCantPlayTip: '視頻無法播放', + file: '[文件]', + noFileInfoTip: '文件信息讀取失敗', + noPicSrcTip: '請設置圖片源地址', + noVideoUrlErrorTip: '視頻鏈接URL不得為空', + videoUrlFormattingError: '視頻鏈接URL格式錯誤', + videoLinkTooLongError: '視頻鏈接不得超過1000個字', + linkEmptyTip: '鏈接地址不得為空', + linkToolongError: '鏈接地址不得超過1000個字', + noSelectionText: '沒有選中文本', + insertLink: '插入超鏈接', + editLink: '編輯超鏈接', + + //toolbar + backgroundColor: '背景色', + textDirection: '文字方向', + increaseIndent: '增加縮進', + decreaseIndent: '減少縮進', + subScript: '下腳標', + superSciprt: '上腳標', + codeBlock: '代碼塊', + blockquote: '塊引用', + strike: '刪除線', + brushFormat: '格式刷', + clearFormat: '清除格式', + fontSize: '文字大小', + insertEmoji: '插入表情', + defaultEmoji: '默認表情', + orderedList: '有序列表', + unOrderedList: '無序列表', + alignJustified: '兩端對齊', + alignCenter: '居中', + alignRight: '居右', + alignLeft: '居左', + fontColor: '文字顏色', + underline: '下劃線', + italic: '斜體', + bold: '粗體', + temporarilyNoData: '暫無數據', + enterKeyWordPlease: '請輸入關鍵字', + justOkText: '知道了' + }, + Spin: { + loading: '加載中' + }, + Select: { + errorMessage: '超過選項上限', + multipleSelectAllText: '所有選項', + notFoundContent: '無匹配結果', + placeholder: '請選擇', + searchPlaceholder: '請輸入關鍵字', + selectAllText: '選擇所有', + confirmText: '確定', + cancelText: '取消', + loading: '加載中…' + }, + Transfer: { + notFoundContent: '無匹配結果', + sourceNotFoundContent: '暫無相關信息', + targetNotFonudContent: '請從左側選擇添加', + searchPlaceholder: '請輸入關鍵字', + }, + TreeSelect: { + placeholder: '請選擇', + searchPlaceholder: '請輸入關鍵字', + treeNodeResetTitle: '不選擇任何分類', + notFoundContent: '無匹配結果', + okText: '確定', + cancelText: '取消', + }, + Upload: { + uploading: '上傳中', + removeFile: '移除文件', + uploadError: '上傳錯誤', + previewFile: '預覽文件', + cancelText: '取消', + deleteText: '全部刪除', + uploadedTip: '已上傳 ${length} 項' + }, + List: { + emptyText: '暫無數據', + }, + Guide: { + prevBtnText: '上一步', + nextBtnText: '下一步', + doneBtnText: '知道了', + skipBtnText: '跳過', + }, + LoadMore: { + defaultText: '查看更多', + loadingText: '加載中', + errorText: '加載失敗,請重試', + endText: '沒有更多了', + }, + DatePicker: { + now: '現在', + today: '今天', + cancel: '取消', + clear: '清空', + confirm: '確定', + startPlaceholder: '開始日期', + endPlaceholder: '結束日期', + separator: '至', + selectDate: '下方選擇日期', + selectTime: '請選擇時間', + startDate: '開始日期', + startTime: '開始時間', + endDate: '結束日期', + endTime: '結束時間', + year: '年', + month1: '1 月', + month2: '2 月', + month3: '3 月', + month4: '4 月', + month5: '5 月', + month6: '6 月', + month7: '7 月', + month8: '8 月', + month9: '9 月', + month10: '10 月', + month11: '11 月', + month12: '12 月', + '1月': '1', + '2月': '2', + '3月': '3', + '4月': '4', + '5月': '5', + '6月': '6', + '7月': '7', + '8月': '8', + '9月': '9', + '10月': '10', + '11月': '11', + '12月': '12', + week: '週次', + weeks: { + sun: '日', + mon: '一', + tue: '二', + wed: '三', + thu: '四', + fri: '五', + sat: '六' + }, + months: { + jan: '一月', + feb: '二月', + mar: '三月', + apr: '四月', + may: '五月', + jun: '六月', + jul: '七月', + aug: '八月', + sep: '九月', + oct: '十月', + nov: '十一月', + dec: '十二月' + } + }, + VideoViewer: { + fullScreen: '全屏', + cancelFullScreen: '取消全屏', + download: '下載', + retry: '重試' + } +} + +export default localeValues; From d24d9d6ba584d7307e38cfc5e7b28417194f0798 Mon Sep 17 00:00:00 2001 From: SummerOverture <740834798@qq.com> Date: Thu, 14 Jan 2021 15:53:27 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/docs/upgradeNotes/1.8/1.8.1.md | 7 +++++++ ...45\215\207\347\272\247\350\257\264\346\230\216.md" | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/site/docs/upgradeNotes/1.8/1.8.1.md b/site/docs/upgradeNotes/1.8/1.8.1.md index 5f31a04a3..327d6dcfe 100644 --- a/site/docs/upgradeNotes/1.8/1.8.1.md +++ b/site/docs/upgradeNotes/1.8/1.8.1.md @@ -25,3 +25,10 @@ ### 1.8.1-alpha.2 - 🐛修复Collapse state被写死导致表现不对的问题 +### 1.8.1-alpha.3 +- 🎊 国际化新增 繁体中文(中国台湾)(zh_TW)语言包 +- DatePicker + - 🐛修复TimePicker中TimePanel的props未被正确传递的问题 +- Select + - 🐛修复多选模式下 取消确定按钮未被国际化的问题 + diff --git "a/site/docs/upgradeNotes/\347\211\210\346\234\254\345\215\207\347\272\247\350\257\264\346\230\216.md" "b/site/docs/upgradeNotes/\347\211\210\346\234\254\345\215\207\347\272\247\350\257\264\346\230\216.md" index 2ab5e4221..bc42bd7b4 100644 --- "a/site/docs/upgradeNotes/\347\211\210\346\234\254\345\215\207\347\272\247\350\257\264\346\230\216.md" +++ "b/site/docs/upgradeNotes/\347\211\210\346\234\254\345\215\207\347\272\247\350\257\264\346\230\216.md" @@ -1144,3 +1144,14 @@ ## 1.8.1-alpha.2 - 🐛修复Collapse state被写死导致表现不对的问题 + +--- +`2021.1.14` + +## 1.8.1-alpha.3 + +- 🎊 国际化新增 繁体中文(中国台湾)(zh_TW)语言包 +- DatePicker + - 🐛修复TimePicker中TimePanel的props未被正确传递的问题 +- Select + - 🐛修复多选模式下 取消确定按钮未被国际化的问题 From eb8c437b54db81d94ae6ef04e95ff66730fa6424 Mon Sep 17 00:00:00 2001 From: SummerOverture <740834798@qq.com> Date: Thu, 14 Jan 2021 15:55:56 +0800 Subject: [PATCH 5/5] 1.8.1-alpha.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c32e06d1c..01dea78e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ppfish", - "version": "1.8.1-alpha.2", + "version": "1.8.1-alpha.3", "description": "fish design ui components", "typings": "lib/components/index.d.ts", "scripts": {