Skip to content

Commit 522a65b

Browse files
add 'week' and 'weeks' to Arabic locale (#1155)
Co-authored-by: Jad Chaar <[email protected]>
1 parent 3a6cd95 commit 522a65b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

arrow/locales.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2549,6 +2549,8 @@ class ArabicLocale(Locale):
25492549
"hours": {"2": "ساعتين", "ten": "{0} ساعات", "higher": "{0} ساعة"},
25502550
"day": "يوم",
25512551
"days": {"2": "يومين", "ten": "{0} أيام", "higher": "{0} يوم"},
2552+
"week": "اسبوع",
2553+
"weeks": {"2": "اسبوعين", "ten": "{0} أسابيع", "higher": "{0} اسبوع"},
25522554
"month": "شهر",
25532555
"months": {"2": "شهرين", "ten": "{0} أشهر", "higher": "{0} شهر"},
25542556
"year": "سنة",

tests/test_locales.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,26 +1414,30 @@ def test_timeframes(self):
14141414
assert self.locale._format_timeframe("minute", 1) == "دقيقة"
14151415
assert self.locale._format_timeframe("hour", 1) == "ساعة"
14161416
assert self.locale._format_timeframe("day", 1) == "يوم"
1417+
assert self.locale._format_timeframe("week", 1) == "اسبوع"
14171418
assert self.locale._format_timeframe("month", 1) == "شهر"
14181419
assert self.locale._format_timeframe("year", 1) == "سنة"
14191420

14201421
# double
14211422
assert self.locale._format_timeframe("minutes", 2) == "دقيقتين"
14221423
assert self.locale._format_timeframe("hours", 2) == "ساعتين"
14231424
assert self.locale._format_timeframe("days", 2) == "يومين"
1425+
assert self.locale._format_timeframe("weeks", 2) == "اسبوعين"
14241426
assert self.locale._format_timeframe("months", 2) == "شهرين"
14251427
assert self.locale._format_timeframe("years", 2) == "سنتين"
14261428

14271429
# up to ten
14281430
assert self.locale._format_timeframe("minutes", 3) == "3 دقائق"
14291431
assert self.locale._format_timeframe("hours", 4) == "4 ساعات"
14301432
assert self.locale._format_timeframe("days", 5) == "5 أيام"
1433+
assert self.locale._format_timeframe("weeks", 7) == "7 أسابيع"
14311434
assert self.locale._format_timeframe("months", 6) == "6 أشهر"
14321435
assert self.locale._format_timeframe("years", 10) == "10 سنوات"
14331436

14341437
# more than ten
14351438
assert self.locale._format_timeframe("minutes", 11) == "11 دقيقة"
14361439
assert self.locale._format_timeframe("hours", 19) == "19 ساعة"
1440+
assert self.locale._format_timeframe("weeks", 20) == "20 اسبوع"
14371441
assert self.locale._format_timeframe("months", 24) == "24 شهر"
14381442
assert self.locale._format_timeframe("days", 50) == "50 يوم"
14391443
assert self.locale._format_timeframe("years", 115) == "115 سنة"

0 commit comments

Comments
 (0)