From 3b887e12721f4868ef0f1f067312e3f8199be863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=B3=E5=BB=B7=E5=AE=89?= <73953029+nrps9909@users.noreply.github.com> Date: Sat, 15 Aug 2026 16:17:20 +0800 Subject: [PATCH] fix(locale): refine Traditional Chinese page-size terms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use Taiwan-appropriate record terminology for the visible size options and replace the misleading page-number label on the page-size combobox. AI-assisted: Codex Signed-off-by: 陳廷安 <73953029+nrps9909@users.noreply.github.com> --- src/locale/zh_TW.ts | 4 ++-- tests/options.test.tsx | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) 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()