Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/locale/zh_TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { PaginationLocale } from '../interface';

const locale: PaginationLocale = {
// Options
items_per_page: '條/頁',
items_per_page: '筆/頁',
jump_to: '跳至',
jump_to_confirm: '確定',
page: '頁',
Expand All @@ -14,7 +14,7 @@ const locale: PaginationLocale = {
next_5: '向後 5 頁',
prev_3: '向前 3 頁',
next_3: '向後 3 頁',
page_size: '頁碼',
page_size: '每頁筆數',
};

export default locale;
10 changes: 10 additions & 0 deletions tests/options.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { render } from '@testing-library/react';
import zhCN from '../src/locale/zh_CN';
import zhTW from '../src/locale/zh_TW';
import Options from '../src/Options';
import * as React from 'react';
import { sizeChangerRender } from './commonUtil';
Expand All @@ -23,6 +24,15 @@ describe('Options', () => {
expect(container.firstChild).toMatchSnapshot();
});

it('uses the Traditional Chinese page-size terminology', () => {
const { getByRole, getByText } = render(
<WrapperOptions locale={zhTW} quickGo={false} />,
);

expect(getByRole('combobox', { name: '每頁筆數' })).toBeInTheDocument();
expect(getByText('10 筆/頁')).toBeInTheDocument();
});

it('props:buildOptionText should render correctly', () => {
const mockBuildOptionText = jest
.fn()
Expand Down
Loading