1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-07-08 00:00:49 +02:00

django-constance and traduction

This commit is contained in:
quark
2025-07-06 16:17:13 +02:00
parent c36f8c25a2
commit 883589e08c
3 changed files with 93 additions and 35 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-04 21:47+0200\n" "POT-Creation-Date: 2025-07-06 16:04+0200\n"
"PO-Revision-Date: 2022-04-11 22:05+0200\n" "PO-Revision-Date: 2022-04-11 22:05+0200\n"
"Last-Translator: bleizi <bleizi@crans.org>\n" "Last-Translator: bleizi <bleizi@crans.org>\n"
"Language-Team: French <http://translate.ynerant.fr/projects/nk20/nk20/fr/>\n" "Language-Team: French <http://translate.ynerant.fr/projects/nk20/nk20/fr/>\n"
@ -357,7 +357,7 @@ msgstr "Détails de l'activité"
#: apps/note/models/transactions.py:261 #: apps/note/models/transactions.py:261
#: apps/note/templates/note/transaction_form.html:17 #: apps/note/templates/note/transaction_form.html:17
#: apps/note/templates/note/transaction_form.html:152 #: apps/note/templates/note/transaction_form.html:152
#: note_kfet/templates/base.html:78 #: note_kfet/templates/base.html:79
msgid "Transfer" msgid "Transfer"
msgstr "Virement" msgstr "Virement"
@ -474,7 +474,7 @@ msgstr "Inviter"
msgid "Create new activity" msgid "Create new activity"
msgstr "Créer une nouvelle activité" msgstr "Créer une nouvelle activité"
#: apps/activity/views.py:71 note_kfet/templates/base.html:96 #: apps/activity/views.py:71 note_kfet/templates/base.html:97
msgid "Activities" msgid "Activities"
msgstr "Activités" msgstr "Activités"
@ -598,7 +598,7 @@ msgid "order"
msgstr "consigne" msgstr "consigne"
#: apps/food/models.py:107 apps/food/views.py:34 #: apps/food/models.py:107 apps/food/views.py:34
#: note_kfet/templates/base.html:72 #: note_kfet/templates/base.html:73
msgid "Food" msgid "Food"
msgstr "Bouffe" msgstr "Bouffe"
@ -2178,7 +2178,7 @@ msgstr "Chercher un bouton"
msgid "Update button" msgid "Update button"
msgstr "Modifier le bouton" msgstr "Modifier le bouton"
#: apps/note/views.py:156 note_kfet/templates/base.html:66 #: apps/note/views.py:156 note_kfet/templates/base.html:67
msgid "Consumptions" msgid "Consumptions"
msgstr "Consommations" msgstr "Consommations"
@ -2271,7 +2271,7 @@ msgstr "s'applique au club"
msgid "role permissions" msgid "role permissions"
msgstr "permissions par rôles" msgstr "permissions par rôles"
#: apps/permission/signals.py:74 #: apps/permission/signals.py:75
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"You don't have the permission to change the field {field} on this instance " "You don't have the permission to change the field {field} on this instance "
@ -2280,7 +2280,7 @@ msgstr ""
"Vous n'avez pas la permission de modifier le champ {field} sur l'instance du " "Vous n'avez pas la permission de modifier le champ {field} sur l'instance du "
"modèle {app_label}.{model_name}." "modèle {app_label}.{model_name}."
#: apps/permission/signals.py:84 apps/permission/views.py:104 #: apps/permission/signals.py:85 apps/permission/views.py:104
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"You don't have the permission to add an instance of model {app_label}." "You don't have the permission to add an instance of model {app_label}."
@ -2289,7 +2289,7 @@ msgstr ""
"Vous n'avez pas la permission d'ajouter une instance du modèle {app_label}." "Vous n'avez pas la permission d'ajouter une instance du modèle {app_label}."
"{model_name}." "{model_name}."
#: apps/permission/signals.py:113 #: apps/permission/signals.py:114
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"You don't have the permission to delete this instance of model {app_label}." "You don't have the permission to delete this instance of model {app_label}."
@ -2377,7 +2377,7 @@ msgstr ""
"Vous n'avez pas la permission d'ajouter une instance du modèle « {model} » " "Vous n'avez pas la permission d'ajouter une instance du modèle « {model} » "
"avec ces paramètres. Merci de les corriger et de réessayer." "avec ces paramètres. Merci de les corriger et de réessayer."
#: apps/permission/views.py:111 note_kfet/templates/base.html:120 #: apps/permission/views.py:111 note_kfet/templates/base.html:121
msgid "Rights" msgid "Rights"
msgstr "Droits" msgstr "Droits"
@ -2582,7 +2582,7 @@ msgstr ""
msgid "Invalidate pre-registration" msgid "Invalidate pre-registration"
msgstr "Invalider l'inscription" msgstr "Invalider l'inscription"
#: apps/treasury/apps.py:12 note_kfet/templates/base.html:102 #: apps/treasury/apps.py:12 note_kfet/templates/base.html:103
msgid "Treasury" msgid "Treasury"
msgstr "Trésorerie" msgstr "Trésorerie"
@ -2998,7 +2998,7 @@ msgstr "Gérer les crédits de la Société générale"
#: apps/wei/apps.py:10 apps/wei/models.py:42 apps/wei/models.py:43 #: apps/wei/apps.py:10 apps/wei/models.py:42 apps/wei/models.py:43
#: apps/wei/models.py:67 apps/wei/models.py:192 #: apps/wei/models.py:67 apps/wei/models.py:192
#: note_kfet/templates/base.html:108 #: note_kfet/templates/base.html:109
msgid "WEI" msgid "WEI"
msgstr "WEI" msgstr "WEI"
@ -3753,7 +3753,7 @@ msgstr "données json"
msgid "data in the wrapped and generated by the script generate_wrapped" msgid "data in the wrapped and generated by the script generate_wrapped"
msgstr "donnée dans le wrapped et générée par le script generate_wrapped" msgstr "donnée dans le wrapped et générée par le script generate_wrapped"
#: apps/wrapped/models.py:70 note_kfet/templates/base.html:114 #: apps/wrapped/models.py:70 note_kfet/templates/base.html:115
msgid "Wrapped" msgid "Wrapped"
msgstr "Wrapped" msgstr "Wrapped"
@ -3786,7 +3786,7 @@ msgid "Copy link"
msgstr "Copier le lien" msgstr "Copier le lien"
#: apps/wrapped/templates/wrapped/1/wrapped_base.html:16 #: apps/wrapped/templates/wrapped/1/wrapped_base.html:16
#: note_kfet/templates/base.html:14 #: note_kfet/templates/base.html:15
msgid "The ENS Paris-Saclay BDE note." msgid "The ENS Paris-Saclay BDE note."
msgstr "La note du BDE de l'ENS Paris-Saclay." msgstr "La note du BDE de l'ENS Paris-Saclay."
@ -3908,19 +3908,19 @@ msgstr "Le wrapped est public"
msgid "List of wrapped" msgid "List of wrapped"
msgstr "Liste des wrapped" msgstr "Liste des wrapped"
#: note_kfet/settings/base.py:178 #: note_kfet/settings/base.py:180
msgid "German" msgid "German"
msgstr "Allemand" msgstr "Allemand"
#: note_kfet/settings/base.py:179 #: note_kfet/settings/base.py:181
msgid "English" msgid "English"
msgstr "Anglais" msgstr "Anglais"
#: note_kfet/settings/base.py:180 #: note_kfet/settings/base.py:182
msgid "Spanish" msgid "Spanish"
msgstr "Espagnol" msgstr "Espagnol"
#: note_kfet/settings/base.py:181 #: note_kfet/settings/base.py:183
msgid "French" msgid "French"
msgstr "Français" msgstr "Français"
@ -3981,34 +3981,34 @@ msgstr ""
msgid "Reset" msgid "Reset"
msgstr "Réinitialiser" msgstr "Réinitialiser"
#: note_kfet/templates/base.html:84 #: note_kfet/templates/base.html:85
msgid "Users" msgid "Users"
msgstr "Utilisateur·rices" msgstr "Utilisateur·rices"
#: note_kfet/templates/base.html:90 #: note_kfet/templates/base.html:91
msgid "Clubs" msgid "Clubs"
msgstr "Clubs" msgstr "Clubs"
#: note_kfet/templates/base.html:125 #: note_kfet/templates/base.html:126
msgid "Admin" msgid "Admin"
msgstr "Admin" msgstr "Admin"
#: note_kfet/templates/base.html:139 #: note_kfet/templates/base.html:140
msgid "My account" msgid "My account"
msgstr "Mon compte" msgstr "Mon compte"
#: note_kfet/templates/base.html:144 #: note_kfet/templates/base.html:145
msgid "Log out" msgid "Log out"
msgstr "Se déconnecter" msgstr "Se déconnecter"
#: note_kfet/templates/base.html:153 #: note_kfet/templates/base.html:154
#: note_kfet/templates/registration/signup.html:6 #: note_kfet/templates/registration/signup.html:6
#: note_kfet/templates/registration/signup.html:11 #: note_kfet/templates/registration/signup.html:11
#: note_kfet/templates/registration/signup.html:28 #: note_kfet/templates/registration/signup.html:28
msgid "Sign up" msgid "Sign up"
msgstr "Inscription" msgstr "Inscription"
#: note_kfet/templates/base.html:160 #: note_kfet/templates/base.html:161
#: note_kfet/templates/registration/login.html:6 #: note_kfet/templates/registration/login.html:6
#: note_kfet/templates/registration/login.html:15 #: note_kfet/templates/registration/login.html:15
#: note_kfet/templates/registration/login.html:38 #: note_kfet/templates/registration/login.html:38
@ -4016,7 +4016,7 @@ msgstr "Inscription"
msgid "Log in" msgid "Log in"
msgstr "Se connecter" msgstr "Se connecter"
#: note_kfet/templates/base.html:174 #: note_kfet/templates/base.html:175
msgid "" msgid ""
"You are not a BDE member anymore. Please renew your membership if you want " "You are not a BDE member anymore. Please renew your membership if you want "
"to use the note." "to use the note."
@ -4024,7 +4024,7 @@ msgstr ""
"Vous n'êtes plus adhérent·e BDE. Merci de réadhérer si vous voulez profiter " "Vous n'êtes plus adhérent·e BDE. Merci de réadhérer si vous voulez profiter "
"de la note." "de la note."
#: note_kfet/templates/base.html:180 #: note_kfet/templates/base.html:181
msgid "" msgid ""
"Your e-mail address is not validated. Please check your mail inbox and click " "Your e-mail address is not validated. Please check your mail inbox and click "
"on the validation link." "on the validation link."
@ -4032,7 +4032,7 @@ msgstr ""
"Votre adresse e-mail n'est pas validée. Merci de vérifier votre boîte mail " "Votre adresse e-mail n'est pas validée. Merci de vérifier votre boîte mail "
"et de cliquer sur le lien de validation." "et de cliquer sur le lien de validation."
#: note_kfet/templates/base.html:186 #: note_kfet/templates/base.html:187
msgid "" msgid ""
"You declared that you opened a bank account in the Société générale. The " "You declared that you opened a bank account in the Société générale. The "
"bank did not validate the creation of the account to the BDE, so the " "bank did not validate the creation of the account to the BDE, so the "
@ -4046,30 +4046,38 @@ msgstr ""
"vérification peut durer quelques jours. Merci de vous assurer de bien aller " "vérification peut durer quelques jours. Merci de vous assurer de bien aller "
"au bout de vos démarches." "au bout de vos démarches."
#: note_kfet/templates/base.html:209 #: note_kfet/templates/base.html:214
msgid "Contact us" msgid "Contact us"
msgstr "Nous contacter" msgstr "Nous contacter"
#: note_kfet/templates/base.html:211 #: note_kfet/templates/base.html:216
msgid "Technical Support" msgid "Technical Support"
msgstr "Support technique" msgstr "Support technique"
#: note_kfet/templates/base.html:213 #: note_kfet/templates/base.html:218
msgid "Charte Info (FR)" msgid "Charte Info (FR)"
msgstr "Charte Info (FR)" msgstr "Charte Info (FR)"
#: note_kfet/templates/base.html:215 #: note_kfet/templates/base.html:220
msgid "FAQ (FR)" msgid "FAQ (FR)"
msgstr "FAQ (FR)" msgstr "FAQ (FR)"
#: note_kfet/templates/base.html:217 #: note_kfet/templates/base.html:222
msgid "Managed by BDE" msgid "Managed by BDE"
msgstr "Gérer par le BDE" msgstr "Gérer par le BDE"
#: note_kfet/templates/base.html:219 #: note_kfet/templates/base.html:224
msgid "Hosted by Cr@ns" msgid "Hosted by Cr@ns"
msgstr "Hébergé par le Cr@ans" msgstr "Hébergé par le Cr@ans"
#: note_kfet/templates/base.html:266
msgid "The note is not available for now"
msgstr "La note est indisponible pour le moment"
#: note_kfet/templates/base.html:268
msgid "Thank you for your understanding -- The Respos Info of BDE"
msgstr "Merci de votre compréhension -- Les Respos Info du BDE"
#: note_kfet/templates/base_search.html:15 #: note_kfet/templates/base_search.html:15
msgid "Search by attribute such as name..." msgid "Search by attribute such as name..."
msgstr "Chercher par un attribut tel que le nom..." msgstr "Chercher par un attribut tel que le nom..."
@ -4078,6 +4086,41 @@ msgstr "Chercher par un attribut tel que le nom..."
msgid "There is no results." msgid "There is no results."
msgstr "Il n'y a pas de résultat." msgstr "Il n'y a pas de résultat."
#: note_kfet/templates/cas/logged.html:8
msgid ""
"<h3>Log In Successful</h3>You have successfully logged into the Central "
"Authentication Service.<br/>For security reasons, please Log Out and Exit "
"your web browser when you are done accessing services that require "
"authentication!"
msgstr ""
"<h3>Connection réussie</h3>Vous vous êtes bien connecté au Service Central d'Authentification."
"<br/>Pour des raisons de sécurité, veuillez vous déconnecter et fermer votre navigateur internet "
"une fois que vous aurez fini d'accéder aux services qui requiert une authentification !"
#: note_kfet/templates/cas/logged.html:14
msgid "Log me out from all my sessions"
msgstr "Me déconnecter de toutes mes sessions"
#: note_kfet/templates/cas/logged.html:20
msgid "Forget the identity provider"
msgstr "Oublier le fournisseur d'identité"
#: note_kfet/templates/cas/logged.html:24
msgid "Logout"
msgstr "Déconnexion"
#: note_kfet/templates/cas/login.html:11
msgid "Please log in"
msgstr "Veuillez vous connecter"
#: note_kfet/templates/cas/login.html:23
msgid "Login"
msgstr "Connexion"
#: note_kfet/templates/cas/warn.html:14
msgid "Connect to the service"
msgstr "Connexion au service"
#: note_kfet/templates/oauth2_provider/application_confirm_delete.html:8 #: note_kfet/templates/oauth2_provider/application_confirm_delete.html:8
msgid "Are you sure to delete the application" msgid "Are you sure to delete the application"
msgstr "Êtes-vous sûr⋅e de vouloir supprimer l'application" msgstr "Êtes-vous sûr⋅e de vouloir supprimer l'application"

View File

@ -327,9 +327,12 @@ CONSTANCE_ADDITIONAL_FIELDS = {
} }
CONSTANCE_CONFIG = { CONSTANCE_CONFIG = {
'BANNER_MESSAGE': ('', 'Some message', str), 'BANNER_MESSAGE': ('', 'Some message', str),
'BANNER_TYPE': ('Info', 'Banner type', 'banner_type'), 'BANNER_TYPE': ('info', 'Banner type', 'banner_type'),
'MAINTENANCE': (False, 'check for mainteance mode', bool),
'MAINTENANCE_MESSAGE': ('', 'Some maintenance message', str),
} }
CONSTANCE_CONFIG_FIELDSETS = { CONSTANCE_CONFIG_FIELDSETS = {
'Maintenance': ('MAINTENANCE_MESSAGE', 'MAINTENANCE'),
'Banner': ('BANNER_MESSAGE', 'BANNER_TYPE'), 'Banner': ('BANNER_MESSAGE', 'BANNER_TYPE'),
} }
CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend' CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'

View File

@ -5,6 +5,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<!DOCTYPE html> <!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %} {% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
<html lang="{{ LANGUAGE_CODE|default:"en" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %} class="position-relative h-100"> <html lang="{{ LANGUAGE_CODE|default:"en" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %} class="position-relative h-100">
{% if not config.MAINTENANCE %}
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@ -191,7 +192,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% endblocktrans %} {% endblocktrans %}
</div> </div>
{% endif %} {% endif %}
{% if config.BANNER_MESSAGE %} {% if config.BANNER_MESSAGE and user.is_authenticated %}
<div class="alert alert-{{ config.BANNER_TYPE }}"> <div class="alert alert-{{ config.BANNER_TYPE }}">
{{ config.BANNER_MESSAGE }} {{ config.BANNER_MESSAGE }}
</div> </div>
@ -257,4 +258,15 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% block extrajavascript %}{% endblock %} {% block extrajavascript %}{% endblock %}
</body> </body>
{% endif %}
{% if config.MAINTENANCE %}
<body>
<div style="text-align:center">
<br />
{% trans "The note is not available for now" %}<br /><br />
{{ config.MAINTENANCE_MESSAGE }}<br /><br />
{% trans "Thank you for your understanding -- The Respos Info of BDE" %}
</div>
</body>
{% endif %}
</html> </html>