diff --git a/InvenTree/InvenTree/forms.py b/InvenTree/InvenTree/forms.py index 56a1a116da..79cdf49c3d 100644 --- a/InvenTree/InvenTree/forms.py +++ b/InvenTree/InvenTree/forms.py @@ -5,7 +5,7 @@ Helper forms which subclass Django forms to provide additional functionality # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Field diff --git a/InvenTree/build/forms.py b/InvenTree/build/forms.py index 380c72f50d..48be9a0ffa 100644 --- a/InvenTree/build/forms.py +++ b/InvenTree/build/forms.py @@ -5,7 +5,7 @@ Django Forms for interacting with Build objects # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from django import forms from InvenTree.forms import HelperForm diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 1c668324a5..ad0149ed48 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -9,7 +9,7 @@ import os from datetime import datetime from django.contrib.auth.models import User -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError from django.urls import reverse diff --git a/InvenTree/build/views.py b/InvenTree/build/views.py index e8a1d33ddc..15ced77130 100644 --- a/InvenTree/build/views.py +++ b/InvenTree/build/views.py @@ -5,7 +5,7 @@ Django views for interacting with Build objects # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError from django.views.generic import DetailView, ListView, UpdateView from django.forms import HiddenInput diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index df8e3b2d37..12b51438cb 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -17,7 +17,7 @@ from djmoney.models.fields import MoneyField from djmoney.contrib.exchange.models import convert_money from djmoney.contrib.exchange.exceptions import MissingRate -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from django.core.validators import MinValueValidator, URLValidator from django.core.exceptions import ValidationError diff --git a/InvenTree/company/forms.py b/InvenTree/company/forms.py index 3d2826fdec..2677402334 100644 --- a/InvenTree/company/forms.py +++ b/InvenTree/company/forms.py @@ -8,7 +8,7 @@ from __future__ import unicode_literals from InvenTree.forms import HelperForm from InvenTree.fields import RoundingDecimalFormField -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ import django.forms import djmoney.settings diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index c1b0594aac..e05d81a16a 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -9,7 +9,7 @@ import os import math -from django.utils.translation import gettext_lazy as _ +from django.utils.translation import ugettext_lazy as _ from django.core.validators import MinValueValidator from django.db import models from django.db.models import Sum, Q, UniqueConstraint diff --git a/InvenTree/order/forms.py b/InvenTree/order/forms.py index bb6cb40889..c8501d68b2 100644 --- a/InvenTree/order/forms.py +++ b/InvenTree/order/forms.py @@ -6,7 +6,7 @@ Django Forms for interacting with Order objects from __future__ import unicode_literals from django import forms -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from mptt.fields import TreeNodeChoiceField diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index cb78eabc6a..b1ee7f7c74 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -15,7 +15,7 @@ from django.core.validators import MinValueValidator from django.core.exceptions import ValidationError from django.contrib.auth.models import User from django.urls import reverse -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from markdownx.models import MarkdownxField diff --git a/InvenTree/part/forms.py b/InvenTree/part/forms.py index 7962ec3252..42970ccfb1 100644 --- a/InvenTree/part/forms.py +++ b/InvenTree/part/forms.py @@ -11,7 +11,7 @@ from InvenTree.fields import RoundingDecimalFormField from mptt.fields import TreeNodeChoiceField from django import forms -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ import common.models diff --git a/InvenTree/stock/forms.py b/InvenTree/stock/forms.py index 9bc5063925..3560f205cc 100644 --- a/InvenTree/stock/forms.py +++ b/InvenTree/stock/forms.py @@ -7,7 +7,7 @@ from __future__ import unicode_literals from django import forms from django.forms.utils import ErrorDict -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from django.core.validators import MinValueValidator from django.core.exceptions import ValidationError diff --git a/InvenTree/stock/views.py b/InvenTree/stock/views.py index 6edcb8cf70..eeee13ad3a 100644 --- a/InvenTree/stock/views.py +++ b/InvenTree/stock/views.py @@ -14,7 +14,7 @@ from django.urls import reverse from django.contrib.auth import get_user_model from django.contrib.auth.models import Group -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ from moneyed import CURRENCIES