diff --git a/tickets/models.py b/tickets/models.py index 5bc37856..3308c6db 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -25,30 +25,30 @@ class Ticket(AclMixin, models.Model): null=True, ) title = models.CharField( - max_length=255, help_text=_("Title of the ticket"), blank=False, null=False + max_length=255, help_text=_("Title of the ticket."), blank=False, null=False ) description = models.TextField( max_length=3000, - help_text=_("Description of the ticket"), + help_text=_("Description of the ticket."), blank=False, null=False, ) date = models.DateTimeField(auto_now_add=True) email = models.EmailField( - help_text=_("An email address to get back to you"), max_length=100, null=True + help_text=_("An email address to get back to you."), max_length=100, null=True ) solved = models.BooleanField(default=False) class Meta: permissions = (("view_tickets", _("Can view a ticket object")),) - verbose_name = _("Ticket") - verbose_name_plural = _("Tickets") + verbose_name = _("ticket") + verbose_name_plural = _("tickets") def __str__(self): if self.user: - return "Ticket from {}. Date: {}".format(self.user.surname, self.date) + return _("Ticket from %(name)s. Date: %(date)s.").format(name=self.user.surname, date=self.date) else: - return "Anonymous Ticket. Date: {}".format(self.date) + return _("Anonymous ticket. Date: %s.") % (self.date) def publish_mail(self): site_url = GeneralOption.objects.first().main_site_url @@ -57,7 +57,7 @@ class Ticket(AclMixin, models.Model): lang = Preferences.objects.first().mail_language if lang == 0: - obj = "Nouvelle ouverture de ticket" + obj = "Nouveau ticket ouvert" template = loader.get_template("tickets/publication_mail_fr") else: obj = "New ticket opened" diff --git a/tickets/preferences/models.py b/tickets/preferences/models.py index 8add48bd..27922303 100644 --- a/tickets/preferences/models.py +++ b/tickets/preferences/models.py @@ -7,15 +7,15 @@ class Preferences(models.Model): publish_address = models.EmailField( help_text=_( - "Email address to publish the new tickets (leave empty for no publications)" + "Email address to publish the new tickets (leave empty for no publication)." ), max_length=1000, null=True, ) LANG_FR = 0 LANG_EN = 1 - LANGUES = ((0, _("Français")), (1, _("English"))) + LANGUES = ((0, _("French")), (1, _("English"))) mail_language = models.IntegerField(choices=LANGUES, default=LANG_FR) class Meta: - verbose_name = _("Ticket's settings") + verbose_name = _("tickets preferences") diff --git a/tickets/templates/tickets/aff_ticket.html b/tickets/templates/tickets/aff_ticket.html index c5605863..b66ad1c5 100644 --- a/tickets/templates/tickets/aff_ticket.html +++ b/tickets/templates/tickets/aff_ticket.html @@ -31,11 +31,11 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block content %} -
{% trans "Title:" %} {{ticket.title}}
-{% trans "Description" %} {{ ticket.description }}
+{% trans "Description:" %} {{ ticket.description }}