Skip to content

Commit

Permalink
fix(packaging): view the English text of all components
Browse files Browse the repository at this point in the history
  • Loading branch information
wudu8 committed Sep 3, 2022
1 parent ed08884 commit f8e41cf
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 62 deletions.
77 changes: 39 additions & 38 deletions packages/components/locales/src/langs/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,102 +18,103 @@ const enUS: Locale = {
clear: 'Clear',
month: 'Month',
year: 'Year',
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
monthSelect: 'Select month',
yearSelect: 'Select year',
monthFormat: 'MMM',
yearFormat: 'yyyy',
previousMonth: 'Previous month',
nextMonth: 'Next month',
previousYear: 'Last year',
previousYear: 'Previous year',
nextYear: 'Next year',
previousDecade: 'Last decade',
previousDecade: 'Previous decade',
nextDecade: 'Next decade',
datePlaceholder: 'Select date',
weekPlaceholder: 'Select week',
monthPlaceholder: 'Select month',
quarterPlaceholder: 'Select quarter',
yearPlaceholder: 'Select year',
datetimePlaceholder: 'Select date time',
datetimePlaceholder: 'Select time',
},
dateRangePicker: {
datePlaceholder: ['Start date', 'End date'],
weekPlaceholder: ['Start week', 'End week'],
monthPlaceholder: ['Start month', 'End month'],
quarterPlaceholder: ['Start quarter', 'End quarter'],
yearPlaceholder: ['Start year', 'End year'],
datetimePlaceholder: ['Start date time', 'End date time'],
datetimePlaceholder: ['Start time', 'End time'],
separator: 'To',
okText: 'OK',
cancelText: 'Cancel',
},
empty: {
description: 'No Data',
description: 'No data available',
},
modal: {
cancelText: 'Cancel',
okText: 'OK',
justOkText: 'OK',
},
pagination: {
itemsPerPage: 'each page',
jumpTo: 'Go to',
itemsPerPage: 'Entries per Page',
itemsSuffix: '',
jumpTo: 'Page',
page: '',
prev: 'Previous Page',
next: 'Next Page',
prev: 'Previous',
next: 'Next',
prev5: 'Previous 5 Pages',
next5: 'Next 5 Pages',
totalPrefix: 'Total',
totalSuffix: 'items',
totalPrefix: '',
totalSuffix: 'entries in total',
},
popconfirm: {
cancelText: 'No',
okText: 'Yes',
},
select: {
limitMessage: 'The value of this selector cannot be greater than ${0} items',
limitMessage: 'Select ${0} or fewer items',
},
table: {
expand: 'Expand row',
collapse: 'Collapse row',
filterTitle: 'Filter menu',
expand: 'Expand',
collapse: 'Collapse',
filterTitle: 'Filter',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'No filters',
selectAll: 'Select all data',
selectInvert: 'Invert all data',
selectNone: 'Clear all data',
selectPageAll: 'Select current page',
selectPageInvert: 'Invert current page',
sortDesc: 'Click to sort descending',
sortAsc: 'Click to sort ascending',
sortCancel: 'Click to cancel sorting',
filterEmptyText: 'No Filters',
selectAll: 'Select All',
selectInvert: 'Deselect All',
selectNone: 'Clear All',
selectPageAll: 'Select Current Page',
selectPageInvert: 'Deselect Current Page',
sortDesc: 'Sort descending',
sortAsc: 'Sort ascending',
sortCancel: 'Cancel sort',
},
timePicker: {
okText: 'Yes',
placeholder: 'Please select time',
okText: 'OK',
placeholder: 'Select time',
},
timeRangePicker: {
okText: 'Yes',
okText: 'OK',
separator: 'To',
placeholder: ['Start time', 'End time'],
},
transfer: {
toSelect: 'To select',
toSelect: 'Available',
selected: 'Selected',
searchPlaceholder: ['Key words', 'Key words'],
searchPlaceholder: ['Search', 'Search'],
},
treeSelect: {
expandAll: 'Expand all',
collapseAll: 'Collapse all',
expandAll: 'Expand',
collapseAll: 'Collapse',
},
upload: {
uploading: 'Uploading...',
error: 'Upload error',
cancel: 'Cancel Upload',
preview: 'Preview file',
remove: 'Remove file',
error: 'Upload failed',
cancel: 'Cancel',
preview: 'Preview',
remove: 'Delete',
retry: 'Reupload',
download: 'Download file',
download: 'Download',
},
}

Expand Down
1 change: 1 addition & 0 deletions packages/components/locales/src/langs/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const zhCN: Locale = {
},
pagination: {
itemsPerPage: '每页',
itemsSuffix: '项',
jumpTo: '前往',
page: '页',
prev: '上一页',
Expand Down
1 change: 1 addition & 0 deletions packages/components/locales/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface PopconfirmLocale {

export interface PaginationLocale {
itemsPerPage: string
itemsSuffix: string
jumpTo: string
page: string
prev: string
Expand Down
4 changes: 2 additions & 2 deletions packages/components/pagination/src/contents/Sizes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineComponent({

return () => {
const prefixCls = `${mergedPrefixCls.value}-sizes`
const { itemsPerPage, totalSuffix } = locale.pagination
const { itemsPerPage, itemsSuffix } = locale.pagination

return (
<li class={prefixCls}>
Expand All @@ -38,7 +38,7 @@ export default defineComponent({
onChange={changePageSize}
/>
</div>
{totalSuffix}
{itemsSuffix}
</li>
)
}
Expand Down
40 changes: 20 additions & 20 deletions packages/pro/locales/src/langs/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,35 @@ const enUS: ProLocale = {

table: {
layout: {
title: 'Layout settings',
title: 'Set columns',
sm: 'Compact',
md: 'Medium',
lg: 'Relaxed',
all: 'All field',
reset: 'Reset',
indexable: 'Index column',
expandable: 'Expand column',
selectable: 'Select column',
startPin: 'Pin to start',
endPin: 'Pin to end',
noPin: 'Unpinned',
startPinTitle: 'Fixed the start',
endPinTitle: 'Fixed the end',
noPinTitle: 'Not Fixed',
lg: 'Expanded',
all: 'Select All',
reset: 'Restore',
indexable: 'No.',
expandable: 'Expand',
selectable: 'Select',
startPin: 'Pin left',
endPin: 'Pin right',
noPin: 'Unpin',
startPinTitle: 'Left Pinned',
endPinTitle: 'Right Pinned',
noPinTitle: 'Unpinned',
},
},
tree: {
expandAll: 'Expand all',
collapseAll: 'Collapse all',
expandAll: 'Expand',
collapseAll: 'Collapse',
},
search: {
keyword: 'Keyword',
ok: 'Ok',
keyword: 'Search',
ok: 'OK',
cancel: 'Cancel',
selectAll: 'Select All',
placeholder: 'Click To select search options, press Enter to confirm',
switchToDatePanel: 'Switch To Date',
switchToTimePanel: 'Switch To Time',
placeholder: 'Select filters and press Enter',
switchToDatePanel: 'Select Date',
switchToTimePanel: 'Select Time',
},
}

Expand Down
4 changes: 2 additions & 2 deletions packages/pro/locales/src/langs/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const zhCN: ProLocale = {
startPin: '固定在列首',
endPin: '固定在列尾',
noPin: '不固定',
startPinTitle: '固定在左侧',
endPinTitle: '固定在右侧',
startPinTitle: '固定在列首',
endPinTitle: '固定在列尾',
noPinTitle: '不固定',
},
},
Expand Down

0 comments on commit f8e41cf

Please sign in to comment.