Add translations

This commit is contained in:
Jonathan 2021-03-19 09:05:29 -04:00
parent 743b538263
commit b4b9668cab
5 changed files with 46 additions and 8 deletions

4
.gitignore vendored
View file

@ -42,10 +42,6 @@ htmlcov/
nosetests.xml
coverage.xml
# Translations
*.mo
*.pot
# Django stuff:
*.log

Binary file not shown.

View file

@ -0,0 +1,41 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-19 08:43-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: config.py:65
msgid ""
"Please enter a correct username and password. Note that both fields are case-"
"sensitive."
msgstr ""
"Veuillez saisir un nom d'utilisateur et un mot de passe valide. Veuillez noter que les deux champs sont sensibles à la casse."
#: templates/admin/defender/app_index.html:7
msgid "Home"
msgstr "Accueil"
#: utils.py:308
msgid "Account locked: too many login attempts. Please try again later."
msgstr "Compte verrouillé: trop de tentatives de connexion. Veuillez réessayer plus tard."
#: utils.py:312
msgid ""
"Account locked: too many login attempts. Contact an admin to unlock your "
"account."
msgstr ""
"Compte verrouillé: trop de tentatives de connexion. Contactez un administrateur pour déverrouiller votre compte."

View file

@ -37,7 +37,7 @@ class AccessAttemptTest(DefenderTestCase):
LOCKED_MESSAGE = "Account locked: too many login attempts."
PERMANENT_LOCKED_MESSAGE = (
LOCKED_MESSAGE + " Contact an admin to unlock your account."
LOCKED_MESSAGE + " Contact an admin to unlock your account."
)
def _get_random_str(self):

View file

@ -6,6 +6,7 @@ from django.shortcuts import render
from django.core.validators import validate_ipv46_address
from django.core.exceptions import ValidationError
from django.utils.module_loading import import_string
from django.utils.translation import gettext as _
from .connection import get_redis_connection
from . import config
@ -304,12 +305,12 @@ def lockout_response(request):
if config.COOLOFF_TIME:
return HttpResponse(
"Account locked: too many login attempts. " "Please try again later."
_("Account locked: too many login attempts. Please try again later.")
)
else:
return HttpResponse(
"Account locked: too many login attempts. "
"Contact an admin to unlock your account."
_("Account locked: too many login attempts. "
"Contact an admin to unlock your account.")
)