Skip to content

Fix Persian future-time wording and locale metadata - #461

Merged
hugovk merged 1 commit into
python-humanize:mainfrom
AliEmami81:fix-persian-future-time
Oct 22, 2026
Merged

hugovk merged 1 commit into
python-humanize:mainfrom
AliEmami81:fix-persian-future-time

Conversation

@AliEmami81

Copy link
Copy Markdown
Contributor

Persian future timestamps currently use %s تا به اکنون, which reads as a duration up to the present rather than a future time. For example, a timestamp three seconds ahead renders as 3 ثانیه تا به اکنون.

This changes the future template to %s دیگر, producing 3 ثانیه دیگر (in three seconds), and corrects the Persian catalog's copied German language metadata. Past and present wording is preserved.

Validation:

  • Added five regression cases covering past, present, and future timestamps with an explicit reference time. Before the translation change, both future cases failed and the other three passed.
  • Recompiled translation catalogs locally using polib; the upstream CI uses its existing gettext compilation step.
  • Internationalisation suite: 121 passed, 2 skipped (gettext command-line tools are unavailable locally).
  • Full non-benchmark suite: 844 passed, 2 skipped.
  • Ruff and Black checks on the changed test file.

This contribution was prepared with AI assistance and checked against the Persian wording and executable regression tests.

@hugovk hugovk added the changelog: Fixed For any bug fixes label Oct 22, 2026
@hugovk
hugovk enabled auto-merge (squash) October 22, 2026 12:28
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.70%. Comparing base (785e5dc) to head (470f2d3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #461   +/-   ##
=======================================
  Coverage   99.69%   99.70%           
=======================================
  Files          12       12           
  Lines         995     1004    +9     
=======================================
+ Hits          992     1001    +9     
  Misses          3        3           
Flag Coverage Δ
macos-latest 97.41% <77.77%> (-0.18%) ⬇️
ubuntu-latest 97.41% <77.77%> (-0.18%) ⬇️
windows-latest 93.12% <77.77%> (-0.14%) ⬇️

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 merged commit b5ba01b into python-humanize:main Oct 22, 2026
44 of 45 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