From b763d5ad4e028f7da4d5dc4522bdeaff11a9798b Mon Sep 17 00:00:00 2001 From: Sayyid Hamid Mahdavi Date: Tue, 3 Feb 2026 13:47:36 +0330 Subject: [PATCH] i18n --- apps/users/serializers.py | 4 ++-- locale/ar/LC_MESSAGES/django.po | 11 ++++++++++- locale/en/LC_MESSAGES/django.po | 11 ++++++++++- locale/fa/LC_MESSAGES/django.mo | Bin 496 -> 716 bytes locale/fa/LC_MESSAGES/django.po | 11 ++++++++++- locale/tr/LC_MESSAGES/django.po | 11 ++++++++++- 6 files changed, 42 insertions(+), 6 deletions(-) diff --git a/apps/users/serializers.py b/apps/users/serializers.py index 38a0b98..ff7b3e0 100644 --- a/apps/users/serializers.py +++ b/apps/users/serializers.py @@ -73,12 +73,12 @@ class RequestOTPSerializer(serializers.ModelSerializer): try: user.set_otp() except Exception as e: - raise UnprocessableEntity('otp expire time not reached') + raise UnprocessableEntity(_('otp expire time not reached')) user.send_otp() else: - raise UnprocessableEntity('otp expire time not reached yet') + raise UnprocessableEntity(_('otp expire time not reached yet')) self.instance = user return user diff --git a/locale/ar/LC_MESSAGES/django.po b/locale/ar/LC_MESSAGES/django.po index 3a2e583..68596f4 100644 --- a/locale/ar/LC_MESSAGES/django.po +++ b/locale/ar/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-03 10:04+0000\n" +"POT-Creation-Date: 2026-02-03 10:16+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,6 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + #: accounts/settings.py:222 msgid "English" msgstr "" @@ -211,6 +212,14 @@ msgstr "" msgid "Phone number must be entered in the format: '+989999999999'." msgstr "" +#: apps/users/serializers.py:76 +msgid "otp expire time not reached" +msgstr "" + +#: apps/users/serializers.py:81 +msgid "otp expire time not reached yet" +msgstr "" + #: templates/oauth2_provider/application_confirm_delete.html:6 msgid "Are you sure to delete the application" msgstr "" diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index d40b257..6567b72 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-03 10:03+0000\n" +"POT-Creation-Date: 2026-02-03 10:16+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" + #: accounts/settings.py:222 msgid "English" msgstr "" @@ -210,6 +211,14 @@ msgstr "" msgid "Phone number must be entered in the format: '+989999999999'." msgstr "" +#: apps/users/serializers.py:76 +msgid "otp expire time not reached" +msgstr "" + +#: apps/users/serializers.py:81 +msgid "otp expire time not reached yet" +msgstr "" + #: templates/oauth2_provider/application_confirm_delete.html:6 msgid "Are you sure to delete the application" msgstr "" diff --git a/locale/fa/LC_MESSAGES/django.mo b/locale/fa/LC_MESSAGES/django.mo index 828ad3d5614c565637cfd0b43c5e113a67400408..f81a514ef08b72bd476d3566f7f425e06776cdf7 100644 GIT binary patch delta 155 zcmeyse1^6Do)F7a1|VPoVi_Q|0b*7ljsap2C;(z\n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" + #: accounts/settings.py:222 msgid "English" msgstr "" @@ -210,6 +211,14 @@ msgstr "" msgid "Phone number must be entered in the format: '+989999999999'." msgstr "" +#: apps/users/serializers.py:76 +msgid "otp expire time not reached" +msgstr "رمز یکبار مصرف قبلی هنوز معتبر است." + +#: apps/users/serializers.py:81 +msgid "otp expire time not reached yet" +msgstr "رمز یکبار مصرف قبلی هنوز معتبر است." + #: templates/oauth2_provider/application_confirm_delete.html:6 msgid "Are you sure to delete the application" msgstr "" diff --git a/locale/tr/LC_MESSAGES/django.po b/locale/tr/LC_MESSAGES/django.po index e1cc5d9..d0c5c7e 100644 --- a/locale/tr/LC_MESSAGES/django.po +++ b/locale/tr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-03 10:04+0000\n" +"POT-Creation-Date: 2026-02-03 10:16+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" + #: accounts/settings.py:222 msgid "English" msgstr "" @@ -210,6 +211,14 @@ msgstr "" msgid "Phone number must be entered in the format: '+989999999999'." msgstr "" +#: apps/users/serializers.py:76 +msgid "otp expire time not reached" +msgstr "" + +#: apps/users/serializers.py:81 +msgid "otp expire time not reached yet" +msgstr "" + #: templates/oauth2_provider/application_confirm_delete.html:6 msgid "Are you sure to delete the application" msgstr ""