Skip to content

fix(locale): refine Traditional Chinese page-size terms - #719

Merged
yoyo837 merged 1 commit into
react-component:masterfrom
nrps9909:codex/fix-zhtw-page-size-copy
Aug 15, 2026
Merged

fix(locale): refine Traditional Chinese page-size terms#719
yoyo837 merged 1 commit into
react-component:masterfrom
nrps9909:codex/fix-zhtw-page-size-copy

Conversation

@nrps9909

@nrps9909 nrps9909 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the visible zh-TW page-size suffix 條/頁 with the Taiwan-standard 筆/頁
  • replace the misleading page-size combobox label 頁碼 (page number) with 每頁筆數 (items per page)
  • add a behavior test for both the visible option text and the combobox accessible name

Why

page_size is passed to the size changer as its aria-label, so 頁碼 describes the wrong control. This package is the canonical Pagination locale used by Ant Design; correcting the source keeps both the rendered copy and assistive-technology output accurate for zh-TW users.

Validation

  • npm test -- tests/options.test.tsx --runInBand (3 tests, 1 snapshot)
  • npm test -- --runInBand (10 suites, 222 tests, 130 snapshots)
  • npm run lint
  • npm run tsc
  • npm run compile
  • npx prettier --check src/locale/zh_TW.ts tests/options.test.tsx
  • git diff --check

AI assistance disclosure: Codex was used to trace the locale value to the rendered size changer, draft the focused patch and regression test, audit open pull requests for overlap, and run the validation commands above.

Summary by CodeRabbit

  • 本地化

    • 更新繁体中文分页文字,将每页项目数量标签调整为更准确、易懂的表达。
    • 优化分页选项文本,明确表示“每页笔数”。
  • 测试

    • 新增繁体中文分页选项验证,确保相关标签和选项显示正确。

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>
@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

@nrps9909 is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 064ca8ce-51b9-4d11-871b-be4be43f449d

📥 Commits

Reviewing files that changed from the base of the PR and between 0628beb and 3b887e1.

📒 Files selected for processing (2)
  • src/locale/zh_TW.ts
  • tests/options.test.tsx

Walkthrough

更新繁体中文分页本地化文本,并新增测试验证每页笔数标签和选项文本。

Changes

繁体中文分页本地化

Layer / File(s) Summary
分页标签与本地化测试
src/locale/zh_TW.ts, tests/options.test.tsx
items_per_page 更新为「筆/頁」,将 page_size 更新为「每頁筆數」。测试验证繁体中文环境下的组合框名称和页面大小文本。

Estimated code review effort: 1 (简单) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 3b887

This localized copy correction is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Poem

我是小兔,捧来新标签,
「每頁筆數」清楚亮相。
「10 筆/頁」排得整齐,
繁中分页更合适。
咚咚跳过测试行!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了繁体中文分页术语的修正,内容具体且简洁。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.69%. Comparing base (0628beb) to head (3b887e1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #719   +/-   ##
=======================================
  Coverage   99.69%   99.69%           
=======================================
  Files           4        4           
  Lines         331      331           
  Branches      152      152           
=======================================
  Hits          330      330           
  Misses          1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yoyo837
yoyo837 merged commit 1eca64e into react-component:master Aug 15, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants