From 52cfdc7105f8eab64a16677e5162ff371c325716 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 3 May 2020 02:12:04 +0200 Subject: [PATCH] Fix name format for tickets --- tickets/locale/fr/LC_MESSAGES/django.po | 7 +++---- tickets/models.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tickets/locale/fr/LC_MESSAGES/django.po b/tickets/locale/fr/LC_MESSAGES/django.po index aee6fcff..c5e1fbe2 100644 --- a/tickets/locale/fr/LC_MESSAGES/django.po +++ b/tickets/locale/fr/LC_MESSAGES/django.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: 2.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-24 18:45+0200\n" +"POT-Creation-Date: 2020-05-03 02:10+0200\n" "PO-Revision-Date: 2019-11-16 00:35+0100\n" "Last-Translator: Laouen Fernet \n" "Language-Team: \n" @@ -59,9 +59,8 @@ msgid "tickets" msgstr "tickets" #: tickets/models.py:82 -#, python-format -msgid "Ticket from %(name)s. Date: %(date)s." -msgstr "Ticket de %(name)s. Date : %(date)s." +msgid "Ticket from {name}. Date: {date}." +msgstr "Ticket de {name}. Date : {date}." #: tickets/models.py:84 #, python-format diff --git a/tickets/models.py b/tickets/models.py index 32d8894f..b36c8e2b 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -79,7 +79,7 @@ class Ticket(AclMixin, models.Model): def __str__(self): if self.user: - return _("Ticket from %(name)s. Date: %(date)s.").format(name=self.user.surname, date=self.date) + return _("Ticket from {name}. Date: {date}.").format(name=self.user.get_full_name(),date=self.date) else: return _("Anonymous ticket. Date: %s.") % (self.date)