Skip to content

Commit

Permalink
fix: fix months translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Faraz Maqsood committed Feb 7, 2024
1 parent 94c2bdc commit e6ecc60
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions common/djangoapps/util/date_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,19 @@ def from_timestamp(timestamp):
"November",
"December",
]
urdu_months_list = [
"جنوری",
"فروری",
"مارچ",
"اپریل",
"مئی",
"جون",
"جولائی",
"اگست",
"ستمبر",
"اکتوبر",
"نومبر",
"دسمبر",
arabic_months_list = [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
]


Expand All @@ -164,7 +164,7 @@ def convert_date_to_arabic(date):

for idx, month in enumerate(english_months_list):
if month in date:
date = date.replace(month, urdu_months_list[idx])
date = date.replace(month, arabic_months_list[idx])
break

return date
Expand Down

0 comments on commit e6ecc60

Please sign in to comment.