Skip to content

Commit

Permalink
[I10n] Improve Chinese (zh-CN) locale (#12245)
Browse files Browse the repository at this point in the history
Signed-off-by: headiron <[email protected]>
  • Loading branch information
headironc authored Feb 28, 2024
1 parent 22943d5 commit d526d87
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/data/date-pickers/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"languageTag": "zh-CN",
"importName": "zhCN",
"localeName": "Chinese (Simplified)",
"missingKeysCount": 14,
"missingKeysCount": 0,
"totalKeysCount": 50,
"githubLink": "https://github.com/mui/mui-x/blob/next/packages/x-date-pickers/src/locales/zhCN.ts"
},
Expand Down
30 changes: 15 additions & 15 deletions packages/x-date-pickers/src/locales/zhCN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const views: Record<TimeViewWithMeridiem, string> = {
hours: '小时',
minutes: '分钟',
seconds: '秒',
meridiem: '子午线',
meridiem: '十二小时制',
};

const zhCNPickers: Partial<PickersLocaleText<any>> = {
Expand All @@ -23,10 +23,10 @@ const zhCNPickers: Partial<PickersLocaleText<any>> = {
// DateRange labels
start: '开始',
end: '结束',
// startDate: 'Start date',
// startTime: 'Start time',
// endDate: 'End date',
// endTime: 'End time',
startDate: '开始日期',
startTime: '开始时间',
endDate: '结束日期',
endTime: '结束时间',

// Action bar
cancelButtonLabel: '取消',
Expand Down Expand Up @@ -65,7 +65,7 @@ const zhCNPickers: Partial<PickersLocaleText<any>> = {
value !== null && utils.isValid(value)
? `选择时间,已选择${utils.format(value, 'fullTime')}`
: '选择时间',
// fieldClearLabel: 'Clear value',
fieldClearLabel: '清除',

// Table labels
timeTableLabel: '选择时间',
Expand All @@ -82,17 +82,17 @@ const zhCNPickers: Partial<PickersLocaleText<any>> = {
fieldMeridiemPlaceholder: () => 'aa',

// View names
// year: 'Year',
// month: 'Month',
// day: 'Day',
// weekDay: 'Week day',
// hours: 'Hours',
// minutes: 'Minutes',
// seconds: 'Seconds',
// meridiem: 'Meridiem',
year: '年份',
month: '月份',
day: '日期',
weekDay: '星期',
hours: '',
minutes: '',
seconds: '',
meridiem: '十二小时制',

// Common
// empty: 'Empty',
empty: '',
};

export const zhCN = getPickersLocalization(zhCNPickers);

0 comments on commit d526d87

Please sign in to comment.