diff --git a/apps/pg/models.py b/apps/pg/models.py index b7f9615..2560397 100644 --- a/apps/pg/models.py +++ b/apps/pg/models.py @@ -130,7 +130,7 @@ class PaymentRequest(models.Model): "payee_type": 1, "amount": self.amount, "details": { - 'description': "charge via IPG", + 'description': _("charge via ipg"), 'reference_id': str(self.uuid), 'application_details_url': '' }, diff --git a/locale/ar/LC_MESSAGES/django.mo b/locale/ar/LC_MESSAGES/django.mo new file mode 100644 index 0000000..74dbaf6 Binary files /dev/null and b/locale/ar/LC_MESSAGES/django.mo differ diff --git a/locale/ar/LC_MESSAGES/django.po b/locale/ar/LC_MESSAGES/django.po new file mode 100644 index 0000000..c3dc886 --- /dev/null +++ b/locale/ar/LC_MESSAGES/django.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-09-09 14:04+0330\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"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" +#: apps/pg/constans.py:6 +msgid "created" +msgstr "" + +#: apps/pg/constans.py:7 +msgid "ipg pending" +msgstr "" + +#: apps/pg/constans.py:8 +msgid "ipg success" +msgstr "" + +#: apps/pg/constans.py:10 +msgid "wallet submit pending" +msgstr "" + +#: apps/pg/constans.py:11 +msgid "wallet submit success" +msgstr "" + +#: apps/pg/constans.py:13 +msgid "failed" +msgstr "" + +#: apps/pg/constans.py:14 +msgid "expected failure" +msgstr "" + +#: apps/pg/constans.py:15 +msgid "success" +msgstr "" + +#: apps/pg/constans.py:19 +msgid "user" +msgstr "" + +#: apps/pg/constans.py:20 +msgid "application" +msgstr "" + +#: apps/pg/models.py:24 +msgid "fake" +msgstr "" + +#: apps/pg/models.py:25 +msgid "pna" +msgstr "" + +#: apps/pg/models.py:133 +msgid "charge via ipg" +msgstr "" + +#: apps/users/models.py:49 +msgid "password" +msgstr "" + +#: apps/users/models.py:52 +msgid "username" +msgstr "" + +#: apps/users/models.py:55 +msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only." +msgstr "" + +#: apps/users/models.py:58 +msgid "A user with that username already exists." +msgstr "" + +#: apps/users/models.py:64 +msgid "last update" +msgstr "" + +#: apps/users/models.py:65 +msgid "last login" +msgstr "" + +#: apps/users/models.py:66 +msgid "date joined" +msgstr "" + +#: main/settings.py:184 +msgid "English" +msgstr "" + +#: main/settings.py:185 +msgid "Persian" +msgstr "" + +#: main/settings.py:186 +msgid "Arabic" +msgstr "" + +#: main/settings.py:187 +msgid "Turkish" +msgstr "" + +#: templates/admin/input_filter.html:5 +#, python-format +msgid " By %(filter_title)s " +msgstr "" diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo new file mode 100644 index 0000000..71cbdf3 Binary files /dev/null and b/locale/en/LC_MESSAGES/django.mo differ diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po new file mode 100644 index 0000000..584b9ba --- /dev/null +++ b/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-09-09 14:04+0330\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: apps/pg/constans.py:6 +msgid "created" +msgstr "" + +#: apps/pg/constans.py:7 +msgid "ipg pending" +msgstr "" + +#: apps/pg/constans.py:8 +msgid "ipg success" +msgstr "" + +#: apps/pg/constans.py:10 +msgid "wallet submit pending" +msgstr "" + +#: apps/pg/constans.py:11 +msgid "wallet submit success" +msgstr "" + +#: apps/pg/constans.py:13 +msgid "failed" +msgstr "" + +#: apps/pg/constans.py:14 +msgid "expected failure" +msgstr "" + +#: apps/pg/constans.py:15 +msgid "success" +msgstr "" + +#: apps/pg/constans.py:19 +msgid "user" +msgstr "" + +#: apps/pg/constans.py:20 +msgid "application" +msgstr "" + +#: apps/pg/models.py:24 +msgid "fake" +msgstr "" + +#: apps/pg/models.py:25 +msgid "pna" +msgstr "" + +#: apps/pg/models.py:133 +msgid "charge via ipg" +msgstr "" + +#: apps/users/models.py:49 +msgid "password" +msgstr "" + +#: apps/users/models.py:52 +msgid "username" +msgstr "" + +#: apps/users/models.py:55 +msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only." +msgstr "" + +#: apps/users/models.py:58 +msgid "A user with that username already exists." +msgstr "" + +#: apps/users/models.py:64 +msgid "last update" +msgstr "" + +#: apps/users/models.py:65 +msgid "last login" +msgstr "" + +#: apps/users/models.py:66 +msgid "date joined" +msgstr "" + +#: main/settings.py:184 +msgid "English" +msgstr "" + +#: main/settings.py:185 +msgid "Persian" +msgstr "" + +#: main/settings.py:186 +msgid "Arabic" +msgstr "" + +#: main/settings.py:187 +msgid "Turkish" +msgstr "" + +#: templates/admin/input_filter.html:5 +#, python-format +msgid " By %(filter_title)s " +msgstr "" diff --git a/locale/fa/LC_MESSAGES/django.mo b/locale/fa/LC_MESSAGES/django.mo new file mode 100644 index 0000000..2e8cd0d Binary files /dev/null and b/locale/fa/LC_MESSAGES/django.mo differ diff --git a/locale/fa/LC_MESSAGES/django.po b/locale/fa/LC_MESSAGES/django.po new file mode 100644 index 0000000..6252a0f --- /dev/null +++ b/locale/fa/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-09-09 14:03+0330\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +#: apps/pg/constans.py:6 +msgid "created" +msgstr "" + +#: apps/pg/constans.py:7 +msgid "ipg pending" +msgstr "" + +#: apps/pg/constans.py:8 +msgid "ipg success" +msgstr "" + +#: apps/pg/constans.py:10 +msgid "wallet submit pending" +msgstr "" + +#: apps/pg/constans.py:11 +msgid "wallet submit success" +msgstr "" + +#: apps/pg/constans.py:13 +msgid "failed" +msgstr "" + +#: apps/pg/constans.py:14 +msgid "expected failure" +msgstr "" + +#: apps/pg/constans.py:15 +msgid "success" +msgstr "" + +#: apps/pg/constans.py:19 +msgid "user" +msgstr "" + +#: apps/pg/constans.py:20 +msgid "application" +msgstr "" + +#: apps/pg/models.py:24 +msgid "fake" +msgstr "" + +#: apps/pg/models.py:25 +msgid "pna" +msgstr "" + +#: apps/pg/models.py:133 +msgid "charge via ipg" +msgstr "افزایش موجودی از طریق پرداخت آنلاین" + +#: apps/users/models.py:49 +msgid "password" +msgstr "" + +#: apps/users/models.py:52 +msgid "username" +msgstr "" + +#: apps/users/models.py:55 +msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only." +msgstr "" + +#: apps/users/models.py:58 +msgid "A user with that username already exists." +msgstr "" + +#: apps/users/models.py:64 +msgid "last update" +msgstr "" + +#: apps/users/models.py:65 +msgid "last login" +msgstr "" + +#: apps/users/models.py:66 +msgid "date joined" +msgstr "" + +#: main/settings.py:184 +msgid "English" +msgstr "انگلیسی" + +#: main/settings.py:185 +msgid "Persian" +msgstr "فارسی" + +#: main/settings.py:186 +msgid "Arabic" +msgstr "عربی" + +#: main/settings.py:187 +msgid "Turkish" +msgstr "ترکی" + +#: templates/admin/input_filter.html:5 +#, python-format +msgid " By %(filter_title)s " +msgstr "" diff --git a/locale/tr/LC_MESSAGES/django.mo b/locale/tr/LC_MESSAGES/django.mo new file mode 100644 index 0000000..2c90dd0 Binary files /dev/null and b/locale/tr/LC_MESSAGES/django.mo differ diff --git a/locale/tr/LC_MESSAGES/django.po b/locale/tr/LC_MESSAGES/django.po new file mode 100644 index 0000000..dd60a8c --- /dev/null +++ b/locale/tr/LC_MESSAGES/django.po @@ -0,0 +1,119 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-09-09 14:04+0330\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +#: apps/pg/constans.py:6 +msgid "created" +msgstr "" + +#: apps/pg/constans.py:7 +msgid "ipg pending" +msgstr "" + +#: apps/pg/constans.py:8 +msgid "ipg success" +msgstr "" + +#: apps/pg/constans.py:10 +msgid "wallet submit pending" +msgstr "" + +#: apps/pg/constans.py:11 +msgid "wallet submit success" +msgstr "" + +#: apps/pg/constans.py:13 +msgid "failed" +msgstr "" + +#: apps/pg/constans.py:14 +msgid "expected failure" +msgstr "" + +#: apps/pg/constans.py:15 +msgid "success" +msgstr "" + +#: apps/pg/constans.py:19 +msgid "user" +msgstr "" + +#: apps/pg/constans.py:20 +msgid "application" +msgstr "" + +#: apps/pg/models.py:24 +msgid "fake" +msgstr "" + +#: apps/pg/models.py:25 +msgid "pna" +msgstr "" + +#: apps/pg/models.py:133 +msgid "charge via ipg" +msgstr "" + +#: apps/users/models.py:49 +msgid "password" +msgstr "" + +#: apps/users/models.py:52 +msgid "username" +msgstr "" + +#: apps/users/models.py:55 +msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only." +msgstr "" + +#: apps/users/models.py:58 +msgid "A user with that username already exists." +msgstr "" + +#: apps/users/models.py:64 +msgid "last update" +msgstr "" + +#: apps/users/models.py:65 +msgid "last login" +msgstr "" + +#: apps/users/models.py:66 +msgid "date joined" +msgstr "" + +#: main/settings.py:184 +msgid "English" +msgstr "" + +#: main/settings.py:185 +msgid "Persian" +msgstr "" + +#: main/settings.py:186 +msgid "Arabic" +msgstr "" + +#: main/settings.py:187 +msgid "Turkish" +msgstr "" + +#: templates/admin/input_filter.html:5 +#, python-format +msgid " By %(filter_title)s " +msgstr "" diff --git a/main/settings.py b/main/settings.py index 67c8799..4a5e9a1 100644 --- a/main/settings.py +++ b/main/settings.py @@ -100,13 +100,15 @@ REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', 'rest_framework.authentication.SessionAuthentication', + 'rest_framework.authentication.TokenAuthentication', ), 'DEFAULT_PERMISSION_CLASSES': ( 'rest_framework.permissions.IsAuthenticated', ), - 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'PAGE_SIZE': 200, "DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema", + 'EXCEPTION_HANDLER': 'utils.exceptions.exception_handler', } ROOT_URLCONF = 'main.urls' @@ -178,6 +180,13 @@ USE_L10N = True USE_TZ = False +LANGUAGES = [ + ('en', _('English')), + ('fa', _('Persian')), + ('ar', _('Arabic')), + ('tr', _('Turkish')), +] + LOCALE_PATHS = [ BASE_DIR / 'locale', ]