From f522d6f2c7661ef9574ad32455594043f62eac61 Mon Sep 17 00:00:00 2001 From: AbdullahAlajmi Date: Sun, 7 May 2023 12:41:05 +0300 Subject: [PATCH] add 'week' and 'weeks' to Arabic locale --- arrow/locales.py | 2 ++ tests/test_locales.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/arrow/locales.py b/arrow/locales.py index ea4c84b2..ca5f9472 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -2547,6 +2547,8 @@ class ArabicLocale(Locale): "hours": {"2": "ساعتين", "ten": "{0} ساعات", "higher": "{0} ساعة"}, "day": "يوم", "days": {"2": "يومين", "ten": "{0} أيام", "higher": "{0} يوم"}, + "week": "اسبوع", + "weeks": {"2": "اسبوعين", "ten": "{0} أسابيع", "higher": "{0} اسبوع"}, "month": "شهر", "months": {"2": "شهرين", "ten": "{0} أشهر", "higher": "{0} شهر"}, "year": "سنة", diff --git a/tests/test_locales.py b/tests/test_locales.py index 4bbbd3dc..580d3169 100644 --- a/tests/test_locales.py +++ b/tests/test_locales.py @@ -1440,6 +1440,7 @@ def test_timeframes(self): assert self.locale._format_timeframe("minute", 1) == "دقيقة" assert self.locale._format_timeframe("hour", 1) == "ساعة" assert self.locale._format_timeframe("day", 1) == "يوم" + assert self.locale._format_timeframe("week", 1) == "اسبوع" assert self.locale._format_timeframe("month", 1) == "شهر" assert self.locale._format_timeframe("year", 1) == "سنة" @@ -1447,6 +1448,7 @@ def test_timeframes(self): assert self.locale._format_timeframe("minutes", 2) == "دقيقتين" assert self.locale._format_timeframe("hours", 2) == "ساعتين" assert self.locale._format_timeframe("days", 2) == "يومين" + assert self.locale._format_timeframe("weeks", 2) == "اسبوعين" assert self.locale._format_timeframe("months", 2) == "شهرين" assert self.locale._format_timeframe("years", 2) == "سنتين" @@ -1454,12 +1456,14 @@ def test_timeframes(self): assert self.locale._format_timeframe("minutes", 3) == "3 دقائق" assert self.locale._format_timeframe("hours", 4) == "4 ساعات" assert self.locale._format_timeframe("days", 5) == "5 أيام" + assert self.locale._format_timeframe("weeks", 7) == "7 أسابيع" assert self.locale._format_timeframe("months", 6) == "6 أشهر" assert self.locale._format_timeframe("years", 10) == "10 سنوات" # more than ten assert self.locale._format_timeframe("minutes", 11) == "11 دقيقة" assert self.locale._format_timeframe("hours", 19) == "19 ساعة" + assert self.locale._format_timeframe("weeks", 20) == "20 اسبوع" assert self.locale._format_timeframe("months", 24) == "24 شهر" assert self.locale._format_timeframe("days", 50) == "50 يوم" assert self.locale._format_timeframe("years", 115) == "115 سنة"