diff --git a/src/locale/zh_TW.ts b/src/locale/zh_TW.ts index 57da9587..f22d0054 100644 --- a/src/locale/zh_TW.ts +++ b/src/locale/zh_TW.ts @@ -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: '頁', @@ -14,7 +14,7 @@ const locale: PaginationLocale = { next_5: '向後 5 頁', prev_3: '向前 3 頁', next_3: '向後 3 頁', - page_size: '頁碼', + page_size: '每頁筆數', }; export default locale; diff --git a/tests/options.test.tsx b/tests/options.test.tsx index 161ebd0a..0c7035e4 100644 --- a/tests/options.test.tsx +++ b/tests/options.test.tsx @@ -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'; @@ -23,6 +24,15 @@ describe('Options', () => { expect(container.firstChild).toMatchSnapshot(); }); + it('uses the Traditional Chinese page-size terminology', () => { + const { getByRole, getByText } = render( + , + ); + + expect(getByRole('combobox', { name: '每頁筆數' })).toBeInTheDocument(); + expect(getByText('10 筆/頁')).toBeInTheDocument(); + }); + it('props:buildOptionText should render correctly', () => { const mockBuildOptionText = jest .fn()