Skip to content

Complete and fix the Bengali (bn_BD) translation - #471

Merged
hugovk merged 1 commit into
python-humanize:mainfrom
Drakunal:bn-bd-translation
Oct 22, 2026
Merged

hugovk merged 1 commit into
python-humanize:mainfrom
Drakunal:bn-bd-translation

Conversation

@Drakunal

Copy link
Copy Markdown
Contributor

Fixes #470

The bn_BD catalog hadn't been updated since 2023, and a few entries were producing wrong or English output.

Changes proposed in this pull request:

  • Fix 1 year, %d day, which was translated as %d বছর. naturaldelta(timedelta(days=370)) returned "5 বছর" (5 years) instead of "1 বছর, 5 দিন".
  • Remove the fuzzy flag from million and translate nonillion, decillion and googol. Fuzzy and empty entries are skipped at runtime, so intword(2_000_000) returned "2.0 million" in English.
  • Translate the %d Byte / %d Bytes filesize labels (%d বাইট), following the fa_IR and si_LK catalogs, which keep the unit symbols (kB, MB, KiB...) as they are.
  • Use Latin digits in 1 year, 1 month and 1 year, %d month. They mixed Bengali and Latin digits, e.g. "১ বছর, 2 মাস".
  • Fix spellings: শুন্য → শূন্য, মুহুর্ত → মুহূর্ত, ঘন্টা → ঘণ্টা.
  • Remove a double space in %s and %s.
  • Add bn_BD tests for naturaltime, precisedelta, intword, naturalsize and the one-year naturaldelta cases.

I'm a native Bengali speaker.

@hugovk hugovk added the changelog: Fixed For any bug fixes label Oct 22, 2026
@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 (eaabd31).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #471   +/-   ##
=======================================
  Coverage   99.69%   99.70%           
=======================================
  Files          12       12           
  Lines         995     1006   +11     
=======================================
+ Hits          992     1003   +11     
  Misses          3        3           
Flag Coverage Δ
macos-latest 97.41% <81.81%> (-0.18%) ⬇️
ubuntu-latest 97.41% <81.81%> (-0.18%) ⬇️
windows-latest 92.94% <63.63%> (-0.33%) ⬇️

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 65c4997 into python-humanize:main Oct 22, 2026
44 of 45 checks passed
@hugovk

hugovk commented Oct 22, 2026

Copy link
Copy Markdown
Member

Thank you!

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.

Complete the Bengali (bn_BD) translation

2 participants