Skip to content

Commit

Permalink
fix issue in username sanitizer and add dutch language
Browse files Browse the repository at this point in the history
  • Loading branch information
aottr committed Apr 8, 2024
1 parent c7f11cb commit e923e46
Show file tree
Hide file tree
Showing 7 changed files with 434 additions and 7 deletions.
2 changes: 2 additions & 0 deletions core/utils/general.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import re

def sainitize_username(username: str) -> str:
"""Remove illegal characters from a username"""
return re.sub(r'[^a-zA-Z0-9-_@]', "", username)
2 changes: 1 addition & 1 deletion paw/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django import get_version

VERSION = (0, 5, 9, "final", 0)
VERSION = (0, 5, 10, "final", 0)

__version__ = get_version(VERSION)
6 changes: 5 additions & 1 deletion paw/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-07 16:31+0000\n"
"POT-Creation-Date: 2024-04-08 14:59+0000\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"
Expand Down Expand Up @@ -70,6 +70,10 @@ msgstr ""
msgid "German"
msgstr ""

#: paw/settings.py:136
msgid "Dutch"
msgstr ""

#: paw/templates/base.html:20 paw/templates/dashboard_base.html:40
msgid "Tickets"
msgstr "Tickets"
Expand Down
6 changes: 5 additions & 1 deletion paw/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-07 16:31+0000\n"
"POT-Creation-Date: 2024-04-08 14:59+0000\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"
Expand Down Expand Up @@ -69,6 +69,10 @@ msgstr "Français"
msgid "German"
msgstr "Deutsch"

#: paw/settings.py:136
msgid "Dutch"
msgstr ""

#: paw/templates/base.html:20 paw/templates/dashboard_base.html:40
msgid "Tickets"
msgstr ""
Expand Down
18 changes: 14 additions & 4 deletions paw/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-07 16:31+0000\n"
"POT-Creation-Date: 2024-04-08 14:59+0000\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"
Expand All @@ -31,7 +31,10 @@ msgstr "Veuillez entrer un nom d'utilisateur"
msgid ""
"Username can only have alphanumeric characters and underscores and dashes (a-"
"z, 0-9, _, -, @)"
msgstr "Les noms d’utilisateurs ne peuvent contenir que des caractères alphanumériques, ainsi que des tirets ou des tirets du bas. (a-z, 0-9, -, _, @)"
msgstr ""
"Les noms d’utilisateurs ne peuvent contenir que des caractères "
"alphanumériques, ainsi que des tirets ou des tirets du bas. (a-z, 0-9, -, _, "
"@)"

#: core/forms.py:58
msgid "Password and Confirm Password do not match."
Expand Down Expand Up @@ -69,6 +72,10 @@ msgstr "Français"
msgid "German"
msgstr "Allemand"

#: paw/settings.py:136
msgid "Dutch"
msgstr ""

#: paw/templates/base.html:20 paw/templates/dashboard_base.html:40
msgid "Tickets"
msgstr "Tickets"
Expand Down Expand Up @@ -379,7 +386,8 @@ msgstr "La taille du fichier ne doit pas excéder 5Mo."

#: ticketing/forms.py:52
msgid "File type not supported. Supported types are: .jpg, .png, .pdf"
msgstr "Format du fichier non supporté. Les formats supportés sont: .jpg, .png. .pdf"
msgstr ""
"Format du fichier non supporté. Les formats supportés sont: .jpg, .png. .pdf"

#: ticketing/forms.py:73
msgid "Please enter a title"
Expand All @@ -400,7 +408,9 @@ msgstr "Aucune équipe"
#: ticketing/models.py:31
msgid ""
"If a team is selected, new tickets will automatically assigned to this team."
msgstr "Si une équipe est sélectionnée, les nouveaux tickets lui seront automatiquement attribués."
msgstr ""
"Si une équipe est sélectionnée, les nouveaux tickets lui seront "
"automatiquement attribués."

#~ msgid "Comment and close"
#~ msgstr "Commenter et fermer"
Expand Down
Loading

0 comments on commit e923e46

Please sign in to comment.