From 5d6f5ed9f34c5bbb400ee7c75160a82030e40b21 Mon Sep 17 00:00:00 2001 From: Ali Emami <93864500+AliEmami81@users.noreply.github.com> Date: Tue, 13 Oct 2026 21:35:46 +0330 Subject: [PATCH] Translate byte-size labels into Persian --- src/humanize/locale/fa_IR/LC_MESSAGES/humanize.po | 10 ++++++++++ tests/test_i18n.py | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/src/humanize/locale/fa_IR/LC_MESSAGES/humanize.po b/src/humanize/locale/fa_IR/LC_MESSAGES/humanize.po index a1ac7ac7..dc054882 100644 --- a/src/humanize/locale/fa_IR/LC_MESSAGES/humanize.po +++ b/src/humanize/locale/fa_IR/LC_MESSAGES/humanize.po @@ -363,3 +363,13 @@ msgstr "دیروز" #, python-format msgid "%s and %s" msgstr "%s و %s" + +# --- filesize units (naturalsize) --- + +#, python-format +msgid "%d Byte" +msgstr "%d بایت" + +#, python-format +msgid "%d Bytes" +msgstr "%d بایت" diff --git a/tests/test_i18n.py b/tests/test_i18n.py index 683fe3ce..e237c2f5 100644 --- a/tests/test_i18n.py +++ b/tests/test_i18n.py @@ -239,6 +239,11 @@ def test_intword_i18n(locale: str, number: int, expected_result: str) -> None: [ ("fr_FR", 1, "1 octet"), ("fr_FR", 42, "42 octets"), + ("fa_IR", 0, "0 بایت"), + ("fa_IR", 1, "1 بایت"), + ("fa_IR", -1, "-1 بایت"), + ("fa_IR", 42, "42 بایت"), + ("fa_IR", -42, "-42 بایت"), ("si_LK", 1, "බයිට් 1"), ("si_LK", 42, "බයිට් 42"), ("fr_FR", 42_000, "42.0 Ko"),