Skip to content

Complete missing Simplified Chinese translations - #472

Open
Plastic-time wants to merge 1 commit into
python-humanize:mainfrom
Plastic-time:codex/complete-chinese-duration-translations
Open

Plastic-time wants to merge 1 commit into
python-humanize:mainfrom
Plastic-time:codex/complete-chinese-duration-translations

Conversation

@Plastic-time

Copy link
Copy Markdown

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 99.71%. Comparing base (a2006ea) to head (cd7996a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #472   +/-   ##
=======================================
  Coverage   99.70%   99.71%           
=======================================
  Files          12       12           
  Lines        1020     1040   +20     
=======================================
+ Hits         1017     1037   +20     
  Misses          3        3           
Flag Coverage Δ
macos-latest 96.92% <80.00%> (-0.34%) ⬇️
ubuntu-latest 96.92% <80.00%> (-0.34%) ⬇️
windows-latest 91.82% <65.00%> (-0.53%) ⬇️

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.

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