Skip to content

Complete missing Simplified Chinese translations - #472

Merged
hugovk merged 1 commit into
python-humanize:mainfrom
Plastic-time:codex/complete-chinese-duration-translations
Nov 12, 2026
Merged

hugovk merged 1 commit into
python-humanize:mainfrom
Plastic-time:codex/complete-chinese-duration-translations

Conversation

@Plastic-time

Copy link
Copy Markdown
Contributor

The Simplified Chinese catalog has empty translations for zero, milliseconds, microseconds, and the conjunction used by precisedelta(). With zh_CN active, this produces English output such as 1 millisecond and mixed output such as 1分 and 1秒.

Changes proposed in this pull request:

  • Fill those four catalog entries, retaining the existing compact Chinese spacing.
  • Add tests for singular/plural subsecond durations, zero, and combined durations.

All five regression cases fail with the original compiled catalog. After recompiling the catalogs with polib, the full suite passes on Python 3.12: 881 passed, 2 skipped. The skipped tests require GNU gettext command-line tools, which are unavailable locally; the new Chinese tests all run and pass. Ruff and Black pass for the changed test file.

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.35%. Comparing base (418a6ae) to head (01545b9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #472   +/-   ##
=======================================
  Coverage   97.35%   97.35%           
=======================================
  Files          12       12           
  Lines        1022     1022           
=======================================
  Hits          995      995           
  Misses         27       27           
Flag Coverage Δ
macos-latest 97.26% <ø> (ø)
ubuntu-latest 95.00% <ø> (ø)
windows-latest 95.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@hugovk
hugovk force-pushed the codex/complete-chinese-duration-translations branch from cd7996a to d4419ef Compare November 12, 2026 11:40
@hugovk

hugovk commented Nov 12, 2026

Copy link
Copy Markdown
Member

Thanks, I resolved the conflict and dropped the tests, we don't really need them here.

@hugovk
hugovk force-pushed the codex/complete-chinese-duration-translations branch from d4419ef to 01545b9 Compare November 12, 2026 11:43
@hugovk
hugovk enabled auto-merge (squash) November 12, 2026 11:43
@hugovk
hugovk merged commit 22b8da7 into python-humanize:main Nov 12, 2026
50 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: Fixed For any bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants