feat(i18n): francais comme langue principale, anglais accessible
Le site s'affiche desormais en francais par defaut, avec un selecteur de langue permettant de basculer vers l'anglais. Choix de conception : les chaines sources restent en anglais Elles servent d'identifiants gettext, et le francais est fourni par catalogue avec BABEL_DEFAULT_LOCALE = 'fr'. Le code reste ainsi dans une seule langue -- la meme que ses commentaires et docstrings -- tandis que ce qu'un membre voit est du francais. Consequence qui rend la migration praticable : une chaine non encore traduite retombe en anglais, pas sur un identifiant brut. Les gabarits peuvent donc etre migres un par un sans jamais laisser le site a moitie casse. Selection de la langue (app/i18n.py) 1. choix explicite via le selecteur, garde en session 2. sinon en-tete Accept-Language du navigateur, restreint a fr et en 3. sinon francais Un choix explicite prime toujours, y compris sur un navigateur anglophone. Selecteur Extrait en partiel et inclus dans les deux branches de la mise en page : barre laterale une fois connecte, ET page d'authentification. Quelqu'un qui ne lit pas la langue courante doit pouvoir en changer AVANT de se connecter -- le laisser derriere l'authentification aurait ete un defaut d'accessibilite. Chaque langue est ecrite dans sa propre langue. La route /lang/<locale> valide le Referer avant de rediriger : sans ce controle, elle constituait une redirection ouverte. Migre dans cette passe navigation complete, page de connexion, les cinq pages d'erreur, et l'integralite des messages flash de routes/auth.py. 64 chaines, dont aucune non traduite. Verification 25 tests, dont deux garde-fous d'integrite : un catalogue .mo manquant ou une entree non traduite font echouer la suite. Sans cela, une compilation oubliee servirait de l'anglais partout, en silence et sans rien dans les journaux. Un test existant a du etre corrige, et c'est instructif test_login_failure_message_does_not_reveal_account_existence cherchait la sous-chaine anglaise 'attempt(s) remaining'. La page etant desormais en francais, elle etait absente des deux cotes, l'assertion passait, et le mode strict a signale le faux succes. Le test comparait donc l'anglais, pas le comportement. Il compare desormais les messages flash rendus, quelle que soit la langue. La faille SEC-AUTH-006 reste ouverte, et le test la documente toujours. Les catalogues .po ET .mo sont versionnes : le deploiement est un simple miroir de fichiers, sans etape de compilation. messages.pot, regenerable, ne l'est pas. docs/translations.md documente le processus, les deux pieges (concatenation de phrases, traduction a l'import), et l'etat de la migration. A noter pour la suite : les chaines dans les blocs <script> ne peuvent pas etre balisees telles quelles, il faudra les passer par des attributs data- -- ce qui rejoint le chantier de sortie de unsafe-inline (OPS-010). Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,306 @@
|
||||
# French translations for team-tryouts.
|
||||
# Copyright (C) 2026 UdeS Esports
|
||||
# This file is distributed under the same license as the team-tryouts
|
||||
# project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2026.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: team-tryouts VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2026-08-07 20:25-0400\n"
|
||||
"PO-Revision-Date: 2026-08-07 20:22-0400\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: fr\n"
|
||||
"Language-Team: UdeS Esports\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.18.0\n"
|
||||
|
||||
#: app/routes/auth.py:141
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Account is locked due to too many failed attempts. Please try again in %(remaining)s "
|
||||
"minute(s)."
|
||||
msgstr ""
|
||||
"Compte verrouillé après trop de tentatives échouées. Réessayez dans %(remaining)s "
|
||||
"minute(s)."
|
||||
|
||||
#: app/routes/auth.py:151
|
||||
msgid "This account has been deactivated."
|
||||
msgstr "Ce compte a été désactivé."
|
||||
|
||||
#: app/routes/auth.py:179
|
||||
#, python-format
|
||||
msgid "Welcome back, %(username)s!"
|
||||
msgstr "Bon retour, %(username)s !"
|
||||
|
||||
#: app/routes/auth.py:192
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Account locked after %(attempts)s failed attempts. Please try again in %(minutes)s "
|
||||
"minutes."
|
||||
msgstr ""
|
||||
"Compte verrouillé après %(attempts)s tentatives échouées. Réessayez dans %(minutes)s "
|
||||
"minutes."
|
||||
|
||||
#: app/routes/auth.py:201
|
||||
#, python-format
|
||||
msgid "Login unsuccessful. %(remaining)s attempt(s) remaining before lockout."
|
||||
msgstr "Échec de la connexion. Il reste %(remaining)s tentative(s) avant le verrouillage."
|
||||
|
||||
#: app/routes/auth.py:208
|
||||
msgid "Login unsuccessful. Please check username and password."
|
||||
msgstr "Échec de la connexion. Vérifiez le nom d'utilisateur et le mot de passe."
|
||||
|
||||
#: app/routes/auth.py:239
|
||||
msgid "Incorrect CAPTCHA answer. Please try again."
|
||||
msgstr "Réponse au CAPTCHA incorrecte. Veuillez réessayer."
|
||||
|
||||
#: app/routes/auth.py:281
|
||||
msgid "Username already exists."
|
||||
msgstr "Ce nom d'utilisateur est déjà pris."
|
||||
|
||||
#: app/routes/auth.py:293
|
||||
msgid "Email already registered."
|
||||
msgstr "Cette adresse courriel est déjà enregistrée."
|
||||
|
||||
#: app/routes/auth.py:339
|
||||
msgid "Your account has been created! You can now log in."
|
||||
msgstr "Votre compte a été créé. Vous pouvez maintenant vous connecter."
|
||||
|
||||
#: app/routes/auth.py:365
|
||||
msgid "Discord OAuth2 is not configured."
|
||||
msgstr "La connexion Discord n'est pas configurée."
|
||||
|
||||
#: app/routes/auth.py:405
|
||||
msgid ""
|
||||
"Discord authorization could not be verified. Please start the connection again from "
|
||||
"this page."
|
||||
msgstr ""
|
||||
"L'autorisation Discord n'a pas pu être vérifiée. Relancez la connexion depuis cette "
|
||||
"page."
|
||||
|
||||
#: app/routes/auth.py:413
|
||||
msgid "Discord authorization failed. No code received."
|
||||
msgstr "L'autorisation Discord a échoué : aucun code reçu."
|
||||
|
||||
#: app/routes/auth.py:437
|
||||
msgid "Failed to connect to Discord. Please try again."
|
||||
msgstr "Impossible de joindre Discord. Veuillez réessayer."
|
||||
|
||||
#: app/routes/auth.py:441
|
||||
msgid "Failed to obtain Discord access token."
|
||||
msgstr "Impossible d'obtenir le jeton d'accès Discord."
|
||||
|
||||
#: app/routes/auth.py:456
|
||||
msgid "Failed to fetch Discord user profile."
|
||||
msgstr "Impossible de récupérer le profil Discord."
|
||||
|
||||
#: app/routes/auth.py:503
|
||||
msgid "Discord account connected! Your profile has been pre-filled."
|
||||
msgstr "Compte Discord connecté. Votre profil a été pré-rempli."
|
||||
|
||||
#: app/routes/auth.py:521
|
||||
msgid "You have been logged out."
|
||||
msgstr "Vous avez été déconnecté."
|
||||
|
||||
#: app/templates/errors/400.html:2
|
||||
msgid "400 Bad Request"
|
||||
msgstr "400 Requête incorrecte"
|
||||
|
||||
#: app/templates/errors/400.html:3
|
||||
msgid "Bad Request"
|
||||
msgstr "Requête incorrecte"
|
||||
|
||||
#: app/templates/errors/400.html:9
|
||||
msgid "400 — Bad Request"
|
||||
msgstr "400 — Requête incorrecte"
|
||||
|
||||
#: app/templates/errors/400.html:10
|
||||
msgid ""
|
||||
"The request could not be understood by the server. Please check your input and try "
|
||||
"again."
|
||||
msgstr "Le serveur n'a pas pu interpréter la requête. Vérifiez votre saisie et réessayez."
|
||||
|
||||
#: app/templates/errors/400.html:12 app/templates/errors/403.html:12
|
||||
#: app/templates/errors/429.html:12
|
||||
msgid "Go Back"
|
||||
msgstr "Retour"
|
||||
|
||||
#: app/templates/errors/403.html:2
|
||||
msgid "403 Forbidden"
|
||||
msgstr "403 Accès refusé"
|
||||
|
||||
#: app/templates/errors/403.html:3
|
||||
msgid "Access Denied"
|
||||
msgstr "Accès refusé"
|
||||
|
||||
#: app/templates/errors/403.html:9
|
||||
msgid "403 — Forbidden"
|
||||
msgstr "403 — Accès refusé"
|
||||
|
||||
#: app/templates/errors/403.html:10
|
||||
msgid ""
|
||||
"You do not have permission to access this resource. If you believe this is an error, "
|
||||
"please contact an administrator."
|
||||
msgstr ""
|
||||
"Vous n'avez pas les droits d'accès à cette ressource. Si vous pensez qu'il s'agit "
|
||||
"d'une erreur, contactez un administrateur."
|
||||
|
||||
#: app/templates/errors/404.html:2
|
||||
msgid "404 Not Found"
|
||||
msgstr "404 Page introuvable"
|
||||
|
||||
#: app/templates/errors/404.html:3
|
||||
msgid "Page Not Found"
|
||||
msgstr "Page introuvable"
|
||||
|
||||
#: app/templates/errors/404.html:9
|
||||
msgid "404 — Not Found"
|
||||
msgstr "404 — Page introuvable"
|
||||
|
||||
#: app/templates/errors/404.html:10
|
||||
msgid "The page you are looking for does not exist. It may have been moved or deleted."
|
||||
msgstr "La page demandée n'existe pas. Elle a peut-être été déplacée ou supprimée."
|
||||
|
||||
#: app/templates/errors/404.html:12
|
||||
msgid "Return Home"
|
||||
msgstr "Retour à l'accueil"
|
||||
|
||||
#: app/templates/errors/429.html:2
|
||||
msgid "429 Too Many Requests"
|
||||
msgstr "429 Trop de requêtes"
|
||||
|
||||
#: app/templates/errors/429.html:3
|
||||
msgid "Rate Limit Exceeded"
|
||||
msgstr "Limite de requêtes atteinte"
|
||||
|
||||
#: app/templates/errors/429.html:9
|
||||
msgid "429 — Too Many Requests"
|
||||
msgstr "429 — Trop de requêtes"
|
||||
|
||||
#: app/templates/errors/429.html:10
|
||||
msgid "You have sent too many requests in a short period. Please wait a moment and try again."
|
||||
msgstr ""
|
||||
"Vous avez envoyé trop de requêtes en peu de temps. Patientez un instant puis "
|
||||
"réessayez."
|
||||
|
||||
#: app/templates/errors/500.html:2
|
||||
msgid "500 Server Error"
|
||||
msgstr "500 Erreur du serveur"
|
||||
|
||||
#: app/templates/errors/500.html:3
|
||||
msgid "Internal Server Error"
|
||||
msgstr "Erreur interne du serveur"
|
||||
|
||||
#: app/templates/errors/500.html:9
|
||||
msgid "500 — Internal Server Error"
|
||||
msgstr "500 — Erreur interne du serveur"
|
||||
|
||||
#: app/templates/errors/500.html:10
|
||||
msgid ""
|
||||
"Something went wrong on our end. The error has been logged and will be investigated. "
|
||||
"Please try again later."
|
||||
msgstr ""
|
||||
"Une erreur est survenue de notre côté. Elle a été journalisée et sera examinée. "
|
||||
"Veuillez réessayer dans un instant."
|
||||
|
||||
#: app/templates/errors/500.html:12
|
||||
msgid "Try Again"
|
||||
msgstr "Réessayer"
|
||||
|
||||
#: app/templates/layouts/_language_switcher.html:10
|
||||
msgid "Language"
|
||||
msgstr "Langue"
|
||||
|
||||
#: app/templates/layouts/base.html:33 app/templates/layouts/base.html:133
|
||||
msgid "Dashboard"
|
||||
msgstr "Tableau de bord"
|
||||
|
||||
#: app/templates/layouts/base.html:39
|
||||
msgid "Tryouts"
|
||||
msgstr "Sélections"
|
||||
|
||||
#: app/templates/layouts/base.html:45
|
||||
msgid "Calendar"
|
||||
msgstr "Calendrier"
|
||||
|
||||
#: app/templates/layouts/base.html:52
|
||||
msgid "Evaluations"
|
||||
msgstr "Évaluations"
|
||||
|
||||
#: app/templates/layouts/base.html:60
|
||||
msgid "My Team(s)"
|
||||
msgstr "Mon ou mes équipes"
|
||||
|
||||
#: app/templates/layouts/base.html:67
|
||||
msgid "Manage Teams"
|
||||
msgstr "Gestion des équipes"
|
||||
|
||||
#: app/templates/layouts/base.html:75
|
||||
msgid "Manage Users"
|
||||
msgstr "Gestion des utilisateurs"
|
||||
|
||||
#: app/templates/layouts/base.html:83
|
||||
msgid "My Notes"
|
||||
msgstr "Mes notes"
|
||||
|
||||
#: app/templates/layouts/base.html:91
|
||||
msgid "Availability"
|
||||
msgstr "Disponibilités"
|
||||
|
||||
#: app/templates/layouts/base.html:97
|
||||
msgid "Notes & One on One"
|
||||
msgstr "Notes et rencontres individuelles"
|
||||
|
||||
#: app/templates/layouts/base.html:104
|
||||
msgid "Contracts"
|
||||
msgstr "Contrats"
|
||||
|
||||
#: app/templates/layouts/base.html:111
|
||||
msgid "My Profile"
|
||||
msgstr "Mon profil"
|
||||
|
||||
#: app/templates/layouts/base.html:117
|
||||
msgid "Logout"
|
||||
msgstr "Déconnexion"
|
||||
|
||||
#: app/templates/layouts/base.html:175
|
||||
msgid "Team Tryout Management System"
|
||||
msgstr "Système de gestion des sélections d'équipe"
|
||||
|
||||
#: app/templates/pages/login.html:2
|
||||
msgid "Login"
|
||||
msgstr "Connexion"
|
||||
|
||||
#: app/templates/pages/login.html:7
|
||||
msgid "Username"
|
||||
msgstr "Nom d'utilisateur"
|
||||
|
||||
#: app/templates/pages/login.html:8
|
||||
msgid "Enter your username"
|
||||
msgstr "Saisissez votre nom d'utilisateur"
|
||||
|
||||
#: app/templates/pages/login.html:11
|
||||
msgid "Password"
|
||||
msgstr "Mot de passe"
|
||||
|
||||
#: app/templates/pages/login.html:12
|
||||
msgid "Enter your password"
|
||||
msgstr "Saisissez votre mot de passe"
|
||||
|
||||
#: app/templates/pages/login.html:14
|
||||
msgid "Sign In"
|
||||
msgstr "Se connecter"
|
||||
|
||||
#: app/templates/pages/login.html:15
|
||||
msgid "Don't have an account?"
|
||||
msgstr "Vous n'avez pas de compte ?"
|
||||
|
||||
#: app/templates/pages/login.html:15
|
||||
msgid "Register here"
|
||||
msgstr "Inscrivez-vous ici"
|
||||
|
||||
Reference in New Issue
Block a user