diff --git a/README.md b/README.md index 4efd31b5197b872efe38ffafb4b25136c22b0859..5990afdadb53afce9a5ba32646a3d4ffa86578cb 100644 --- a/README.md +++ b/README.md @@ -60,13 +60,13 @@ We ship a [pylint](https://pylint.org/) config to verify changes with. Uffd reads its default config from `uffd/default_config.cfg`. You can overwrite config variables by creating a config file in the `instance` folder. -The file must be named `conifg.cfg` (Python syntax), `config.json` or `config.yml`/`config.yaml`. +The file must be named `config.cfg` (Python syntax), `config.json` or `config.yml`/`config.yaml`. You can also set a custom file name with the environment variable `CONFIG_FILENAME`. ## Bind with LDAP service account or as user? Uffd can use a dedicated service account for LDAP operations by setting `LDAP_SERVICE_BIND_DN`. -Leave that variable blank to use anonymouse bind. +Leave that variable blank to use anonymous bind. Or set `LDAP_SERVICE_USER_BIND` to use the credentials of the currently logged in user. If you choose to run with user credentials, some features are not available, like password resets @@ -108,7 +108,9 @@ The web frontend is initially written in English and translated in the following  The selection uses the language browser header by default but can be overwritten via a UI element. -You can specify the availble languages in the config. +You can specify the available languages in the config. + +Use the `update_translations.sh` to update the translation files. ## License diff --git a/debian/control b/debian/control index f7414c84f9a42ef6084ae0b314be1de15e7e9064..4b7add38f62d7adfc00866f668bdac19c19bf3ec 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Architecture: any Depends: ${misc:Depends}, # Unlike most debian python packages, we depend directly on the deb packages and do not want to populate our dependencies from the setup.py . -# Bacause of this we do not use the variable from pybild. +# Because of this we do not use the variable from pybuild. # ${python3:Depends}, python3-ldap3, python3-flask, diff --git a/uffd/default_config.cfg b/uffd/default_config.cfg index 0d10750a8fe21687636f6cf0e6579ef85a4b5918..6a27760bb0c7fdc390f5c5b04e8fa89068bf2373 100644 --- a/uffd/default_config.cfg +++ b/uffd/default_config.cfg @@ -80,7 +80,7 @@ SELF_SIGNUP=False INVITE_MAX_VALID_DAYS=21 -LOGINNAME_BLACKLIST=['^admin$', '^root$'] +LOGINNAME_BLOCKLIST=['^admin$', '^root$'] #MFA_ICON_URL = 'https://example.com/logo.png' #MFA_RP_ID = 'example.com' # If unset, hostname from current request is used diff --git a/uffd/selfservice/templates/selfservice/self.html b/uffd/selfservice/templates/selfservice/self.html index 2ddcc9b4cbd1dcfd44d820559bb0eb20922ad6d9..8e0800995f134a6d5ebddf82fa5e038def78ca70 100644 --- a/uffd/selfservice/templates/selfservice/self.html +++ b/uffd/selfservice/templates/selfservice/self.html @@ -22,10 +22,6 @@ <label>{{_("Login Name")}}</label> <input type="text" class="form-control" value="{{ user.loginname }}" readonly> </div> - <div class="form-group col-12 col-md-3"> - <label>{{_("User ID")}}</label> - <input type="text" class="form-control" value="{{ user.uid }}" readonly> - </div> </div> <div class="form-group"> <label>{{_("Display Name")}}</label> diff --git a/uffd/selfservice/templates/selfservice/set_password.html b/uffd/selfservice/templates/selfservice/set_password.html index 6288906b97467eaffe7a8b6001663536e59fc667..42eaa8660c3f90ac927f51ba2583e981ea8fa46f 100644 --- a/uffd/selfservice/templates/selfservice/set_password.html +++ b/uffd/selfservice/templates/selfservice/set_password.html @@ -14,7 +14,7 @@ <label for="user-password1">{{_("New Password")}}</label> <input type="password" class="form-control" id="user-password1" name="password1" required="required" tabindex = "2"> <small class="form-text text-muted"> - {{_("At least 8 and at most 256 characters, no other special requirements. But please don't be stupid, do use a password manager.")}} + {{_("At least 8 and at most 256 characters, no other special requirements. But please use a password manager.")}} </small> </div> <div class="form-group col-12"> diff --git a/uffd/signup/templates/signup/start.html b/uffd/signup/templates/signup/start.html index fd96d80f4fba375d6f2a47e96c1aee4e67f3afbc..a60dbdb2f3270f48f3e1fcff09bf955fd4e74411 100644 --- a/uffd/signup/templates/signup/start.html +++ b/uffd/signup/templates/signup/start.html @@ -46,7 +46,7 @@ <label for="user-password1">{{_('Password')}}</label> <input type="password" class="form-control" id="user-password1" name="password1" minlength=8 maxlength=256 required> <small class="form-text text-muted"> - {{_("At least 8 and at most 256 characters, no other special requirements. But please don't be stupid, do use a password manager.")}} + {{_("At least 8 and at most 256 characters, no other special requirements. But please use a password manager.")}} </small> </div> <div class="form-group col-12"> diff --git a/uffd/translations/README.md b/uffd/translations/README.md deleted file mode 100644 index c5b74111a1f1c47a8d30a0a471ba1599a5ba24f8..0000000000000000000000000000000000000000 --- a/uffd/translations/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# How to add new translations - -Extract all translatable string from `.py` and `.html` files to a `.pot`. -```bash -pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot . -``` -Update the `messages.po` file to include the new / updated strings. -```bash -pybabel update -i messages.pot -d translations -``` -Compile the `messages.po` file to a `messages.mo` file. -```bash -pybabel compile -d translations -``` -Bonus: -Initialize a new language. -```bash -pybabel init -i messages.pot -d translations -l de -``` - -Complete Documentation of Flask-Babel: https://flask-babel.tkte.ch \ No newline at end of file diff --git a/uffd/translations/de/LC_MESSAGES/messages.mo b/uffd/translations/de/LC_MESSAGES/messages.mo index 1d1ab4d5fdc5821051d0185373fc92a51b51a77b..6f193ab85ad4005a5b6702d5573c3f24fb05797e 100644 Binary files a/uffd/translations/de/LC_MESSAGES/messages.mo and b/uffd/translations/de/LC_MESSAGES/messages.mo differ diff --git a/uffd/translations/de/LC_MESSAGES/messages.po b/uffd/translations/de/LC_MESSAGES/messages.po index 60b944e1c1620c7945d922b9a05dc353298eeb92..e7f5292582b2056db7e5f99bc802eb26a80d6044 100644 --- a/uffd/translations/de/LC_MESSAGES/messages.po +++ b/uffd/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-08-02 12:33+0200\n" +"POT-Creation-Date: 2021-08-13 01:48+0200\n" "PO-Revision-Date: 2021-05-25 21:18+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language: de\n" @@ -59,7 +59,7 @@ msgstr "Dir fehlen Berechtigungen um diesen Einladungslink zu erstellen" #: uffd/invite/views.py:91 msgid "Invite link must either allow signup or grant at least one role" msgstr "" -"Einladungslink must entweder Account-Registrierung erlauben oder Rollen " +"Einladungslink muss entweder Account-Registrierung erlauben oder Rollen " "vergeben" #: uffd/invite/views.py:119 uffd/invite/views.py:148 @@ -74,7 +74,7 @@ msgstr "Rollen erfolgreich geändert" msgid "Invite link does not allow signup" msgstr "Einladungslink erlaubt keine Account-Registrierung" -#: uffd/invite/views.py:173 uffd/selfservice/views.py:53 +#: uffd/invite/views.py:173 uffd/selfservice/views.py:50 #: uffd/signup/views.py:49 msgid "Passwords do not match" msgstr "Die Passwörter stimmen nicht überein" @@ -107,7 +107,7 @@ msgstr "Link" #: uffd/invite/templates/invite/list.html:13 msgid "Created by" -msgstr "Ersteller" +msgstr "Erstellt durch" #: uffd/invite/templates/invite/list.html:14 msgid "Permissions" @@ -147,7 +147,7 @@ msgstr "Abgelaufen" #: uffd/invite/templates/invite/list.html:57 msgid "Invalid, unpermitted creator" -msgstr "Ungültig, unberechtigter Ersteller" +msgstr "Ungültig, erstellt durch unberechtigten Account" #: uffd/invite/templates/invite/list.html:59 msgid "Invalid" @@ -205,7 +205,7 @@ msgstr "Keine Account-Registrierung möglich" #: uffd/invite/templates/invite/list.html:98 #, python-format msgid "Link grants users the role \"%(name)s\"" -msgstr "Link gibt Nutzern die Rolle \"%(name)s\"" +msgstr "Link gibt Accounts die Rolle \"%(name)s\"" #: uffd/invite/templates/invite/list.html:104 msgid "Never used" @@ -267,7 +267,7 @@ msgstr "Enthaltene Rollen" #: uffd/role/templates/role/list.html:14 #: uffd/rolemod/templates/rolemod/list.html:9 #: uffd/rolemod/templates/rolemod/show.html:46 -#: uffd/selfservice/templates/selfservice/self.html:107 +#: uffd/selfservice/templates/selfservice/self.html:103 #: uffd/user/templates/group/list.html:10 #: uffd/user/templates/group/show.html:11 uffd/user/templates/user/show.html:95 #: uffd/user/templates/user/show.html:127 @@ -278,7 +278,7 @@ msgstr "Name" #: uffd/role/templates/role/list.html:15 uffd/role/templates/role/show.html:48 #: uffd/rolemod/templates/rolemod/list.html:10 #: uffd/rolemod/templates/rolemod/show.html:28 -#: uffd/selfservice/templates/selfservice/self.html:108 +#: uffd/selfservice/templates/selfservice/self.html:104 #: uffd/user/templates/group/list.html:11 uffd/user/templates/user/show.html:96 #: uffd/user/templates/user/show.html:128 msgid "Description" @@ -426,7 +426,7 @@ msgid "Two-factor authentication failed" msgstr "Zwei-Faktor-Authentifizierung fehlgeschlagen" #: uffd/mfa/templates/mfa/auth.html:12 -#: uffd/selfservice/templates/selfservice/self.html:73 +#: uffd/selfservice/templates/selfservice/self.html:69 msgid "Two-Factor Authentication" msgstr "Zwei-Faktor-Authentifizierung" @@ -473,12 +473,12 @@ msgid "Disable two-factor authentication" msgstr "Zwei-Faktor-Authentifizierung (2FA) deaktivieren" #: uffd/mfa/templates/mfa/setup.html:18 -#: uffd/selfservice/templates/selfservice/self.html:79 +#: uffd/selfservice/templates/selfservice/self.html:75 msgid "Two-factor authentication is currently <strong>enabled</strong>." msgstr "Die Zwei-Faktor-Authentifizierung ist derzeit <strong>aktiviert</strong>." #: uffd/mfa/templates/mfa/setup.html:20 -#: uffd/selfservice/templates/selfservice/self.html:81 +#: uffd/selfservice/templates/selfservice/self.html:77 msgid "Two-factor authentication is currently <strong>disabled</strong>." msgstr "" "Die Zwei-Faktor-Authentifizierung ist derzeit " @@ -700,7 +700,7 @@ msgstr "Sekunden" msgid "Verify and complete setup" msgstr "Verifiziere und beende das Setup" -#: uffd/oauth2/views.py:95 uffd/selfservice/views.py:79 +#: uffd/oauth2/views.py:95 uffd/selfservice/views.py:76 #: uffd/session/views.py:93 #, python-format msgid "" @@ -740,7 +740,7 @@ msgstr "" #: uffd/oauth2/templates/oauth2/logout.html:34 msgid "Logging you out on all services ..." -msgstr "Melde dich bei allen Diensten ab ..." +msgstr "Abmeldung bei allen Diensten ..." #: uffd/oauth2/templates/oauth2/logout.html:38 msgid "Skip this and continue" @@ -762,7 +762,7 @@ msgstr "" msgid "Access denied" msgstr "Zugriff verweigert" -#: uffd/role/views.py:51 uffd/selfservice/templates/selfservice/self.html:92 +#: uffd/role/views.py:51 uffd/selfservice/templates/selfservice/self.html:88 #: uffd/user/templates/user/list.html:20 uffd/user/templates/user/show.html:21 #: uffd/user/templates/user/show.html:90 msgid "Roles" @@ -789,15 +789,15 @@ msgid "" "All non-service users will be removed as members from this role and get " "its permissions implicitly. Are you sure?" msgstr "" -"Alle Benutzer-Accounts, die keine Service-Accounts sind, verlieren diese " -"Rolle und erhalten dessen Berechtigungen implizit." +"Alle Nicht-Service-Accounts verlieren diese Rolle und erhalten dessen " +"Berechtigungen implizit." #: uffd/role/templates/role/show.html:17 uffd/role/templates/role/show.html:23 msgid "Set as default" msgstr "Als Default setzen" #: uffd/role/templates/role/show.html:19 uffd/role/templates/role/show.html:21 -#: uffd/selfservice/templates/selfservice/self.html:123 +#: uffd/selfservice/templates/selfservice/self.html:119 #: uffd/user/templates/user/show.html:11 msgid "Are you sure?" msgstr "Wirklich fortfahren?" @@ -832,7 +832,7 @@ msgstr "Keine Moderationsgruppe" #: uffd/role/templates/role/show.html:63 msgid "Moderators" -msgstr "Moderatoren" +msgstr "Accounts mit Moderationsrechten" #: uffd/role/templates/role/show.html:71 #: uffd/rolemod/templates/rolemod/show.html:18 @@ -886,7 +886,7 @@ msgstr "Rollenname" #: uffd/rolemod/templates/rolemod/show.html:32 msgid "Moderators:" -msgstr "Moderatoren:" +msgstr "Accounts mit Moderationsrechten:" #: uffd/rolemod/templates/rolemod/show.html:42 msgid "Role members:" @@ -896,31 +896,31 @@ msgstr "Mitglieder:" msgid "Remove" msgstr "Entfernen" -#: uffd/selfservice/views.py:25 +#: uffd/selfservice/views.py:22 msgid "Selfservice" msgstr "Selfservice" -#: uffd/selfservice/views.py:37 +#: uffd/selfservice/views.py:34 msgid "Display name changed." msgstr "Anzeigename geändert." -#: uffd/selfservice/views.py:39 +#: uffd/selfservice/views.py:36 msgid "Display name is not valid." msgstr "Anzeigename ist nicht valide." -#: uffd/selfservice/views.py:42 +#: uffd/selfservice/views.py:39 msgid "We sent you an email, please verify your mail address." msgstr "Wir haben dir eine E-Mail gesendet, bitte prüfe deine E-Mail-Adresse." -#: uffd/selfservice/views.py:56 +#: uffd/selfservice/views.py:53 msgid "Password changed" msgstr "Passwort geändert" -#: uffd/selfservice/views.py:59 +#: uffd/selfservice/views.py:56 msgid "Invalid password" msgstr "Passwort ungültig" -#: uffd/selfservice/views.py:77 +#: uffd/selfservice/views.py:74 #, python-format msgid "" "We received too many password reset requests for this user! Please wait " @@ -929,48 +929,48 @@ msgstr "" "Wir haben zu viele fehlgeschlagene Anmeldeversuche für diesen Account! " "Bitte warte mindestens %(delay)s." -#: uffd/selfservice/views.py:83 +#: uffd/selfservice/views.py:80 msgid "" "We sent a mail to this user's mail address if you entered the correct " "mail and login name combination" msgstr "" -"Falls E-Mail-Adresse und Benutzername richtig waren, wurde eine E-Mail an" -" die Adresse gesendet." +"Falls E-Mail-Adresse und Anmeldename richtig waren, wurde eine E-Mail an " +"die Adresse gesendet." -#: uffd/selfservice/views.py:93 uffd/selfservice/views.py:121 +#: uffd/selfservice/views.py:90 uffd/selfservice/views.py:118 msgid "Token expired, please try again." msgstr "Link abgelaufen, bitte versuche es erneut." -#: uffd/selfservice/views.py:101 +#: uffd/selfservice/views.py:98 msgid "You need to set a password, please try again." msgstr "Password fehlt, bitte versuche es erneut." -#: uffd/selfservice/views.py:104 +#: uffd/selfservice/views.py:101 msgid "Passwords do not match, please try again." msgstr "Die Passwörter stimmen nicht überein, bitte versuche es erneut" -#: uffd/selfservice/views.py:108 +#: uffd/selfservice/views.py:105 msgid "Password ist not valid, please try again." msgstr "Ungültiges Passwort, bitte versuche es erneut" -#: uffd/selfservice/views.py:111 +#: uffd/selfservice/views.py:108 msgid "New password set" msgstr "Passwort geändert" -#: uffd/selfservice/views.py:129 +#: uffd/selfservice/views.py:126 msgid "New mail set" msgstr "E-Mail-Adresse geändert" -#: uffd/selfservice/views.py:140 +#: uffd/selfservice/views.py:137 msgid "Leaving roles is disabled" msgstr "Verlassen von Rollen ist deaktiviert" -#: uffd/selfservice/views.py:147 +#: uffd/selfservice/views.py:144 #, python-format msgid "You left role %(role_name)s" msgstr "Rolle %(role_name)s verlassen" -#: uffd/selfservice/views.py:211 +#: uffd/selfservice/views.py:161 uffd/selfservice/views.py:181 #, python-format msgid "Mail to \"%(mail_address)s\" could not be sent!" msgstr "E-Mail an \"%(mail_address)s\" konnte nicht gesendet werden!" @@ -985,7 +985,7 @@ msgstr "Passwort vergessen" #: uffd/signup/templates/signup/start.html:19 #: uffd/user/templates/user/list.html:18 uffd/user/templates/user/show.html:48 msgid "Login Name" -msgstr "Benutzername" +msgstr "Anmeldename" #: uffd/selfservice/templates/selfservice/forgot_password.html:18 msgid "Mail Address" @@ -1007,7 +1007,7 @@ msgstr "" #: uffd/selfservice/templates/selfservice/self.html:14 #: uffd/user/templates/user/show.html:18 msgid "Profile" -msgstr "Profile" +msgstr "Profil" #: uffd/selfservice/templates/selfservice/self.html:15 msgid "" @@ -1023,40 +1023,35 @@ msgstr "" msgid "Changes may take serveral minutes to be visible in all services." msgstr "Änderungen sind erst nach einigen Minuten in allen Diensten sichtbar." -#: uffd/selfservice/templates/selfservice/self.html:26 -#: uffd/user/templates/user/show.html:28 -msgid "User ID" -msgstr "Benutzer ID" - -#: uffd/selfservice/templates/selfservice/self.html:31 +#: uffd/selfservice/templates/selfservice/self.html:27 #: uffd/signup/templates/signup/start.html:32 #: uffd/user/templates/user/list.html:19 uffd/user/templates/user/show.html:63 msgid "Display Name" msgstr "Anzeigename" -#: uffd/selfservice/templates/selfservice/self.html:35 +#: uffd/selfservice/templates/selfservice/self.html:31 #: uffd/signup/templates/signup/start.html:39 msgid "E-Mail Address" msgstr "E-Mail-Adresse" -#: uffd/selfservice/templates/selfservice/self.html:38 +#: uffd/selfservice/templates/selfservice/self.html:34 msgid "We will send you a confirmation mail to this address if you change it" msgstr "" "Wir werden dir eine Bestätigungsmail zum Setzen der neuen E-Mail-Adresse " "senden." -#: uffd/selfservice/templates/selfservice/self.html:41 +#: uffd/selfservice/templates/selfservice/self.html:37 msgid "Update Profile" msgstr "Änderungen speichern" -#: uffd/selfservice/templates/selfservice/self.html:50 +#: uffd/selfservice/templates/selfservice/self.html:46 #: uffd/session/templates/session/login.html:18 #: uffd/signup/templates/signup/start.html:46 #: uffd/user/templates/user/show.html:77 msgid "Password" msgstr "Passwort" -#: uffd/selfservice/templates/selfservice/self.html:51 +#: uffd/selfservice/templates/selfservice/self.html:47 msgid "" "Your login password for the Single-Sign-On. Only enter it on the Single-" "Sign-On login page! No other legit websites will ask you for this " @@ -1067,27 +1062,27 @@ msgstr "" " Webseite wird dich nach diesem Passwort fragen. Es wird auch niemals für" " Support-Anfragen benötigt." -#: uffd/selfservice/templates/selfservice/self.html:56 +#: uffd/selfservice/templates/selfservice/self.html:52 #: uffd/selfservice/templates/selfservice/set_password.html:14 msgid "New Password" msgstr "Neues Passwort" -#: uffd/selfservice/templates/selfservice/self.html:58 +#: uffd/selfservice/templates/selfservice/self.html:54 #: uffd/user/templates/user/show.html:84 msgid "At least 8 and at most 256 characters, no other special requirements." msgstr "Mindestens 8 und maximal 256 Zeichen, keine weiteren Einschränkungen." -#: uffd/selfservice/templates/selfservice/self.html:62 +#: uffd/selfservice/templates/selfservice/self.html:58 #: uffd/selfservice/templates/selfservice/set_password.html:21 #: uffd/signup/templates/signup/start.html:53 msgid "Repeat Password" msgstr "Passwort wiederholen" -#: uffd/selfservice/templates/selfservice/self.html:64 +#: uffd/selfservice/templates/selfservice/self.html:60 msgid "Change Password" msgstr "Passwort ändern" -#: uffd/selfservice/templates/selfservice/self.html:74 +#: uffd/selfservice/templates/selfservice/self.html:70 msgid "" "Setting up Two-Factor Authentication (2FA) adds an additional step to the" " Single-Sign-On login and increases the security of your account " @@ -1097,11 +1092,11 @@ msgstr "" "Anmeldung im Single-Sign-On hinzu und verbessert damit die Sicherheit " "deines Accounts erheblich." -#: uffd/selfservice/templates/selfservice/self.html:84 +#: uffd/selfservice/templates/selfservice/self.html:80 msgid "Manage two-factor authentication" msgstr "Zwei-Faktor-Authentifizierung (2FA) verwalten" -#: uffd/selfservice/templates/selfservice/self.html:93 +#: uffd/selfservice/templates/selfservice/self.html:89 msgid "" "Aside from a set of base permissions, your roles determine the " "permissions of your account." @@ -1109,7 +1104,7 @@ msgstr "" "Deine Berechtigungen werden, von einigen Basis-Berechtigungen abgesehen, " "von deinen Rollen bestimmt" -#: uffd/selfservice/templates/selfservice/self.html:95 +#: uffd/selfservice/templates/selfservice/self.html:91 #, python-format msgid "" "See <a href=\"%(services_url)s\">Services</a> for an overview of your " @@ -1118,15 +1113,17 @@ msgstr "" "Auf <a href=\"%(services_url)s\">Dienste</a> erhälst du einen Überblick " "über deine aktuellen Berechtigungen." -#: uffd/selfservice/templates/selfservice/self.html:100 +#: uffd/selfservice/templates/selfservice/self.html:96 msgid "Administrators and role moderators can invite you to new roles." -msgstr "Administratoren und Rollen-Moderatoren können dich zu Rollen einladen." +msgstr "" +"Accounts mit Adminrechten oder Rollen-Moderationsrechten können dich zu " +"Rollen einladen." -#: uffd/selfservice/templates/selfservice/self.html:102 +#: uffd/selfservice/templates/selfservice/self.html:98 msgid "Administrators can add new roles to your account." -msgstr "Administratoren können dich zu neuen Rollen hinzufügen." +msgstr "Accounts mit Adminrechten können dich zu neuen Rollen hinzufügen." -#: uffd/selfservice/templates/selfservice/self.html:117 +#: uffd/selfservice/templates/selfservice/self.html:113 msgid "" "Some permissions in this role require you to setup two-factor " "authentication" @@ -1134,11 +1131,11 @@ msgstr "" "Einige Berechtigungen dieser Rolle erfordern das Einrichten von Zwei-" "Faktor-Authentifikation" -#: uffd/selfservice/templates/selfservice/self.html:124 +#: uffd/selfservice/templates/selfservice/self.html:120 msgid "Leave" msgstr "Verlassen" -#: uffd/selfservice/templates/selfservice/self.html:132 +#: uffd/selfservice/templates/selfservice/self.html:128 msgid "You currently don't have any roles" msgstr "Du hast derzeit keine Rollen" @@ -1150,10 +1147,10 @@ msgstr "Passwort zurücksetzen" #: uffd/signup/templates/signup/start.html:49 msgid "" "At least 8 and at most 256 characters, no other special requirements. But" -" please don't be stupid, do use a password manager." +" please use a password manager." msgstr "" "Mindestens 8 und maximal 256 Zeichen, keine weiteren Einschränkungen. " -"Bitte sei nicht dumm und verwende einen Passwort-Manager." +"Bitte verwende einen Passwort-Manager." #: uffd/selfservice/templates/selfservice/set_password.html:25 msgid "Set password" @@ -1191,7 +1188,7 @@ msgstr "" #: uffd/session/views.py:99 msgid "Login name or password is wrong" -msgstr "Der Benutzername oder das Passwort ist falsch" +msgstr "Der Anmeldename oder das Passwort ist falsch" #: uffd/session/views.py:102 msgid "You do not have access to this service" @@ -1422,11 +1419,11 @@ msgstr "Gruppen" #: uffd/user/views_user.py:29 msgid "Users" -msgstr "Benutzer" +msgstr "Accounts" #: uffd/user/views_user.py:49 msgid "Login name does not meet requirements" -msgstr "Benutzername entspricht nicht den Anforderungen" +msgstr "Anmeldename entspricht nicht den Anforderungen" #: uffd/user/views_user.py:54 msgid "Mail is invalid" @@ -1447,16 +1444,16 @@ msgstr "Service-Account erstellt" #: uffd/user/views_user.py:80 msgid "User created. We sent the user a password reset link by mail" msgstr "" -"Benutzer erstellt. E-Mail mit einem Link zum Setzen des Passworts wurde " +"Account erstellt. E-Mail mit einem Link zum Setzen des Passworts wurde " "versendet." #: uffd/user/views_user.py:82 msgid "User updated" -msgstr "Benutzer aktualisiert" +msgstr "Account aktualisiert" #: uffd/user/views_user.py:93 msgid "Deleted user" -msgstr "Benutzer gelöscht" +msgstr "Account gelöscht" #: uffd/user/templates/group/list.html:9 uffd/user/templates/group/show.html:7 msgid "GID" @@ -1476,7 +1473,7 @@ msgstr "service" #: uffd/user/templates/user/list.html:57 msgid "Import a csv formated list of users" -msgstr "Importiere eine als CSV formatierte Liste von Benutzern" +msgstr "Importiere eine als CSV formatierte Liste von Accounts" #: uffd/user/templates/user/list.html:64 msgid "" @@ -1489,8 +1486,8 @@ msgstr "" "Beispiel:" #: uffd/user/templates/user/list.html:75 uffd/user/templates/user/show.html:58 -msgid "Ignore login name blacklist" -msgstr "Benutzernamen-Blacklist ignorieren" +msgid "Ignore login name blocklist" +msgstr "Liste der nicht erlaubten Anmeldenamen ignorieren" #: uffd/user/templates/user/list.html:80 msgid "Import" @@ -1500,6 +1497,10 @@ msgstr "Importieren" msgid "Reset 2FA" msgstr "2FA zurücksetzen" +#: uffd/user/templates/user/show.html:28 +msgid "User ID" +msgstr "Account ID" + #: uffd/user/templates/user/show.html:36 msgid "will be choosen" msgstr "wird automatisch bestimmt" @@ -1511,19 +1512,19 @@ msgstr "Service-Account" #: uffd/user/templates/user/show.html:51 msgid "" "Only letters, numbers, dashes (\"-\") and underscores (\"_\") are " -"allowed. At most 32, at least 2 characters. There is a word blacklist. " +"allowed. At most 32, at least 2 characters. There is a word blocklist. " "Must be unique." msgstr "" "Nur Buchstaben, Zahlen, Binde- (\"-\") und Unterstriche (\"_\") sind " -"erlaubt. Maximal 32, mindestens 2 Zeichen. Es gibt eine Blacklist. Muss " -"einmalig sein." +"erlaubt. Maximal 32, mindestens 2 Zeichen. Es gibt eine Liste nicht " +"erlaubter Namen. Muss einmalig sein." #: uffd/user/templates/user/show.html:66 msgid "" "If you leave this empty it will be set to the login name. At most 128, at" " least 2 characters. No character restrictions." msgstr "" -"Wenn das Feld leer bleibt, wird der Benutzername verwendet. Maximal 128, " +"Wenn das Feld leer bleibt, wird der Anmeldename verwendet. Maximal 128, " "mindestens 2 Zeichen. Keine Zeichenbeschränkung." #: uffd/user/templates/user/show.html:70 @@ -1535,7 +1536,7 @@ msgid "" "Do a sanity check here. A user can take over another account if both have" " the same mail address set." msgstr "" -"Überprüfe, ob die E-Mail-Adresse plausibel ist! Ein Benutzer kann einen " +"Überprüfe, ob die E-Mail-Adresse plausibel ist! Ein Account kann einen " "anderen Account übernehmen, wenn beide die selbe E-Mail-Adresse " "verwenden." diff --git a/uffd/user/models.py b/uffd/user/models.py index 2749884f85f9e77ed2f5a71cde3657f5e412dd46..81a6e3638aae7b3f3687f0bd5d88ef60ed7e187e 100644 --- a/uffd/user/models.py +++ b/uffd/user/models.py @@ -109,14 +109,14 @@ class BaseUser(ldap.Model): return True return False - def set_loginname(self, value, ignore_blacklist=False): + def set_loginname(self, value, ignore_blocklist=False): if len(value) > 32 or len(value) < 1: return False for char in value: if not char in string.ascii_lowercase + string.digits + '_-': return False - if not ignore_blacklist: - for expr in current_app.config['LOGINNAME_BLACKLIST']: + if not ignore_blocklist: + for expr in current_app.config['LOGINNAME_BLOCKLIST']: if re.match(expr, value): return False self.loginname = value diff --git a/uffd/user/templates/user/list.html b/uffd/user/templates/user/list.html index 013f6fb3fede877cb3cdb3a15fa752a65decf022..61f5b68d608e27c45a1826ffb1db4a073ca7ac5a 100644 --- a/uffd/user/templates/user/list.html +++ b/uffd/user/templates/user/list.html @@ -71,8 +71,8 @@ testuser2,foobaadsfr@example.com,5;2 </pre> <textarea rows="10" class="form-control" name="csv"></textarea> <div class="form-check mt-2"> - <input class="form-check-input" type="checkbox" id="ignore-loginname-blacklist" name="ignore-loginname-blacklist" value="1" aria-label="enabled"> - <label class="form-check-label" for="ignore-loginname-blacklist">{{_("Ignore login name blacklist")}}</label> + <input class="form-check-input" type="checkbox" id="ignore-loginname-blocklist" name="ignore-loginname-blocklist" value="1" aria-label="enabled"> + <label class="form-check-label" for="ignore-loginname-blocklist">{{_("Ignore login name blocklist")}}</label> </div> </div> <div class="modal-footer"> diff --git a/uffd/user/templates/user/show.html b/uffd/user/templates/user/show.html index 9fee26bf2da43afcfd341b4071469aef37ca4d22..59ef1bd1d0cbaa3d37db4ae62b7554262866f1c9 100644 --- a/uffd/user/templates/user/show.html +++ b/uffd/user/templates/user/show.html @@ -48,14 +48,14 @@ <label for="user-loginname">{{_("Login Name")}}</label> <input type="text" class="form-control" id="user-loginname" name="loginname" value="{{ user.loginname or '' }}" {% if user.uid %}readonly{% endif %}> <small class="form-text text-muted"> - {{_("Only letters, numbers, dashes (\"-\") and underscores (\"_\") are allowed. At most 32, at least 2 characters. There is a word blacklist. Must be unique.")}} + {{_("Only letters, numbers, dashes (\"-\") and underscores (\"_\") are allowed. At most 32, at least 2 characters. There is a word blocklist. Must be unique.")}} </small> </div> {% if not user.uid %} <div class="form-group col"> <div class="form-check"> - <input class="form-check-input" type="checkbox" id="ignore-loginname-blacklist" name="ignore-loginname-blacklist" value="1" aria-label="enabled"> - <label class="form-check-label" for="ignore-loginname-blacklist">{{_('Ignore login name blacklist')}}</label> + <input class="form-check-input" type="checkbox" id="ignore-loginname-blocklist" name="ignore-loginname-blocklist" value="1" aria-label="enabled"> + <label class="form-check-label" for="ignore-loginname-blocklist">{{_('Ignore login name blocklist')}}</label> </div> </div> {% endif %} diff --git a/uffd/user/views_user.py b/uffd/user/views_user.py index 80e91b05849b1cb95057f943be8fa27c9951dbf9..ee5bc71eed7ee34364f64aa2c092fe94465a315f 100644 --- a/uffd/user/views_user.py +++ b/uffd/user/views_user.py @@ -42,10 +42,10 @@ def show(uid=None): def update(uid=None): if uid is None: user = User() - ignore_blacklist = request.form.get('ignore-loginname-blacklist', False) + ignore_blocklist = request.form.get('ignore-loginname-blocklist', False) if request.form.get('serviceaccount'): user.is_service_user = True - if not user.set_loginname(request.form['loginname'], ignore_blacklist=ignore_blacklist): + if not user.set_loginname(request.form['loginname'], ignore_blocklist=ignore_blocklist): flash(_('Login name does not meet requirements')) return redirect(url_for('user.show')) else: @@ -101,7 +101,7 @@ def csvimport(): flash('No data for csv import!') return redirect(url_for('user.index')) - ignore_blacklist = request.values.get('ignore-loginname-blacklist', False) + ignore_blocklist = request.values.get('ignore-loginname-blocklist', False) roles = Role.query.filter_by(is_default=False).all() usersadded = 0 @@ -112,7 +112,7 @@ def csvimport(): flash("invalid line, ignored : {}".format(row)) continue newuser = User() - if not newuser.set_loginname(row[0], ignore_blacklist=ignore_blacklist) or not newuser.set_displayname(row[0]): + if not newuser.set_loginname(row[0], ignore_blocklist=ignore_blocklist) or not newuser.set_displayname(row[0]): flash("invalid login name, skipped : {}".format(row)) continue if not newuser.set_mail(row[1]): diff --git a/update_translations.sh b/update_translations.sh index c3a80dee35846b29ac14e8768f21beebe51a04e6..69ca86f2b17a5df20a771088eec8787186e36e97 100755 --- a/update_translations.sh +++ b/update_translations.sh @@ -2,6 +2,11 @@ set -e pybabel extract -F uffd/babel.cfg -k lazy_gettext -o messages.pot uffd + +# If you want to initialize a new message, use: +# pybabel init -i messages.pot -d uffd/translations -l fr +# Complete Documentation of Flask-Babel: https://flask-babel.tkte.ch + pybabel update -i messages.pot -d uffd/translations pybabel compile -d uffd/translations