From 3426de2731acd4bd0f43be9bd09679f82d7582ba Mon Sep 17 00:00:00 2001 From: WB01081293 Date: Thu, 25 Jan 2024 13:18:02 +0800 Subject: [PATCH] feat(Input): Internationalization --- components/input/textarea.jsx | 4 ++-- components/locale/en-us.ts | 3 +++ components/locale/id-id.ts | 3 +++ components/locale/it-it.ts | 3 +++ components/locale/ja-jp.ts | 3 +++ components/locale/ko-kr.ts | 3 +++ components/locale/ms-my.ts | 3 +++ components/locale/pt-pt.ts | 3 +++ components/locale/th-th.ts | 3 +++ components/locale/types.ts | 3 +++ components/locale/vi-vn.ts | 3 +++ components/locale/zh-cn.ts | 3 +++ components/locale/zh-hk.ts | 3 +++ components/locale/zh-tw.ts | 3 +++ 14 files changed, 41 insertions(+), 2 deletions(-) diff --git a/components/input/textarea.jsx b/components/input/textarea.jsx index 7aa71cf665..c06002fd4c 100644 --- a/components/input/textarea.jsx +++ b/components/input/textarea.jsx @@ -2,7 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import Input from '../locale/zh-cn'; +import zhCN from '../locale/zh-cn'; import { obj, env } from '../util'; import Base from './base'; @@ -84,7 +84,7 @@ export default class TextArea extends Base { isPreview: false, rows: 4, autoHeight: false, - locale: Input.Input, + locale: zhCN.TextArea, }; constructor(props) { diff --git a/components/locale/en-us.ts b/components/locale/en-us.ts index bc6b5c49a0..33aa6c2dcc 100644 --- a/components/locale/en-us.ts +++ b/components/locale/en-us.ts @@ -73,6 +73,9 @@ const locale: Locale = { Input: { clear: 'Clear', }, + TextArea: { + clear: 'Clear', + }, List: { empty: 'No Data', }, diff --git a/components/locale/id-id.ts b/components/locale/id-id.ts index 2afba5114d..ec3a731e52 100644 --- a/components/locale/id-id.ts +++ b/components/locale/id-id.ts @@ -74,6 +74,9 @@ const locale: Locale = { Input: { clear: 'Reset', }, + TextArea: { + clear: 'Reset', + }, List: { empty: 'Tidak Ada Data', }, diff --git a/components/locale/it-it.ts b/components/locale/it-it.ts index b7ad3bbeb0..fdb0d2dcd2 100644 --- a/components/locale/it-it.ts +++ b/components/locale/it-it.ts @@ -74,6 +74,9 @@ const locale: Locale = { Input: { clear: 'Cancella', }, + TextArea: { + clear: 'Cancella', + }, List: { empty: 'Nessun dato', }, diff --git a/components/locale/ja-jp.ts b/components/locale/ja-jp.ts index eb8c36889b..356a8ff55e 100644 --- a/components/locale/ja-jp.ts +++ b/components/locale/ja-jp.ts @@ -73,6 +73,9 @@ const locale: Locale = { Input: { clear: 'クリア', }, + TextArea: { + clear: 'クリア', + }, List: { empty: 'データなし', }, diff --git a/components/locale/ko-kr.ts b/components/locale/ko-kr.ts index c00634f98f..b982ec5c0c 100644 --- a/components/locale/ko-kr.ts +++ b/components/locale/ko-kr.ts @@ -73,6 +73,9 @@ const locale: Locale = { Input: { clear: '삭제', }, + TextArea: { + clear: '삭제', + }, List: { empty: '노데이터', }, diff --git a/components/locale/ms-my.ts b/components/locale/ms-my.ts index 97671a21a2..cc165c17c6 100644 --- a/components/locale/ms-my.ts +++ b/components/locale/ms-my.ts @@ -73,6 +73,9 @@ const locale: Locale = { Input: { clear: 'Jelas', }, + TextArea: { + clear: 'Jelas', + }, List: { empty: 'tiada data', }, diff --git a/components/locale/pt-pt.ts b/components/locale/pt-pt.ts index 11352ccfc7..309b102692 100644 --- a/components/locale/pt-pt.ts +++ b/components/locale/pt-pt.ts @@ -73,6 +73,9 @@ const locale = { Input: { clear: 'Limpar', }, + TextArea: { + clear: 'Limpar', + }, List: { empty: 'Vazio', }, diff --git a/components/locale/th-th.ts b/components/locale/th-th.ts index dbb4ac9877..db27ca9d67 100644 --- a/components/locale/th-th.ts +++ b/components/locale/th-th.ts @@ -73,6 +73,9 @@ const locale: Locale = { Input: { clear: 'ชัดเจน', }, + TextArea: { + clear: 'ชัดเจน', + }, List: { empty: 'ไม่มีข้อมูล', }, diff --git a/components/locale/types.ts b/components/locale/types.ts index b1fbe45403..9f1aaf432b 100644 --- a/components/locale/types.ts +++ b/components/locale/types.ts @@ -80,6 +80,9 @@ export interface Locale extends LocaleConfig { Input: { clear: string; }; + TextArea: { + clear: string; + }; List: { empty: string; }; diff --git a/components/locale/vi-vn.ts b/components/locale/vi-vn.ts index 0baba4d46b..d4cd5ddb68 100644 --- a/components/locale/vi-vn.ts +++ b/components/locale/vi-vn.ts @@ -74,6 +74,9 @@ const locale: Locale = { Input: { clear: 'Xóa', }, + TextArea: { + clear: 'Xóa', + }, List: { empty: 'Không có dữ liệu', }, diff --git a/components/locale/zh-cn.ts b/components/locale/zh-cn.ts index f5fcb1ea3b..16a48d535b 100644 --- a/components/locale/zh-cn.ts +++ b/components/locale/zh-cn.ts @@ -73,6 +73,9 @@ const locale: Locale = { Input: { clear: '清除', }, + TextArea: { + clear: '清除', + }, List: { empty: '没有数据', }, diff --git a/components/locale/zh-hk.ts b/components/locale/zh-hk.ts index 32188bf3bf..e9fd332bc6 100644 --- a/components/locale/zh-hk.ts +++ b/components/locale/zh-hk.ts @@ -73,6 +73,9 @@ const locale: Locale = { Input: { clear: '清除', }, + TextArea: { + clear: '清除', + }, List: { empty: '沒有數據', }, diff --git a/components/locale/zh-tw.ts b/components/locale/zh-tw.ts index f0a4f995eb..180d0452c7 100644 --- a/components/locale/zh-tw.ts +++ b/components/locale/zh-tw.ts @@ -73,6 +73,9 @@ const locale: Locale = { Input: { clear: '清除', }, + TextArea: { + clear: '清除', + }, List: { empty: '沒有數據', },