Skip to content

Translate byte-size labels into Persian - #464

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

hugovk merged 1 commit into
python-humanize:mainfrom
AliEmami81:fix-persian-filesize-labels

Conversation

@AliEmami81

Copy link
Copy Markdown
Contributor

With fa_IR active, naturalsize(1) currently returns 1 Byte and naturalsize(42) returns 42 Bytes: the Persian catalog is missing these two messages. Both singular and plural labels should use بایت.

Changes proposed in this pull request:

  • Add the two byte-label translations to the existing Persian catalog.
  • Extend the existing localization parameterization to cover zero, one, multiple bytes, and negative values. The five added cases fail before the catalog change and pass afterward.

Validation: compiled locale catalogs locally with polib, then ran the non-benchmark suite: 844 passed, 2 skipped (gettext command-line tools are unavailable locally). Ruff and Black checks passed for the changed Python file. Generated .mo files are not committed.

This addresses a different untranslated message from the future-time wording in #461 and is based directly on upstream main. Prepared with AI assistance; the change and regression results were checked locally.

@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.69%. Comparing base (785e5dc) to head (5d6f5ed).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #464   +/-   ##
=======================================
  Coverage   99.69%   99.69%           
=======================================
  Files          12       12           
  Lines         995      995           
=======================================
  Hits          992      992           
  Misses          3        3           
Flag Coverage Δ
macos-latest 97.58% <ø> (ø)
ubuntu-latest 97.58% <ø> (ø)
windows-latest 93.26% <ø> (ø)

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 added the changelog: Fixed For any bug fixes label Oct 22, 2026
@hugovk
hugovk enabled auto-merge (squash) October 22, 2026 12:29
@hugovk
hugovk merged commit 62aba2b 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