Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved from ugettext(_lazy) to gettext(_lazy). #577

Merged
merged 2 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Moved from ugettext(_lazy) to gettext(_lazy).
  • Loading branch information
facundobatista committed Jul 6, 2023
commit c1f5bba022719445215c0a249f27c479831b3009
4 changes: 2 additions & 2 deletions events/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django import forms
from django.conf import settings
from django_summernote.widgets import SummernoteInplaceWidget
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from sanitizer.forms import SanitizedCharField

Expand Down Expand Up @@ -113,7 +113,7 @@ class Meta:
)
help_texts = {
'interest': _('¿Qué temas de Python te interesaría ver en una charla?'),
'gender': _('Queremos reducir la brecha de género. Este dato nos ayuda.'),
'gender': _('Queremos reducir la brecha de género. Este dato nos ayuda.'),
'cv': 'Dejanos un link a tu CV, perfil de LinkedIn o algo similar'
}

Expand Down
2 changes: 1 addition & 1 deletion events/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from crispy_forms.layout import Submit, Reset, Layout, Div
from django import forms
from django.http import HttpResponse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.urls import reverse_lazy

from .models import Event, EventParticipation
Expand Down
2 changes: 1 addition & 1 deletion events/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.urls import reverse

from autoslug import AutoSlugField
Expand Down
6 changes: 2 additions & 4 deletions events/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
from django.contrib.syndication.views import Feed
from django.http import Http404, HttpResponseRedirect
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.urls import reverse_lazy
from django.views.generic import ListView, DetailView
from django.views.generic.edit import (CreateView,
UpdateView,
DeleteView)
from django.views.generic.edit import CreateView, UpdateView, DeleteView

from .forms import EventForm, AnonymousEventParticipationForm, AuthenticatedEventParticipationForm
from .models import Event, EventParticipation
Expand Down
2 changes: 1 addition & 1 deletion joboffers/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.conf import settings
from django.core.exceptions import ValidationError

from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from .models import JobOffer, JobOfferComment, Remoteness
from crispy_forms.layout import Submit, Reset, Layout
from crispy_forms.helper import FormHelper
Expand Down
2 changes: 1 addition & 1 deletion jobs/forms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from random import choice
from django import forms
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.urls import reverse
from .models import Job, JobInactivated
from crispy_forms.layout import Submit, Reset, Layout
Expand Down
2 changes: 1 addition & 1 deletion jobs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.conf import settings
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from pycompanies.models import Company
from taggit_autosuggest.managers import TaggableManager
from model_utils.models import TimeStampedModel
Expand Down
2 changes: 1 addition & 1 deletion news/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django import forms
from django_summernote.widgets import SummernoteInplaceWidget
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Reset
from .models import NewsArticle
Expand Down
2 changes: 1 addition & 1 deletion news/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.db import models
from django.conf import settings
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from taggit_autosuggest.managers import TaggableManager
from model_utils.models import TimeStampedModel

Expand Down
2 changes: 1 addition & 1 deletion news/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.urls import reverse_lazy
from django.views.generic.edit import UpdateView, CreateView, DeleteView
from django.views.generic import ListView
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from community.views import OwnedObject, FilterableList
from .models import NewsArticle
from .forms import NewsArticleForm
Expand Down
2 changes: 1 addition & 1 deletion pycompanies/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django import forms
from django_summernote.widgets import SummernoteInplaceWidget
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from crispy_forms.helper import FormHelper
from crispy_forms.layout import Div, ButtonHolder, Layout, Submit
Expand Down
2 changes: 1 addition & 1 deletion pycompanies/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.db.models.signals import post_delete
from django.dispatch import receiver
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from model_utils.models import TimeStampedModel

Expand Down
10 changes: 5 additions & 5 deletions pycompanies/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.db.models import Count
from django.shortcuts import redirect, render
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.views.generic import ListView, DetailView, TemplateView
from django.views.generic.base import View
from django.views.generic.edit import UpdateView, CreateView, DeleteView
Expand Down Expand Up @@ -232,10 +232,10 @@ class CompanyAnalyticsView(DetailView):

def get_context_data(self, company):
grouped_views_qs = JobOfferAccessLog.objects \
.values('created_at__date', 'event_type') \
.annotate(day_views=Count('id')) \
.filter(joboffer__company=company) \
.order_by('created_at__date')
.values('created_at__date', 'event_type') \
.annotate(day_views=Count('id')) \
.filter(joboffer__company=company) \
.order_by('created_at__date')

graphs = []

Expand Down