From a4c3fff8b92b274707af575aead5eb4d9dc51386 Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Wed, 28 Apr 2021 11:37:37 +0200 Subject: [PATCH] add missing format strings for translation --- src/authentic2/manager/forms.py | 2 +- src/authentic2_auth_fc/views.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/authentic2/manager/forms.py b/src/authentic2/manager/forms.py index 760579be6..e93be29f0 100644 --- a/src/authentic2/manager/forms.py +++ b/src/authentic2/manager/forms.py @@ -855,5 +855,5 @@ class RolesCsvImportForm(LimitQuerysetFormMixin, forms.Form): self.roles.append(role) def add_line_error(self, error, line): - error = _('%s (line %d)') % (error, line + 1) + error = _('%(error)s (line %(number)d)') % {'error': error, 'number': line + 1} self.add_error('import_file', error) diff --git a/src/authentic2_auth_fc/views.py b/src/authentic2_auth_fc/views.py index 8aac42a01..405942ebe 100644 --- a/src/authentic2_auth_fc/views.py +++ b/src/authentic2_auth_fc/views.py @@ -391,12 +391,12 @@ class LoginOrLinkView(View): messages.warning( request, _( - 'Your FranceConnect email address "%s" is already used by the ' - 'FranceConnect account of "%s", so we cannot create an account for you. Please create ' + 'Your FranceConnect email address "%(email)s" is already used by the FranceConnect ' + 'account of "%(user)s", so we cannot create an account for you. Please create ' 'an account with another email address then link it to FranceConnect ' 'using your account management page.' ) - % (email, user.get_full_name()), + % {'email': email, 'user': user.get_full_name()}, ) else: # no email, we cannot disembiguate users, let's create it anyway user = User.objects.create()