feat(i18n): Add an english translation
This commit is contained in:
parent
997fd254ca
commit
45bd436ea7
8 changed files with 348 additions and 29 deletions
|
@ -48,8 +48,9 @@ in
|
|||
name = "dgsi.dev";
|
||||
|
||||
packages = [
|
||||
pkgs.jq
|
||||
pkgs.dart-sass
|
||||
pkgs.gettext
|
||||
pkgs.jq
|
||||
|
||||
# Python dependencies
|
||||
(python.withPackages (ps: [
|
||||
|
|
|
@ -55,6 +55,7 @@ INSTALLED_APPS = [
|
|||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.locale.LocaleMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
|
@ -187,9 +188,18 @@ AUTH_USER_MODEL = "dgsi.User"
|
|||
# Internationalization configuration
|
||||
# -> https://docs.djangoproject.com/en/4.2/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = "fr-fr"
|
||||
LANGUAGE_CODE = "fr"
|
||||
|
||||
TIME_ZONE = "UTC"
|
||||
LANGUAGES = [
|
||||
("en", "English"),
|
||||
("fr", "Français"),
|
||||
]
|
||||
|
||||
LOCALE_PATHS = [
|
||||
(BASE_DIR / "shared" / "locale"),
|
||||
]
|
||||
|
||||
TIME_ZONE = "Europe/Paris"
|
||||
|
||||
USE_I18N = True
|
||||
USE_TZ = True
|
||||
|
|
|
@ -24,6 +24,7 @@ urlpatterns = [
|
|||
path("", include("dgsi.urls")),
|
||||
path("accounts/", include("allauth.urls")),
|
||||
path("admin/", admin.site.urls),
|
||||
path("i18n/", include("django.conf.urls.i18n")),
|
||||
path("__reload__/", include("django_browser_reload.urls")),
|
||||
]
|
||||
|
||||
|
|
BIN
src/shared/locale/en/LC_MESSAGES/django.mo
Normal file
BIN
src/shared/locale/en/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
269
src/shared/locale/en/LC_MESSAGES/django.po
Normal file
269
src/shared/locale/en/LC_MESSAGES/django.po
Normal file
|
@ -0,0 +1,269 @@
|
|||
# DG·SI english translation
|
||||
# Copyright (C) 2024 DGNum
|
||||
# This file is distributed under the same license as the dgsi package.
|
||||
# Tom Hubrecht <tom.hubrecht@dgnum.eu>, 2024.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: dgsi.dgnum.eu\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-09-26 22:48+0200\n"
|
||||
"PO-Revision-Date: 2024-09-26 22:49+0200\n"
|
||||
"Last-Translator: Tom Hubrecht <tom.hubrecht@dgnum.eu>\n"
|
||||
"Language-Team: French\n"
|
||||
"Language: fr\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"
|
||||
"X-Generator: Gtranslator 46.1\n"
|
||||
|
||||
#: app/settings.py:276
|
||||
msgid "Administration de DGSI"
|
||||
msgstr "DGSI Administration"
|
||||
|
||||
#: dgsi/forms.py:16
|
||||
msgid "Identifiant déjà présent dans la base de données."
|
||||
msgstr "Username already in the database."
|
||||
|
||||
#: dgsi/forms.py:22
|
||||
msgid "Identifiant"
|
||||
msgstr "Username"
|
||||
|
||||
#: dgsi/forms.py:23
|
||||
msgid "De préférence identique au login ENS de la personne concernée"
|
||||
msgstr "Preferably identical to the ENS login of the person concerned"
|
||||
|
||||
#: dgsi/forms.py:26 dgsi/forms.py:39
|
||||
msgid "Nom d'usage"
|
||||
msgstr "Name in use"
|
||||
|
||||
#: dgsi/forms.py:28 dgsi/forms.py:41
|
||||
msgid "Adresse e-mail"
|
||||
msgstr "E-mail address"
|
||||
|
||||
#: dgsi/forms.py:29 dgsi/forms.py:42
|
||||
msgid "De préférence l'adresse '@ens.psl.eu'"
|
||||
msgstr "Preferably the ‘@ens.psl.eu’ address"
|
||||
|
||||
#: dgsi/forms.py:32
|
||||
msgid "Membre actif"
|
||||
msgstr "Active member"
|
||||
|
||||
#: dgsi/forms.py:33
|
||||
msgid "Si selectionné, la personne sera ajoutée au groupe dgnum_members"
|
||||
msgstr "If selected, the person will be added to the dgnum_members group."
|
||||
|
||||
#: dgsi/models.py:22
|
||||
msgid "Nom du service proposé"
|
||||
msgstr "Name of the proposed service"
|
||||
|
||||
#: dgsi/models.py:23
|
||||
msgid "Adresse du service"
|
||||
msgstr "Address of the service"
|
||||
|
||||
#: dgsi/models.py:24
|
||||
msgid "Icône du service"
|
||||
msgstr "Icon of the service"
|
||||
|
||||
#: dgsi/models.py:34
|
||||
msgid "Date du document"
|
||||
msgstr "Document date"
|
||||
|
||||
#: dgsi/models.py:35
|
||||
msgid "Nom du document"
|
||||
msgstr "Document name"
|
||||
|
||||
#: dgsi/models.py:36
|
||||
msgid "Fichier PDF"
|
||||
msgstr "PDF file"
|
||||
|
||||
#: dgsi/models.py:58 dgsi/models.py:59
|
||||
#: dgsi/templates/dgsi/legal_documents.html:26
|
||||
msgid "Statuts"
|
||||
msgstr "Statutes"
|
||||
|
||||
#: dgsi/models.py:71 dgsi/templates/dgsi/legal_documents.html:30
|
||||
msgid "Règlement Intérieur"
|
||||
msgstr "Bylaws"
|
||||
|
||||
#: dgsi/models.py:72
|
||||
msgid "Règlements Intérieurs"
|
||||
msgstr "Bylaws"
|
||||
|
||||
#: dgsi/models.py:114
|
||||
msgid "Correspondance de login"
|
||||
msgstr "Login mapping"
|
||||
|
||||
#: dgsi/models.py:115
|
||||
msgid "Correspondances de login"
|
||||
msgstr "Login mappings"
|
||||
|
||||
#: dgsi/templates/_legal_document.html:9
|
||||
msgid ""
|
||||
" En acceptant, vous assurez avoir lu ce document et en approuver le contenu."
|
||||
msgstr ""
|
||||
" By accepting, you confirm that you have read this document and agree with "
|
||||
"its content."
|
||||
|
||||
#: dgsi/templates/_legal_document.html:15
|
||||
msgid "Accepté"
|
||||
msgstr "Accepted"
|
||||
|
||||
#: dgsi/templates/dgsi/create_kanidm_account.html:6
|
||||
msgid "Création de compte Kanidm"
|
||||
msgstr "Kanidm account creation"
|
||||
|
||||
#: dgsi/templates/dgsi/create_kanidm_account.html:14
|
||||
#: dgsi/templates/dgsi/create_self_account.html:14
|
||||
msgid "Enregistrer"
|
||||
msgstr "Save"
|
||||
|
||||
#: dgsi/templates/dgsi/create_self_account.html:6
|
||||
msgid "Création d'un compte DGNum"
|
||||
msgstr "DGNum account creation"
|
||||
|
||||
#: dgsi/templates/dgsi/legal_documents.html:12
|
||||
msgid ""
|
||||
"Vous devez accepter les Statuts et le Règlement Intérieur de la DGNum avant "
|
||||
"de pouvoir créer un compte."
|
||||
msgstr ""
|
||||
"You must accept the DGNum Statutes and Bylaws before you can create an "
|
||||
"account."
|
||||
|
||||
#: dgsi/templates/dgsi/legal_documents.html:16
|
||||
msgid ""
|
||||
"Vous n'avez pas encore de compte DGNum, mais vous pouvez désormais en créer "
|
||||
"un."
|
||||
msgstr "You do not yet have a DGNum account, but you can now create one."
|
||||
|
||||
#: dgsi/templates/dgsi/legal_documents.html:19
|
||||
msgid "Poursuivre la création d'un compte DGNum"
|
||||
msgstr "Continue the creation of a DGNum account"
|
||||
|
||||
#: dgsi/templates/dgsi/legal_documents.html:26
|
||||
msgid "Accepter les statuts"
|
||||
msgstr "Accept the statutes"
|
||||
|
||||
#: dgsi/templates/dgsi/legal_documents.html:30
|
||||
msgid "Accepter le règlement intérieur"
|
||||
msgstr "Accept the bylaws"
|
||||
|
||||
#: dgsi/templates/dgsi/profile.html:7
|
||||
#, python-format
|
||||
msgid "Profil de %(displayname)s"
|
||||
msgstr "Profile of %(displayname)s"
|
||||
|
||||
#: dgsi/templates/dgsi/profile.html:13
|
||||
msgid "Mot de passe WiFi :"
|
||||
msgstr "WiFi password:"
|
||||
|
||||
#: dgsi/templates/dgsi/profile.html:23
|
||||
msgid "Adresse e-mail :"
|
||||
msgstr "E-mail address:"
|
||||
|
||||
#: dgsi/templates/dgsi/profile.html:28
|
||||
msgid "Informations techniques"
|
||||
msgstr "Technical informations"
|
||||
|
||||
#: dgsi/templates/dgsi/profile.html:31
|
||||
msgid "Identifiant unique :"
|
||||
msgstr "Unique identifier:"
|
||||
|
||||
#: dgsi/templates/dgsi/profile.html:40
|
||||
msgid "Membre des groupes suivants :"
|
||||
msgstr "Member of the following groups:"
|
||||
|
||||
#: dgsi/templates/dgsi/profile.html:51
|
||||
msgid "Pas de compte DGNum répertorié."
|
||||
msgstr "No DGNum account found."
|
||||
|
||||
#: dgsi/templates/dgsi/profile.html:54
|
||||
msgid "Créer un compte DGNum"
|
||||
msgstr "Create a DGNum account"
|
||||
|
||||
#: dgsi/templates/dgsi/service_list.html:6
|
||||
msgid "Services accessibles via la DGNum"
|
||||
msgstr "Services accessible via the DGNum"
|
||||
|
||||
#: dgsi/views.py:30
|
||||
msgid "Mon profil"
|
||||
msgstr "My profile"
|
||||
|
||||
#: dgsi/views.py:31
|
||||
msgid "Documents Légaux"
|
||||
msgstr "Legal Documents"
|
||||
|
||||
#: dgsi/views.py:35
|
||||
msgid "Services proposés par la DGNum"
|
||||
msgstr "Services offered by the DGNum"
|
||||
|
||||
#: dgsi/views.py:44
|
||||
msgid "Créer un nouveau compte Kanidm"
|
||||
msgstr "Create a new Kanidm account"
|
||||
|
||||
#: dgsi/views.py:48
|
||||
msgid "Interface d'administration"
|
||||
msgstr "Administration interface"
|
||||
|
||||
#: dgsi/views.py:83
|
||||
msgid "Compte DGNum créé avec succès"
|
||||
msgstr "DGNum account successfully created"
|
||||
|
||||
#: dgsi/views.py:99
|
||||
msgid "<b>Vous possédez déjà un compte DGNum !</b>"
|
||||
msgstr "<b>You already have a DGNum account!</b>"
|
||||
|
||||
#: dgsi/views.py:111
|
||||
msgid "Vous devez accepter les Statuts et le Règlement Intérieur."
|
||||
msgstr "You must accept the Statutes and the Bylaws."
|
||||
|
||||
#: dgsi/views.py:190
|
||||
#, python-format
|
||||
msgid "Type de document invalide : %(kind)s"
|
||||
msgstr "Invalid document type: %(kind)s"
|
||||
|
||||
#: dgsi/views.py:220
|
||||
#, python-format
|
||||
msgid "Compte DGNum pour %(displayname)s [%(name)s] créé."
|
||||
msgstr "DGNum account for %(displayname)s [%(name)s] created."
|
||||
|
||||
#: shared/account.py:37
|
||||
msgid "Catégorie de compte ENS interdite."
|
||||
msgstr "ENS account category not permitted."
|
||||
|
||||
#: shared/account.py:53
|
||||
msgid "Méthode de connexion invalide."
|
||||
msgstr "Invalid connection method."
|
||||
|
||||
#: shared/templates/_footer.html:4
|
||||
msgid ""
|
||||
"Logiciel développé pour et par la <a href=\"https://dgnum.eu\">DGNum</a>."
|
||||
msgstr ""
|
||||
"Software developed for and by the <a href=‘https://dgnum.eu’>DGNum</a>."
|
||||
|
||||
#: shared/templates/_hero.html:18
|
||||
msgid "Déconnexion"
|
||||
msgstr "Logout"
|
||||
|
||||
#: shared/templates/_hero.html:27
|
||||
msgid "Connexion"
|
||||
msgstr "Login"
|
||||
|
||||
#: shared/templates/_hero.html:41
|
||||
msgid "Choix de la langue"
|
||||
msgstr "Language selection"
|
||||
|
||||
#: shared/templates/accounts/forbidden_category.html:6
|
||||
msgid "Connexion impossible"
|
||||
msgstr "Unable to connect"
|
||||
|
||||
#: shared/templates/accounts/forbidden_category.html:10
|
||||
msgid ""
|
||||
"Vos informations ne permettent pas de vous identifier auprès de la DGNum."
|
||||
"<br>Si vous pensez qu'il s'agit une erreur, merci de nous contacter à "
|
||||
"l'adresse : <a href=\"mailto:contact@dgnum.eu\">contact@dgnum.eu</a>"
|
||||
msgstr ""
|
||||
"Your details do not allow the DGNum to authenticate you.<br>If you think "
|
||||
"this is a mistake, please contact us at: <a href=\"mailto:contact@dgnum."
|
||||
"eu\">contact@dgnum.eu</a>"
|
6
src/shared/static/bulma/bulma.scss
vendored
6
src/shared/static/bulma/bulma.scss
vendored
|
@ -62,3 +62,9 @@ body {
|
|||
.notification {
|
||||
margin-bottom: var(--bulma-block-spacing);
|
||||
}
|
||||
|
||||
.dropdown.is-fullwidth,
|
||||
.dropdown.is-fullwidth > .dropdown-trigger,
|
||||
.dropdown.is-fullwidth > .dropdown-menu {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load django_browser_reload %}
|
||||
{% load i18n django_browser_reload %}
|
||||
|
||||
<footer class="footer has-text-centered">
|
||||
<b>Logiciel développé pour et par la <a href="https://dgnum.eu">DGNum</a>.</b>
|
||||
<b>{%blocktrans %}Logiciel développé pour et par la <a href="https://dgnum.eu">DGNum</a>.{% endblocktrans %}</b>
|
||||
{% django_browser_reload_script %}
|
||||
</footer>
|
||||
|
|
|
@ -1,35 +1,67 @@
|
|||
{% load i18n %}
|
||||
|
||||
<section class="hero is-dark is-primary">
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<div class="grid has-3-cols">
|
||||
<div class="cell is-col-span-2">
|
||||
<h1 class="title">
|
||||
<a href="{% url 'dgsi:dgn-index' %}" class="has-text-dark">Dossier Général des Services Informagiques</a>
|
||||
</h1>
|
||||
<h2 class="subtitle mt-2">Système d'information de la DGNum</h2>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="hero-body px-0">
|
||||
<div class="columns mx-6">
|
||||
<div class="column is-three-quarters">
|
||||
<h1 class="title">
|
||||
<a href="{% url 'dgsi:dgn-index' %}" class="has-text-dark">Dossier Général des Services Informagiques</a>
|
||||
</h1>
|
||||
<h2 class="subtitle mt-2">Système d'information de la DGNum</h2>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="buttons mt-5">
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'account_logout' %}" class="button is-light is-pulled-right">
|
||||
<span>
|
||||
<span>{% trans "Déconnexion" %}</span>
|
||||
<span class="icon">
|
||||
<i class="ti ti-door-exit"></i>
|
||||
<a href="{% url 'account_logout' %}"
|
||||
class="button is-light is-fullwidth">
|
||||
<span>
|
||||
<span>{% trans "Déconnexion" %}</span>
|
||||
<span class="icon">
|
||||
<i class="ti ti-door-exit"></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'account_login' %}" class="button is-light is-pulled-right">
|
||||
<span>
|
||||
<span>{% trans "Connexion" %}</span>
|
||||
<span class="icon">
|
||||
<i class="ti ti-door-enter"></i>
|
||||
<a href="{% url 'account_login' %}" class="button is-fullwidth is-light">
|
||||
<span>
|
||||
<span>{% trans "Connexion" %}</span>
|
||||
<span class="icon">
|
||||
<i class="ti ti-door-enter"></i>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="dropdown is-hoverable is-fullwidth">
|
||||
<div class="dropdown-trigger"
|
||||
aria-haspopup="true"
|
||||
aria-controls="lang-menu">
|
||||
<button class="button is-primary is-light is-fullwidth has-text-dark">
|
||||
<span class="icon"><i class="ti ti-language"></i></span>
|
||||
<span>{% trans "Choix de la langue" %}</span>
|
||||
<span class="icon is-pulled-right">
|
||||
<i class="ti ti-chevron-down" aria-hidden="true"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-menu" id="lang-menu" role="menu">
|
||||
<div class="dropdown-content px-2">
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% get_available_languages as LANGUAGES %}
|
||||
{% get_language_info_list for LANGUAGES as languages %}
|
||||
{% for language in languages %}
|
||||
<form action="{% url 'set_language' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<input name="next" type="hidden" value="{{ redirect }}">
|
||||
<input type="hidden" name="language" value="{{ language.code }}">
|
||||
<button class="dropdown-item {% if language.code == LANGUAGE_CODE %}is-active{% endif %}">
|
||||
{{ language.name_local|capfirst }}
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue