From e6ecc60e01f6b94b700d9f3f207f1edc88bbdd27 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Wed, 7 Feb 2024 13:03:43 +0500 Subject: [PATCH] fix: fix months translations --- common/djangoapps/util/date_utils.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/common/djangoapps/util/date_utils.py b/common/djangoapps/util/date_utils.py index 377d7131983c..e8aebddfb69d 100644 --- a/common/djangoapps/util/date_utils.py +++ b/common/djangoapps/util/date_utils.py @@ -131,19 +131,19 @@ def from_timestamp(timestamp): "November", "December", ] -urdu_months_list = [ - "جنوری", - "فروری", - "مارچ", - "اپریل", - "مئی", - "جون", - "جولائی", - "اگست", - "ستمبر", - "اکتوبر", - "نومبر", - "دسمبر", +arabic_months_list = [ + "يناير", + "فبراير", + "مارس", + "أبريل", + "مايو", + "يونيو", + "يوليو", + "أغسطس", + "سبتمبر", + "أكتوبر", + "نوفمبر", + "ديسمبر", ] @@ -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