Skip to content

Commit

Permalink
fix: fix months translations (#506)
Browse files Browse the repository at this point in the history
Co-authored-by: Muhammad Faraz  Maqsood <faraz.maqsood@a006-01130.home>
  • Loading branch information
Faraz32123 and Muhammad Faraz Maqsood authored Feb 7, 2024
1 parent 94c2bdc commit 36c31df
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 36c31df

Please sign in to comment.